diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-09-21 13:32:53 +0000 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-09-21 13:32:53 +0000 |
commit | e8d40e56a452afcfa11568db3822d03ea1cf53b9 (patch) | |
tree | 44c6f3e61281a845d13e782b8924bab5b7a11ab5 /data | |
parent | a860467ad40fad37f9fc886ea1a1d1f95a3bd2d7 (diff) |
reaction plugin: make triggers case insensitive
Diffstat (limited to 'data')
-rw-r--r-- | data/rbot/plugins/reaction.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/data/rbot/plugins/reaction.rb b/data/rbot/plugins/reaction.rb index 0ec75d58..ad8f2431 100644 --- a/data/rbot/plugins/reaction.rb +++ b/data/rbot/plugins/reaction.rb @@ -66,9 +66,9 @@ class ::Reaction end @trigger = [act] if rex.sub!(%r@^([/!])(.*)\1$@, '\2') - @trigger << Regexp.new(rex) + @trigger << Regexp.new(rex, true) else - @trigger << Regexp.new(/\b#{Regexp.escape(rex)}\b/u) + @trigger << Regexp.new(/\b#{Regexp.escape(rex)}\b/ui) end end @@ -241,7 +241,7 @@ class ReactionPlugin < Plugin def find_reaction(trigger) @reactions.find { |react| - react.raw_trigger == trigger + react.raw_trigger.downcase == trigger.downcase } end |