mIRC Home    About    Download    Register    News    Help

Print Thread
#207078 05/12/08 12:58 AM
Joined: Oct 2008
Posts: 8
S
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
S
Joined: Oct 2008
Posts: 8
Oper on a network, and working on a script to message anyone that whois's me. So far I have this:
Code:
on *:SNOTICE:$1 did a /whois on you:*: {
  /msg %1 /whois you as well, sir?
}


But it doesn't work right, but thinking I messed up with using $1 and %1 right. New to mIRC scripting, so any help is appreciated.

Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
If the snotice runs: " NICK did a /whois on you "
use "& did a /whois on you" for matchtext, and "$1" will be the nick. ("&" matches a single word, and "$N" will be the Nth word of the message).
Code:
on *:SNOTICE:& did a /whois on you: {
  msg $1 /whois you as well, sir?
}


Now, I know that snotice in a different format (unreal IRCd): " *** NICK (user@host) did a /whois on you. "
Therefore I do parse this snotice per:
Code:
on *:SNOTICE:*: { 

  ; - some code here, other snotices -

  elseif ($4-8 === did a /whois on you.) {
    - do stuff with $2-, where $2 is the nick of the whoising user -
  }

  ; - more code here -

}

Last edited by Horstl; 05/12/08 01:23 AM.
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Code:
on *:snotice:*did a /whois on you:{
  .msg $2 /whois you as well, sir?
}


The ON SNOTICE event doesn't have a location parameter, so the ending *: in your code makes for an invalid event.

I'm not sure if mIRC would return an error for this, or if it would just ignore it, but the proper format for that event does not have it.


Link Copied to Clipboard