"Replies can use the %%{key} syntax to access one of the following keys: " +
"who (the user that said the trigger), bot (the bot's own nick), " +
"target (the first word following the trigger), what (whatever follows target), " +
- "stuff (everything that follows the trigger), match (the actual matched text)"
+ "stuff (everything that follows the trigger), match (the actual matched text), " +
+ "match1, match2, ... (the i-th capture)"
when :list
"reaction list [n]: lists the n-the page of programmed reactions (30 reactions are listed per page)"
when :show
:what => what,
:stuff => stuff
}
+ match.to_a.each_with_index { |d, i|
+ extra[:"match#{i}"] = d
+ }
subs = @subs.dup.merge extra
reply = wanted.pick_reply
debug "picked #{reply}"