* stop insult plugin being used to insult the bot
+Sun Aug 07 18:20:24 BST 2005 Tom Gilbert <tom@linuxbrit.co.uk>
+
+ * stop insult plugin being used to insult the bot
+
Sun Aug 07 17:53:06 BST 2005 Tom Gilbert <tom@linuxbrit.co.uk>
* workaround for people without YAML::load_file
elsif(m.params =~ /^me$/)
prefix = "you are "
else
- prefix = "#{m.params} is "
+ who = m.params
+ if (who == @bot.nick)
+ who = m.sourcenick
+ end
+ prefix = "#{who} is "
end
insult = generate_insult
@bot.say msgto, prefix + insult + suffix
end
else
# in channel message, not to me
+ # TODO option to do if(m.message =~ /^(.*)$/, ie try any line as a
+ # keyword lookup.
if(m.message =~ /^'(.*)$/ || (!@bot.config["keyword.address"] && m.message =~ /^(.*\S)\s*\?\s*$/))
keyword m, $1, false if(@bot.auth.allow?("keyword", m.source))
elsif(@bot.config["keyword.listen"] == true && (m.message =~ /^(.*?)\s+(is|are)\s+(.*)$/))