diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-04-07 13:04:47 +0000 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-04-07 13:04:47 +0000 |
commit | c05a99c1ac67b8bfd3b3585cabd8e7da4a1ccffe (patch) | |
tree | 714c2d2e07e5901b8bb913be43fe9f22f9356469 | |
parent | f0bd016c8d660b543bc5ea2643c9b9ba430198b3 (diff) |
imdb plugin: say something when nothing was found
-rw-r--r-- | data/rbot/plugins/imdb.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/data/rbot/plugins/imdb.rb b/data/rbot/plugins/imdb.rb index c23cd8d6..b1f566c6 100644 --- a/data/rbot/plugins/imdb.rb +++ b/data/rbot/plugins/imdb.rb @@ -416,12 +416,16 @@ class ImdbPlugin < Plugin movie_urls = i.search(movie, :type => :title) unless movie_urls - m.reply "nothing found about #{hwo}, sorry" + m.reply "nothing found about #{who}, sorry" return end info = i.name_in_movie(name_urls, movie_urls) - m.reply info.join("\n") + if info.empty? + m.reply "nothing found about #{who} in #{movie}, sorry" + else + m.reply info.join("\n") + end end end |