From 1b365e5063f49c88d4d15832f08345975b16e397 Mon Sep 17 00:00:00 2001 From: Tom Gilbert Date: Sun, 7 Aug 2005 17:20:41 +0000 Subject: [PATCH] Sun Aug 07 18:20:24 BST 2005 Tom Gilbert * stop insult plugin being used to insult the bot --- ChangeLog | 4 ++++ data/rbot/plugins/insult.rb | 6 +++++- lib/rbot/keywords.rb | 2 ++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 9f2263b3..57e04ad6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Sun Aug 07 18:20:24 BST 2005 Tom Gilbert + + * stop insult plugin being used to insult the bot + Sun Aug 07 17:53:06 BST 2005 Tom Gilbert * workaround for people without YAML::load_file diff --git a/data/rbot/plugins/insult.rb b/data/rbot/plugins/insult.rb index 5f0384e8..f610efc0 100644 --- a/data/rbot/plugins/insult.rb +++ b/data/rbot/plugins/insult.rb @@ -233,7 +233,11 @@ class InsultPlugin < Plugin 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 diff --git a/lib/rbot/keywords.rb b/lib/rbot/keywords.rb index daf3b40b..5de5a14a 100644 --- a/lib/rbot/keywords.rb +++ b/lib/rbot/keywords.rb @@ -421,6 +421,8 @@ module Irc 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+(.*)$/)) -- 2.39.2