Hello,
I'm trying to capture all chanserv/nickserv/memoserv messages, format the text they send me, and display it the way I want to.
I've used raw 311 - 319 to capture some things regarding whois information returned. But no matter what ive tried so far (on TEXT, on NOTICE, etc..) I can not get text like
MemoServ's List of messages (if any)
Is there an easy way that I am overlooking ?
thanks.
I personally would use:
on *:NOTICE:*:*: {
if ((*Serv iswm $nick) || (*.*.* iswm $nick)) {
/echo -s $+(-,$nick,-) $1-
}
}
Just using *serv is accurate becauser it covers all services, most servers also restrick nicknames ending in serv so its almost fool proof. Also some networks use domain names for the service, such as:
-services.mynetwork.com- Password accepted, you are now identified.
... and anyone that has 'serv' as a suffix to their nick or anyone impersonating Services.
Using *Serv isn't any more accurate than explicitly specifying the nicks. If any, it's less secure due to imposters.
Well, i know for sure my network restricks names ending inserv, so i find it accurate. On your own network, try /Nick SomeServ and see if it works.
:irc.dynamix.com 432 KingTomato TestServ :Erroneous Nickname: Forbidden nick
It does on mine too but that's not the point because most don't. My network also blocks K9, X, W, Z, ChanOP, NickOP, etc as even though they are not officially services on this particular network it would once again provide confucsion to users that roam across networks, Publicly released scripts need to take this into account.
Arn't most network services something like:
ChanServ@Services.ircnetwork.netIf so, you could look for Services* in the host mask.
Not every network has *services* in the host. In any case I could just set up a proxy with 'services' in the hostname or have 'services' as my user ID and KingTomato's script (if modified to what you suggest) would be fooled into believing that I am NickServ.
Both of the servers I'm on do not restrict nicknames in that way. Which is why I've always specified the nickname. Otherwise I would use your way to save me typing multiple if statements.
as for the
ChanServ@services.network.net, thats why i also use *.*.* as you cannot have a period in your nickname, again on my netowrk. Though watch will prove me wrong again--almost undoubtidly.
There is NO, repeat NO, 100% secure way of ensuring that what you are seeing is really ChanServ, et al. If I write a fake mIRCd that spits out the exact numerics in the exact order and timing that a DALnet server does (you can even build in variable lag), and then I have you /server to my IP (or a resolved irc.something.net), I can just as easily fake ANY services reply to fool your script.
With that in mind, any script that auto-responds is quite literally intentionally stupid. But if you don't mind, I certainly don't.
As for scripts that simply reformat the display, no such security is required. All you need to do is check whatever format services on the networks you frequent the most uses and go with that.