This is a snippet for IRCops, when someone whois'es you, it alerts you in the channel that your on in an echo with the users name and vhost, it notices the user that whois'ed you, and it also tells the user how many times you were whois'ed..just for fun.
You may edit the colors if you want, i just picked then 'cause they caught my eye :P. But anywho, enjoy this snippet, and feel free to comment.
Oh, and yes, i used >>> http://www.hawkee.com/snippet/6361/ <<<< that snippet..and just..spiced it up :P.
;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
;@@@*Soubi's IRCop Whois Noticer*@@@
;@@@@@@@@@@@@*Updated*@@@@@@@@@@@@@@
;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
#whoisnotice on
on *:SNOTICE:*whois on you*: {
if (!%x) { set -u10 %x on
echo -a 4[ALERT] 15 $2 ( $address($2,2) ) did a whois on you on server 4[ $server ] 15at 4[ $time(.:h:nn:sstt:.) 15, 4 $date ] 15.
inc %now
NOTICE $2 11W12hois successful4,12but the user has been noticed of you stalking them4.[11I12m watching you $2 4]
}
}
#whoisnotice end
Menu channel,status {
Whois Watcher
.Whois Count: echo -a 9********11,1I 15,1have been whois'd 8,1[ %now ] 15,1times12,1.9*********
.Enable Whois Noticer: /enable #whoisnotice
.Disable Whois Noticer: /disable #whoisnotice
}
Hmm, sorry but if someone had the nickname whois, or if whois was in their ident/realname this would trigger. :x
(15:31:33) -irc.*.net- *** CONNECT: Client connecting on port 6667: whois123!swhois@randommadeuphost.lie [1.2.3.4] [I am whoising you!]
Maybe do:
on *:SNOTICE:*whois on you*: {
also consider adding sometype of flood protection because it would be annoying if someone whois flooded you and you get that message echod to you each time :x
so maybe do
on *:SNOTICE:*whois on you*: {
if (!%x) { set -u10 %x on
echo -a [ALERT] $2 ( $address($2,2) ) did a whois on you!
inc %now
NOTICE $2 11,1Y15es 11,1 $2 $+ , 11,1I6,1'15,1m an 11,1IRC15,1op6,1. 11,1I15,1s there something 11,1I 15,1can help you with6,1? 11,1A15,1nd you just took my whois count up to 11 %now 6,1, 15,1maybe i am popular after all6,1!
}
}
Another thing, alot of people will tell you that when somebody whois's you they don't want to actually speak to you, so when they do whois you and get that message, you might piss them off.
You can do this with regex:
on $*:snotice:/\52{3} (.+) \50.+\51 (.+)/: {
inc %now
echo -a [ALERT] $regml(1) ( $address($regml(1),2) ) $regml(2)
But you have to be aware that not every network has the same server notice message for whois. They're somewhat different. So this code may need to be modified accordingly.