In my IRC Bot, there are some commands that I want to only be usable by me, and I want to check to make sure that anyone using my name is identified with nickserv (idented). I couldn't, however, find an easy way to determine this, which is why I'm here.
Freenode and Rizon are the primary target networks, if that matters.
Edit: I was actually aware of the various usermodes for idented users (although I didn't pay enough attention to realize that they differ!); sorry for not mentioning that before. The raw response that I get from a user, however, doesn't include their usermodes; it looks something like this:
:[email protected] PRIVMSG #erasmus-testing :foo
I suppose, then, that I'm trying to find a way (with various ircds, grr) to get those flags. If, as someone mentioned, Rizon returns whether or not someone is idented in a WHOIS query, then that's the sort of thing I'm looking for.
STATUS nick #
, but on OFTC I get something like1 (online, not identified)
. The most portable method I can think of is to try theACC
command first and scan the output for a number outside of the nick, if not try theSTATUS
command (on someACC
using serversSTATUS
is used for different purposes, so try it last), and use an exception list. The key: don't scan for a rigid format, rather build a flexible parser that scans for numbers. Also, not all networks haveNickServ
, so make a fallback. – Choler