1 # Author: Michael Brailsford <brailsmt@yahoo.com>
3 # Purpose: To respond to requests for information from the ri command line
6 class RiPlugin < Plugin
10 "msgri" => "msgri_handler"
22 m.reply "uhmm... whatever"
26 meth = self.method(@@handlers[m.plugin])
39 response = @cache[m.params]
43 response = p.readlines.join "\n"
44 @cache[m.params] = response
50 @cache[m.params] = response
53 @bot.say m.sourcenick, response
54 m.reply "Finished \"ri #{m.params}\""
60 tell_nick, query = m.params.split()
62 response = @cache[query]
66 response = p.readlines.join "\n"
67 @cache[m.params] = response
73 @cache[query] = response
76 @bot.say tell_nick, response
77 m.reply "Finished telling #{tell_nick} about \"ri #{query}\""
83 plugin.register("msgri")