From a56fb784eab1b46c123bf292657bb65958f7c4a1 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Fri, 21 Sep 2007 07:08:33 +0000 Subject: reaction plugin: revert [1204], having r.range == nil is an actually supported scenario, and if it happens unexpectedly it's some other bug --- data/rbot/plugins/reaction.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'data/rbot/plugins') diff --git a/data/rbot/plugins/reaction.rb b/data/rbot/plugins/reaction.rb index 20dd1188..2887d574 100644 --- a/data/rbot/plugins/reaction.rb +++ b/data/rbot/plugins/reaction.rb @@ -111,7 +111,7 @@ class ::Reaction pick = rand() debug "#{pick} in #{@replies.map { |r| r.range}.inspect}" @replies.each { |r| - return r if (!r.range) or r.range === pick + return r if r.range and r.range === pick } return nil end -- cgit v1.2.3