From c05a99c1ac67b8bfd3b3585cabd8e7da4a1ccffe Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Sat, 7 Apr 2007 13:04:47 +0000 Subject: imdb plugin: say something when nothing was found --- data/rbot/plugins/imdb.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'data/rbot') 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 -- cgit v1.2.3