diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2009-03-09 22:16:51 +0100 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2009-03-09 22:16:51 +0100 |
commit | b0773cb8d560cf90019e13d73ae308a38445ddb5 (patch) | |
tree | 94e0cbc0929c13a27ecd5ddcd0a14ff24787ec62 | |
parent | 07edf3c56db6d05346a3e2dbfff12698e543c090 (diff) |
reaction: spoken reactions should use plainreply, not reply
-rw-r--r-- | data/rbot/plugins/reaction.rb | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/data/rbot/plugins/reaction.rb b/data/rbot/plugins/reaction.rb index 8f2a1637..6bbd08e3 100644 --- a/data/rbot/plugins/reaction.rb +++ b/data/rbot/plugins/reaction.rb @@ -263,18 +263,21 @@ class ReactionPlugin < Plugin reply = wanted.pick_reply debug "picked #{reply}" return unless reply - args = reply.apply(subs) - if args[0] == :cmd + act, arg = reply.apply(subs) + case act + when :cmd begin # Pass the new message back to the bot. # FIXME Maybe we should do it the alias way, only calling # @bot.plugins.privmsg() ? - fake_message(@bot.nick+": "+args[1], :from => m) + fake_message(@bot.nick+": "+arg, :from => m) rescue RecurseTooDeep => e error e end + when :reply + m.plainreply arg else - m.__send__(*args) + m.__send__(act, arg) end end |