mIRC Homepage
Posted By: nesnitram Capturing when someone does a /whois on me - 16/10/03 05:36 PM
Hi, I'm an ircop on my server and I was wondering how I could go about filtering the notice showing when someone does a /whois on me from all the other notices. It's a busy server and it takes some time searching through all the notices trying to find that info. Thank you in advance for your help.
What does the notice look like? and what would you like to do with the notice?
irc.*net.org - *** Nick is doing a /whois on you

I would like to either put the notice in a special window, maybe a @window or maybe highlight notices containing "/whois" in it whichever is easier I guess hehe. Thanks
The "on snotice" event will catch them...
Code:
On ^*:snotice:& & is doing a /whois on you:{
  if !$window(@whois) { window -n @whois }
  aline @whois $1-
  haltdef
}

The couple of &'s in the matchtext section of this event are wildcards, each representing a single word, and the /aline command redirects the notice to a custom @window.

If you would like to change the message that is displayed in the @window, change the /aline to something like -
  • aline @whois $2 is /whoising you.
Ok thanks. Hopefully this will work. Just to be safe, where in the script editor do I wanna paste this? I'm guessing under remote.
Yea, press Alt+R and paste it in the remote smile

If for some reason it doesn't work, make sure the matchtext part is not misspelled, that the remote is turned on (/remote on) and that you don't have another "on snotice" events in the same remote file (if there are, move this one to a new file by selecting File > New from the menu)
Hmm it's not working, but I noticed the notice I pasted you isn't quite accurate, here is the exact wording...

[14:20] -max.scoobynet.org- *** tc- (darrell@max1-2.falcon1.net) did a /whois on you.

I don't know if this makes a difference or not but I changed it in the remote to:
On ^*:snotice:& & did a /whois on you:{ if !$window(@whois) { window -n @whois } aline @whois $1- haltdef}

Anything else I need to change?

If the server sends the user host too, we need to add another wildcard to the matchtext section... and also, as you can see the notice ends with a period, so we'll have to add this too...
  • On ^*:snotice:& & & did a /whois on you.: if !$window(@whois) { window -n @whois } | aline @whois $1- haltdef
Argh. Not working for some reason. But thanks for trying smile
umm....
yeah
just do a /debug @debug
and then look at when you get a notice of someone whoising you.....
then just do some kinda raw....
Hey...Got it working finally. I just closed mirc out and then reopened it lol. Anyway, the only other things I'd like to add now is the bright green color to the text in the @window and a timestamp. Thanks again for all your help!
This would be easier... change "aline @whois" to "echo 9 -t @whois" - note that you can change 9 to whatever color code you want (0-15).
Excellent! Worked great! One last thing and I promise I won't bug ya anymore hehe. I'd like it to /beep when someone does the /whois. Where would I need to insert that? Thanks again, you've been a great help blush)
Posted By: Iori Re: Capturing when someone does a /whois on me - 17/10/03 05:30 AM
Code:
On ^*:snotice:& & & did a /whois on you.:{
  if !$window(@whois) { window -n @whois }
  echo 9 -t @whois $1-
[color:blue]  beep[/color]
  haltdef
}
Didn't work...
When you type /beep in the command line, do you hear something? If you don't, go to mIRC Options (Alt+O), Sounds, and make sure 'Enable sounds' is checked. Here I also need to check 'Use internal beep' to get it to work.
Yes, the enable sounds box is checked and the checkbox to use internal beeps and when i type /beep it does beep. Here's the code I'm using just in case I'm doing something wrong :

On ^*:snotice:& & & did a /whois on you.: if !$window(@whois) { window -n @whois } |
echo 9 -t @whois $1- beep haltdef}
Posted By: Iori Re: Capturing when someone does a /whois on me - 17/10/03 06:41 AM
Modify the pasted code to look like the code above, i.e. make it span several lines. smile
Still not working :\
Here's a one-line version of Iori's code, try it:
  • On ^*:snotice:& & & did a /whois on you.:{ if !$window(@whois) { window -n @whois } | echo 9 -t @whois $1- | beep | haltdef }
Posted By: Iori Re: Capturing when someone does a /whois on me - 17/10/03 07:11 AM
Hmm.. actually, mine was a multi-line version of your code, I just added the "beep". laugh
Would this work (separate lines for readability)?

on ^*:snotice:*whois on you: {
if !$window(@whois) { window -n @whois }
echo 9 -t @whois $1- | beep | haltdef
}

It SEEMS like the way & & & in the matchtext just doesnt wanna work is all. Also, do you NEED all that info there? I mean I do a LOT of snotices and services related scripts and I hack the msg up to shorten the matchtext and RARELY run into issue
Success!!! Ahhh we can finally close the book on this one hehe. Online's 1 line code did it. Thanks again to all for your help!
© mIRC Discussion Forums