diff options
author | Tom Gilbert <tom@linuxbrit.co.uk> | 2006-02-08 18:56:23 +0000 |
---|---|---|
committer | Tom Gilbert <tom@linuxbrit.co.uk> | 2006-02-08 18:56:23 +0000 |
commit | 345df89e4d04c89c7cd43e21e918bf0b83bb1205 (patch) | |
tree | f162a801c747aae6f1005f47a0267bb4919a35bc | |
parent | 23f5b9a75731b7c5fcd1c92a77e1cd504abee183 (diff) |
bug pointed on in #64, hopefully now resolved.
-rw-r--r-- | lib/rbot/ircbot.rb | 4 |
1 files 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 |