From e8d40e56a452afcfa11568db3822d03ea1cf53b9 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Fri, 21 Sep 2007 13:32:53 +0000 Subject: [PATCH] reaction plugin: make triggers case insensitive --- data/rbot/plugins/reaction.rb | 6 +++--- 1 file 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 -- 2.39.5