From 345df89e4d04c89c7cd43e21e918bf0b83bb1205 Mon Sep 17 00:00:00 2001 From: Tom Gilbert Date: Wed, 8 Feb 2006 18:56:23 +0000 Subject: [PATCH] bug pointed on in #64, hopefully now resolved. --- lib/rbot/ircbot.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/rbot/ircbot.rb b/lib/rbot/ircbot.rb index b36cd36d..57ef816a 100644 --- a/lib/rbot/ircbot.rb +++ b/lib/rbot/ircbot.rb @@ -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 -- 2.39.5