]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
reaction plugin: revert [1204], having r.range == nil is an actually supported scenar...
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Fri, 21 Sep 2007 07:08:33 +0000 (07:08 +0000)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Fri, 21 Sep 2007 07:08:33 +0000 (07:08 +0000)
data/rbot/plugins/reaction.rb

index 20dd1188f85b94e1e089514e44d7867621338ea6..2887d574b3861eee25ca7fdf79edb8fe32f4935e 100644 (file)
@@ -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