mIRC Home    About    Download    Register    News    Help

Print Thread
Page 1 of 2 1 2
Joined: Oct 2003
Posts: 13
N
Pikka bird
OP Offline
Pikka bird
N
Joined: Oct 2003
Posts: 13
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.

Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
What does the notice look like? and what would you like to do with the notice?

Joined: Oct 2003
Posts: 13
N
Pikka bird
OP Offline
Pikka bird
N
Joined: Oct 2003
Posts: 13
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

Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
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.

Joined: Oct 2003
Posts: 13
N
Pikka bird
OP Offline
Pikka bird
N
Joined: Oct 2003
Posts: 13
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.

Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
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)

Joined: Oct 2003
Posts: 13
N
Pikka bird
OP Offline
Pikka bird
N
Joined: Oct 2003
Posts: 13
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?


Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
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

Joined: Oct 2003
Posts: 13
N
Pikka bird
OP Offline
Pikka bird
N
Joined: Oct 2003
Posts: 13
Argh. Not working for some reason. But thanks for trying smile

Joined: Oct 2003
Posts: 5
S
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
S
Joined: Oct 2003
Posts: 5
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....


Best Regards,
seec77
Joined: Oct 2003
Posts: 13
N
Pikka bird
OP Offline
Pikka bird
N
Joined: Oct 2003
Posts: 13
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!

Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
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).

Joined: Oct 2003
Posts: 13
N
Pikka bird
OP Offline
Pikka bird
N
Joined: Oct 2003
Posts: 13
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)

Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
Code:
On ^*:snotice:& & & did a /whois on you.:{
  if !$window(@whois) { window -n @whois }
  echo 9 -t @whois $1-
[color:blue]  beep[/color]
  haltdef
}

Joined: Oct 2003
Posts: 13
N
Pikka bird
OP Offline
Pikka bird
N
Joined: Oct 2003
Posts: 13
Didn't work...

Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
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.

Joined: Oct 2003
Posts: 13
N
Pikka bird
OP Offline
Pikka bird
N
Joined: Oct 2003
Posts: 13
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}

Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
Modify the pasted code to look like the code above, i.e. make it span several lines. smile

Joined: Oct 2003
Posts: 13
N
Pikka bird
OP Offline
Pikka bird
N
Joined: Oct 2003
Posts: 13
Still not working :\

Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
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 }

Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
Hmm.. actually, mine was a multi-line version of your code, I just added the "beep". laugh

Joined: Dec 2002
Posts: 1,541
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,541
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


Those who fail history are doomed to repeat it
Joined: Oct 2003
Posts: 13
N
Pikka bird
OP Offline
Pikka bird
N
Joined: Oct 2003
Posts: 13
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!

Page 1 of 2 1 2

Link Copied to Clipboard