diff options
Diffstat (limited to 'data/rbot/plugins/imdb.rb')
-rw-r--r-- | data/rbot/plugins/imdb.rb | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/data/rbot/plugins/imdb.rb b/data/rbot/plugins/imdb.rb index 432d0efc..48c49dc3 100644 --- a/data/rbot/plugins/imdb.rb +++ b/data/rbot/plugins/imdb.rb @@ -70,16 +70,12 @@ class ImdbPlugin < Plugin "imdb <string> => search http://www.imdb.org for <string>" end - def privmsg(m) - unless(m.params && m.params.length > 0) - m.reply "incorrect usage: " + help(m.plugin) - return - end - + def imdb(m, params) + what = params[:what].to_s i = Imdb.new(@bot) - info = i.info(m.params) + info = i.info(what) if !info - m.reply "Nothing found for #{m.params}" + m.reply "Nothing found for #{what}" return nil end m.reply "#{info[1]} : #{info[0]}" @@ -88,5 +84,5 @@ class ImdbPlugin < Plugin end plugin = ImdbPlugin.new -plugin.register("imdb") +plugin.map "imdb *what" |