Eh, this is the first one I ever posted, so don't be too hard on me, eh? :)
Introduction:
Basically, I was tired of getting notices for whenever someone highlighted me, and if someone AMSGed me, i would get a ton of notices, so i decided to modify it so it goes in a window called @highlighter, which some people critic because they say a window wouldn't notify them well enough. All I have to say to that is that the window changes colors on my screen whenever text is added to the window, so that is enough of an alert for me, and I would prefer if all the highlights didn't get lost in endless conversations in chans, like notices would.
Function:
All you have to do is paste it in your remotes section of script editor and hit the F2 key to turn it on and off. If F2 is already doing a different command, change it to your desired F-key. The script will echo highlights when someone says, describes, notices or uses your name in a raw mode. It will also log when someone invites you to a room. It will ignore highlights if they come from a bot, but you have to edit the list of bots; the current example is "ChanServ MemoServ OperServ NickServ". If there are other bots you don't want highlights from, add their name. For example:
set %botlist Botname1 Botname2 Botname3
NEW: Script will now close your PMs, tell the user that you are not available and send a message to your @window telling you their query. All you have to do to reply to their query is open their message window, and the script won't tell them the preset.
Updates:
August 26, 2008: Thanks for the comment on how to fix the problem, I've corrected it.
September 26, 2008: Thanks for your furthur comments, I updated it again with offsite help as well.
December 6, 2008: Updated for nick highlights using multiple colors.
December 7, 2008: Forgot to make it echo an entire sentence instead of just the nick, updated again x.x
December 21, 2008: Changed menu to function key.
January 22, 2009: Updated for notice highlights and raw modes including your nick.
January 23, 2009: Thanks to some advice from a friend, I added a feature to ignore bots when they highlight.
January 25, 2009: Now logs invites and minor edit to %botlist variable.
April 25, 2009: Tweaked color formatting and added line breaks for easier navigation.
January 24, 2010: Added feature to close PMs and add a line to the highlighter window.
Picture:
Picture shows all the available outputs done in the highlighter window: plain text highlighter, an invite, action highlight, a notice, a rawmode highlight and a query.
alias F2 {
if ($group(#highlighter) == off) {
.enable #highlighter
echo -a Highlighter is On
set %botlist ChanServ MemoServ OperServ NickServ
}
elseif ($group(#highlighter) == on) {
.disable #highlighter
echo -a Highlighter is Off
unset %botlist
}
}
#highlighter on
on $*:text:$(/ $+ $me $+ /iS):#: {
if ($istok(%botlist,$nick,32)) return
if ($chan != $active) {
window -De @highlighter 0 0 450 160 arial 13
echo -t @highlighter $time(7(03h07:03nn TT7)) 3 $+ $nick 12said your nick in the channel3 $chan 12on the network3 $network 12and said7:3 $1-
echo -t @highlighter 7--------------------
}
}
on $*:action:$(/ $+ $me $+ /iS):#: {
if ($istok(%botlist,$nick,32)) return
if ($chan != $active) {
window -De @highlighter 0 0 450 160 arial 13
echo -t @highlighter $time(7(03h07:03nn TT7)) 3 $+ $nick 12described your nick in the channel3 $chan 12on the network3 $network 12and said7:3 $1-
echo -t @highlighter 7--------------------
}
}
on *:notice:*:?: {
if ($istok(%botlist,$nick,32)) return
else {
window -De @highlighter 0 0 450 160 arial 13
echo -t @highlighter $time(7(03h07:03nn TT7)) 3 $+ $nick 12noticed your nick on the network3 $network 12and said7:3 $1-
echo -t @highlighter 7--------------------
}
}
on *:rawmode:#: {
if ($istok(%botlist,$nick,32)) return
if ($chan != $active) && ($me isin $1-) {
window -De @highlighter 0 0 450 160 arial 13
echo -t @highlighter $time(7(03h07:03nn TT7)) 3 $+ $nick 12used your nick in a mode in the channel3 $chan 12on the network3 $network 12and said7:3 $1-
echo -t @highlighter 7--------------------
}
}
on *:invite:*: {
if ($istok(%botlist,$nick,32)) return
else {
window -De @highlighter 0 0 450 160 arial 13
echo -t @highlighter $time(7(03h07:03nn TT7)) 3 $+ $nick 12invited you to the channel3 $chan 12on the network3 $network
echo -t @highlighter 7--------------------
}
}
on ^*:open:?:*:{
haltdef
.msg $nick 3I12 am not accepting queries right now7. 3W12hen 3I12 return to my computer7,3 I12 will message you back if it is important7.
echo -t @highlighter $time(7(03h07:03nn TT7)) 3 $nick 12queried you on3 $network 12and said3 $1-
echo -t @highlighter 7--------------------
}
#highlighter end
Looking at it again, to solve the problem of the amsg highlight (and for anyone else annoyed at that) you could always simply create a very short timer including the network and nick of the highlighted message each time instead of highlighting instantly - the amsg would put a new timer over the old one before it went off, until it reached the last room.
This script could've saved a few bytes:
on *:invite:*:b
on *:notice:*:?:b
on $*:text:$(/ $+ $me $+ /iS):#:a $1-
on $*:action:$(/ $+ $me $+ /iS):#:a $1-
on $*:notice:$(/ $+ $me $+ /iS):#:a $1-
alias -l a {
if ($istok(%botlist,$nick,32)) return
if ($chan != $active) {
window -De @highlighter 0 0 450 160 arial 13
echo -t @highlighter $time(7(03h07:03nn TT7)) 3 $+ $nick 12said your nick in the channel3 $chan 12on the network3 $network 12and said7:3 $1-
echo -t @highlighter 7--------------------
}
}
alias -l b {
if ($istok(%botlist,$nick,32)) return
else {
window -De @highlighter 0 0 450 160 arial 13
echo -t @highlighter $time(7(03h07:03nn TT7)) 3 $+ $nick 12invited you to the channel3 $chan 12on the network3 $network
echo -t @highlighter 7--------------------
}
}
What seems to be the problem omgnicecode?
The only thing that I can seem to think of that some people told me about was this: if ($chan != $active) {. That part of the script that is written in the above snippet means that the script will not activate while you are in the channel you are being highlighted in. Test the script out by having someone highlight you in a channel you are not looking in at that moment.
If you have any other problems, come to /server chat.frostwire.com and come ask me there. My nick is David.
if you want the window to appear after you've been nickalerted move "window -De @highlighter 0 0 450 160 arial 13" into the else statement
So
on *:text:*:#: { window -De @highlighter 0 0 450 160 arial 13
if ($me isin $1-) {
if ($chan == $active) { halt }
...
to
on *:text:*:#: {
if ($me isin $1-) {
if ($chan == $active) { halt }
else {
window -De @highlighter 0 0 450 160 arial 13
echo -t @highlighter 6* 13 $+ $nick 1called you at13 $time 1on channel13 $chan 1on the network13 $network 1and said6:13 $1-
....