:desc => "Check for a salutation in all languages and not just in the one defined by core.language",\r
:on_change => Proc.new {|bot, v| bot.plugins['salut'].reload}\r
)\r
+ BotConfig.register BotConfigBooleanValue.new('salut.address_only',\r
+ :default => true, \r
+ :desc => "When set to true, the bot will only reply to salutations directed at him",\r
+ :on_change => Proc.new {|bot, v| bot.plugins['salut'].reload}\r
+ )\r
+\r
\r
def initialize\r
@salutations = Hash.new\r
end\r
\r
def listen(m)\r
+ if @bot.config['salut.address_only']\r
+ return unless m.address? or m.message =~ /#{Regexp.escape(@bot.nick)}/\r
+ end\r
salut = nil\r
[:both, :in, :out].each { |k|\r
next unless @match[k]\r