]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - data/rbot/plugins/reaction.rb
reaction plugin: no more :stuff, but :before and :after for the pre and postmatch...
[user/henk/code/ruby/rbot.git] / data / rbot / plugins / reaction.rb
index ec48caa0883067c21fba30fe307f4609404485f3..4f757ddd5adf0be122a90c6385d1a66b74e85250 100644 (file)
@@ -223,14 +223,16 @@ class ReactionPlugin < Plugin
       m1.first[0].length <=> m2.first[0].length
     }.last
     matched = match[0]
-    stuff = match.post_match.strip
-    target, what = stuff.split(/\s+/, 2)
+    before = match.pre_match.strip
+    after = match.post_match.strip
+    target, what = after.split(/\s+/, 2)
     extra = {
       :who => m.sourcenick,
       :match => matched,
       :target => target,
       :what => what,
-      :stuff => stuff
+      :before => before,
+      :after => after
     }
     match.to_a.each_with_index { |d, i|
       extra[:"match#{i}"] = d