I suggest adding WHOIS support to the API. The interface would be somewhat like this:
class Module(object):
def whois(nick, callback):
"""Request a WHOIS for the specified nickname.
:param nick: the user's nickname
:type nick: str.
:param callback: object to call when the client has received all the WHOIS information
:type callback: callable, usually a function.
The callback object will be called with a dictionary like this:
.. codeblock:: python
{
nick: "ku",
user: "ku", # 311
host: "polywiki/steward/ku", # 311
gecos: "ku", # 311
channels: ["##bbot"], # 319
server: "verne.freenode.net", # 312
serverinfo: "Newark, NJ, US", # 312
secure: "is using a secure connection", # 671
account: "kudu", # 330
accountinfo: "is logged in as", # 330
operator: "is an IRC Operator" # 313, and not actually true
}
"""
pass
I suggest adding WHOIS support to the API. The interface would be somewhat like this:
By the way, the "End of WHOIS" command is 318.