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

How to perform a whois query? #10

Closed
jaraco opened this issue Nov 20, 2015 · 4 comments
Closed

How to perform a whois query? #10

jaraco opened this issue Nov 20, 2015 · 4 comments

Comments

@jaraco
Copy link
Owner

jaraco commented Nov 20, 2015

How to perform a whois on a client?

For example:

When using singleserverircbot as the base class

on_pubmsg(self, c, e):
   user = nm_to_n(e.source())
   c.whois(user)

returns nothing


@jaraco jaraco closed this as completed Nov 20, 2015
@jaraco
Copy link
Owner Author

jaraco commented Nov 20, 2015

When you call c.whois, a whois is a message sent to the server. It's an asynchronous operation for which the response may or may not come later. I've never used this feature before, but I suspect to catch the response, you need to define 'on_whois(self, c, e)' and parse out the message. If that doesn't work, then you'll have to dig into the IRC RFC and find out what message is sent in response to a whois query, and define 'on_'.

Good luck, and please report back what you find.


Original comment by: Jason R. Coombs

@jaraco
Copy link
Owner Author

jaraco commented Nov 20, 2015

Its cool. You can close this.


Original comment by: unconscious

@jaraco
Copy link
Owner Author

jaraco commented Nov 20, 2015

Ill be sending you some pull requests with enhancements btw. :)


Original comment by: unconscious

@jaraco
Copy link
Owner Author

jaraco commented Nov 20, 2015

Not a bug, but a question. Glad to help, though.


Original comment by: Jason R. Coombs

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

No branches or pull requests

1 participant