summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-04-05 09:28:57 +0000
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-04-05 09:28:57 +0000
commitd13c4f4e8d1d6a9b126540ba60dd541048b23772 (patch)
tree3996ffba6f6d18f8554d1527df3c0e3bddbd5083
parenta06c0cfa945d5a9e1aefb37fa96b143cdedd25ca (diff)
imdb plugin: make aka searches optional
-rw-r--r--data/rbot/plugins/imdb.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/data/rbot/plugins/imdb.rb b/data/rbot/plugins/imdb.rb
index ad9bbf58..96501659 100644
--- a/data/rbot/plugins/imdb.rb
+++ b/data/rbot/plugins/imdb.rb
@@ -25,7 +25,8 @@ class Imdb
end
def search(rawstr)
- str = URI.escape(rawstr) << ";site=aka"
+ str = URI.escape(rawstr)
+ str << ";site=aka" if @bot.config['imdb.aka']
return do_search(str)
end
@@ -245,6 +246,9 @@ class Imdb
end
class ImdbPlugin < Plugin
+ BotConfig.register BotConfigBooleanValue.new('imdb.aka',
+ :default => true,
+ :desc => "Look for IMDB matches also in translated titles and other 'also known as' information")
BotConfig.register BotConfigBooleanValue.new('imdb.popular',
:default => true,
:desc => "Display info on popular IMDB entries matching the request closely")