summaryrefslogtreecommitdiff
path: root/data/rbot
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-09-21 07:08:33 +0000
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-09-21 07:08:33 +0000
commita56fb784eab1b46c123bf292657bb65958f7c4a1 (patch)
treedeb994869bbbfce6db32f3305f17d58df505e654 /data/rbot
parent30a021e7af0d9abf50df40acc0ab021880b872e9 (diff)
reaction plugin: revert [1204], having r.range == nil is an actually supported scenario, and if it happens unexpectedly it's some other bug
Diffstat (limited to 'data/rbot')
-rw-r--r--data/rbot/plugins/reaction.rb2
1 files changed, 1 insertions, 1 deletions
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