]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
plugins: message() delegate
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Sun, 6 Apr 2008 22:50:26 +0000 (00:50 +0200)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Sun, 6 Apr 2008 22:50:26 +0000 (00:50 +0200)
lib/rbot/ircbot.rb
lib/rbot/plugins.rb

index f994875002d4fcf7f1d39a5a9eab0b25eb72e9ae..97f8ead4d047ef511d63d3718a81d34cfa32f245 100644 (file)
@@ -579,6 +579,7 @@ class Bot
       unless ignored
         @plugins.delegate "listen", m
         @plugins.delegate("ctcp_listen", m) if m.ctcp
+        @plugins.delegate "message", m
         @plugins.privmsg(m) if m.address?
         if not m.replied
           @plugins.delegate "unreplied", m
index 5280a117f4b4bacce97be28a088fa764852b987d..7631bfc3864a951cfbaa00df0ed1b0e7d7d2d782 100644 (file)
@@ -82,6 +82,11 @@ module Plugins
                          use message.ctcp_reply, which sends a private NOTICE
                          to the sender.
 
+  message(PrivMessage)::
+                         Called for all PRIVMSG. Hook on this method if you
+                         need to handle PRIVMSGs regardless of whether they are
+                         addressed to the bot or not, and regardless of
+
   privmsg(PrivMessage)::
                          Called for a PRIVMSG if the first word matches one
                          the plugin #register()ed for. Use m.plugin to get