]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - data/rbot/plugins/reaction.rb
* rss.rb: use guids to check for seen items
[user/henk/code/ruby/rbot.git] / data / rbot / plugins / reaction.rb
index 3e6dacdac57838cba300e7af73d74f76e7a8b913..d358000c8582945ee5961a5468cd63221dad6535 100644 (file)
@@ -263,9 +263,14 @@ class ReactionPlugin < Plugin
     return unless reply
     args = reply.apply(subs)
     if args[0] == :cmd
-      new_m = PrivMessage.new(@bot, m.server, m.source, m.target, @bot.nick+": "+args[1])
-      @bot.plugins.delegate "listen", new_m
-      @bot.plugins.privmsg(new_m) if new_m.address?
+      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)
+      rescue RecurseTooDeep => e
+        error e
+      end
     else
       m.__send__(*args)
     end