]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
bug pointed on in #64, hopefully now resolved.
authorTom Gilbert <tom@linuxbrit.co.uk>
Wed, 8 Feb 2006 18:56:23 +0000 (18:56 +0000)
committerTom Gilbert <tom@linuxbrit.co.uk>
Wed, 8 Feb 2006 18:56:23 +0000 (18:56 +0000)
lib/rbot/ircbot.rb

index b36cd36ded25a65ae74fd798ec7094c32939c615..57ef816a12bcfcc1ae9fccbbf58ab9ca9bea27fa 100644 (file)
@@ -437,9 +437,9 @@ class IrcBot
   # log message +message+ to a file determined by +where+. +where+ can be a
   # channel name, or a nick for private message logging
   def log(message, where="server")
-    message.chomp!
+    message = message.chomp
     stamp = Time.now.strftime("%Y/%m/%d %H:%M:%S")
-    where.gsub!(/[:!?$*()\/\\<>|"']/, "_")
+    where = where.gsub(/[:!?$*()\/\\<>|"']/, "_")
     unless(@logs.has_key?(where))
       @logs[where] = File.new("#{@botclass}/logs/#{where}", "a")
       @logs[where].sync = true