Jethro commented on a Page, Nick Alert  -  Aug 13, 2011

yelow79, your script can be improved a bit so you can add more than one alternative nickname. You don't need to put the control code for color number 3 but simple use echo 3 -a to do the same thing. Also, a delete feature would have been nice:

menu status,menubar,channel,query {
  Nick Alert 
  .set $iif(%alert == on, OFF, ON ) :{
    set %alert $iif(%alert == on,off,on) 
    echo 3 -a nickalert is now turned %alert
  }
  -
  .set alt. trigger {
    set %altnick $addtok(%altnick,$$?"enter an alernative nickname here:",124) 
    echo 3 -a your alternative nick $! has been added to my alternative list!
  }
  -
  .del alt. trigger {
    if ($istok(%altnick,$$?"Enter an alernative nickname to delete:",124)) {
      set %altnick $remtok(%altnick,$!,1,124)
      echo 3 -a your alternative nick $! has been deleted successfully!
    }
    else {
      $input(The alternative nickname $! is either deleted or doesn't exist in my alterntive nick list.,o)
    }
  }
}
on $*:text:$(/\b(\Q $+ $me $+ \E|\Q $+ %altnick $+ \E)\b/iS):#: {
  if (%alert == on) && ($active != $chan) {
    echo -a 4[ $+ $time $+ ] $nick said your name in $chan $+ : $1-
    beep 3
  }
}

Now, you can have as many alternative nicknames added as you wish. The %altnick is added as such: > %altnick nick1|nick2|nick3|nick4|etc..,which will simulate regex's OR operator.
I also have an popup box check to warn if an alternative nickname to be deleted exists or not.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.