mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: May 2010
Posts: 36
R
Ameglian cow
OP Offline
Ameglian cow
R
Joined: May 2010
Posts: 36
a few minutes of searching the archives didn't reveal any simple and elegant way to determine if a user has registered their nickname with NickServ. I'd like to be able to check if a nick is registered to avoid having ChanServ reject an attempt to add the nick to the auto-operators list.

The NickServ used by my target network typically responds to an INFO request for a registered nickname with the following notice:

Time registered: Jun 13 06:33:39 2005 PDT

while an unregistered nickname gets the following notice:

Nick <nickname> isn't registered.


So, obviously one could send NickServ the INFO message for the target nickname, then parse the responses looking for the keywords "Time registered" and "isn't registered" but I'm hoping for a more elegant method.

Any suggestions?

thanks,

Richard

Joined: Jan 2007
Posts: 1,156
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
Elegant? You send the server a request and wait for the response. If you want elegance add some ;candles & ;roses to the script. I think simplicity would be more ideal.

Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
The /whois response for that user should (may) return a raw 307 indicating that the user has a registered nickname.

Similarly, the /who response for that user should contain the character 'r' in $7, indicating that the user has a registered nickname.

-genius_at_work

Last edited by genius_at_work; 21/11/10 09:34 PM.
Joined: May 2010
Posts: 36
R
Ameglian cow
OP Offline
Ameglian cow
R
Joined: May 2010
Posts: 36
thanks for the RAW and WHO options, I will try them both out


Link Copied to Clipboard