summaryrefslogtreecommitdiff
path: root/data/rbot
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-09-21 19:45:08 +0000
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-09-21 19:45:08 +0000
commit9084fa0b0c62988319548157b3a10608c35b2120 (patch)
tree7a4cce5c507e0b823ac676a0eda255de3d0cfd78 /data/rbot
parentaaf985347dc9dee61480b152ae7bf7d713e8def6 (diff)
reaction plugin: no more :stuff, but :before and :after for the pre and postmatch text
Diffstat (limited to 'data/rbot')
-rw-r--r--data/rbot/plugins/reaction.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/data/rbot/plugins/reaction.rb b/data/rbot/plugins/reaction.rb
index ec48caa0..4f757ddd 100644
--- a/data/rbot/plugins/reaction.rb
+++ b/data/rbot/plugins/reaction.rb
@@ -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