]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - lib/rbot/message.rb
weather plugin: refactor HTML cleanup code
[user/henk/code/ruby/rbot.git] / lib / rbot / message.rb
index 9881503c3f10a074a7f8ff0aff4ae988dadbe69b..de72d30c93eec520f3b4c896d0888d290345bd25 100644 (file)
@@ -122,6 +122,9 @@ module Irc
     # contents of the message
     attr_accessor :message
 
+    # contents of the message (for logging purposes)
+    attr_accessor :logmessage
+
     # has the message been replied to/handled by a plugin?
     attr_accessor :replied
 
@@ -152,6 +155,7 @@ module Irc
           warning "Message does not have identification"
         end
       end
+      @logmessage = @message.dup
 
       if target && target == @bot.myself
         @address = true
@@ -283,6 +287,7 @@ module Irc
         @message = $3 || String.new
         @action = @ctcp == 'ACTION'
         debug "Received CTCP command #{@ctcp} with options #{@message} (action? #{@action})"
+        @logmessage = @message.dup
       end
 
       # free splitting for plugins