From 71fc5469f228c7be8f140dcec6726a48c0ced595 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Fri, 31 Dec 2010 10:20:55 +0100 Subject: fake message: set replied on reply Although the reply method for fake messages was actually relying on the original, we still need to set 'replied' to prevent the fake message from being wrongly delegated to 'unreplied'. The most obvious bug this commit fixes is the potentially infinite loop triggered by defining a command reaction triggered by the command name itself (e.g. reply to ping with cmd:ping). --- data/rbot/plugins/reaction.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'data') diff --git a/data/rbot/plugins/reaction.rb b/data/rbot/plugins/reaction.rb index d3f4b558..879b89fa 100644 --- a/data/rbot/plugins/reaction.rb +++ b/data/rbot/plugins/reaction.rb @@ -238,7 +238,7 @@ class ReactionPlugin < Plugin def unreplied(m) return unless PrivMessage === m - debug "testing #{m} for reactions" + debug "testing #{m.inspect} for reactions" return if @reactions.empty? candidates = @reactions.map { |react| blob = react === m -- cgit v1.2.3