Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add WHOIS support #15

Open
Kudu opened this issue Aug 1, 2012 · 0 comments
Open

Add WHOIS support #15

Kudu opened this issue Aug 1, 2012 · 0 comments
Labels

Comments

@Kudu
Copy link
Contributor

Kudu commented Aug 1, 2012

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

By the way, the "End of WHOIS" command is 318.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant