+ handle WHOIS queries
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Sat, 9 Aug 2008 23:43:32 +0000 (01:43 +0200)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Sat, 9 Aug 2008 23:47:13 +0000 (01:47 +0200)
commiteebdc6973a6ab1089ed18c0ea02e72cd6e656120
tree714e77316f6015ce19d371534a41819d342acbb1
parentfa4a71c43227669b42b4b1c0a68be796091f3d1d
+ handle WHOIS queries

The bot now exposes a whois(nick) method to make WHOIS queries to the
server. The extended syntax whois(nick, server) is also supported,
allowing another server to be queried (this is useful to retrieve info
which is only available on nick's server, such as idle time and signon
date).

Most if not all RFC-compliant replies are handled, although some of the
data received is currently ignored. Non-RFC extended replies such as
nickserv identification status are not hanlded yet, since they are
highly server-specific, both in numeric reply choice (e.g. 307 vs 320)
and in reply message syntax and meaning.

A new WhoisMessage is also introduced, for plugin delegation. The source
is the originating server, the target is the user for which information
was requested. A #whois() method is provided holding all retrieved
information.
lib/rbot/irc.rb
lib/rbot/ircbot.rb
lib/rbot/message.rb
lib/rbot/rfc2812.rb