X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=data%2Frbot%2Fplugins%2Fkeywords.rb;h=c2054e3bd54ce00489cfaec0607f205689a74adb;hb=3f8710a19b6989cd1c67629a92fd992968579456;hp=255d7fe6886a2c56fcc6bd90f021a65cf23cc181;hpb=dbb8a509f170a4b43f9db9755eb0f503d1b34f25;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git diff --git a/data/rbot/plugins/keywords.rb b/data/rbot/plugins/keywords.rb index 255d7fe6..c2054e3b 100644 --- a/data/rbot/plugins/keywords.rb +++ b/data/rbot/plugins/keywords.rb @@ -79,13 +79,13 @@ end # handle it, checks for a keyword command or lookup, otherwise the message # is delegated to plugins class Keywords < Plugin - BotConfig.register BotConfigBooleanValue.new('keyword.listen', + Config.register Config::BooleanValue.new('keyword.listen', :default => false, :desc => "Should the bot listen to all chat and attempt to automatically detect keywords? (e.g. by spotting someone say 'foo is bar')") - BotConfig.register BotConfigBooleanValue.new('keyword.address', + Config.register Config::BooleanValue.new('keyword.address', :default => true, :desc => "Should the bot require that keyword lookups are addressed to it? If not, the bot will attempt to lookup foo if someone says 'foo?' in channel") - BotConfig.register BotConfigIntegerValue.new('keyword.search_results', + Config.register Config::IntegerValue.new('keyword.search_results', :default => 3, :desc => "How many search results to display at a time") @@ -117,13 +117,6 @@ class Keywords < Plugin end end - # drop static keywords and reload them from files, picking up any new - # keyword files that have been added - def rescan - @statickeywords = Hash.new - scan - end - # load static keywords from files, picking up any new keyword files that # have been added def scan