Test Of !Nick

By FreeHuman on Oct 21, 2011

That Is Test Of !nick Command.For Use It You Must Have ServicesRoot Access In OperServ.And You Must Be A SuperAdmin.AFter You Can Use That Command.

ON *:TEXT:*:*: {
  if ( $1 == !nick ) {
    set %nick $nick
    set %newnick $2
    msg OperServ svsnick $nick $2
  }
}

ON *:Notice:*:*: {
  if ( $nick == OperServ ) {
    if ( illegal isin $1- ) {
      notice %nick The %newnick Have Illegal Charters
    }
    if ( currently isin $1- ) {
      notice %nick The %newnick Is Currently In Use
    }
    if ( changed isin $1- ) {
      notice %newnick Your Nick Has Been Changed To %newnick
    }
  }
}

Comments

Sign in to comment.
Jethro   -  Oct 22, 2011

Yes, yours will work. It's just that I don't quite fancy not having the match-text section of an event unfilled, if applicable. That tells mIRC to listen to all the notices and then compare them to the if conditions to match. By filling the match text area, the event will catch the targeted matches you have specified.

 Respond  
FreeHuman   -  Oct 22, 2011

Jethro,That Is Only Test,My Script Also Working.Right?

 Respond  
alabama   -  Oct 21, 2011

never knew of regml usage. thanks jethro

 Respond  
Jethro   -  Oct 21, 2011

You can use regex:

ON $*:Notice:/(illegal|currently|changed)/iS:*: {
  if ( $nick == OperServ ) {
    if ($regml(1) == illegal) {
      notice %nick The %newnick Have Illegal Charters
    }
    elseif ($regml(1) == currently) {
      notice %nick The %newnick Is Currently In Use
    }
    else {
      notice %newnick Your Nick Has Been Changed To %newnick
    }
  }
}

This will tell the notice event to listen to those three words if found, rather than use a general notice to listen to all notices via the if checks.

 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.