Dennis de Vaal - 2011-12-17

The whois method of the Internet plugin uses whois server (through telnet) to lookup domain information for com, net and edu domains, otherwise it uses a country code specific whois server, e.g. As a last resort it tries to use, which sometimes results in Error: I couldn't find such a domain. Which can be misleading because is also used when a particular whois server didn't return any parsable results.

Because doesn't exist anymore socket.error is raised and catched on lines 92-94, The messages: '[Errno 111] Connection refused' or '[Errno 113] No route to host' from the exception object is returned and shown on irc.

This whois method is way too big and kind of messy for my taste (I realize it's pretty old). It's also not very fault tolerant. Try for example domain.n, which returns Error: [Errno -2] Name or service not known, obviously because doesn't exist (it shouldn't even perform a lookup at this point, since the whois server address is wrong).

It shouldn't be necessary to pass your own whois server to this command. The correct whois server should be automatically picked.

Quick fix:

Change server = '' on line 85 to server = '' This solves the problem and allows lookups for com, net, edu domains again.

A better fix:

I wrote a new plugin called Domain which implements better whois functionality by using pywhois ( It's still very basic but it does the job, supports more domains and is also more fault tolerant. You can find it here: