X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=lib%2Frbot%2Fcore%2Firclog.rb;h=3b3134c205ebe67ce7e0022a839fc4489cd4332b;hb=628bf10d8ad8536b98b85c529fe92e8ac56a9c4d;hp=b848947c00d60761ad59b2776fc2605edc57ebca;hpb=91a9024e21ec8b429605a036b5c9193442a580e3;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git diff --git a/lib/rbot/core/irclog.rb b/lib/rbot/core/irclog.rb index b848947c..3b3134c2 100644 --- a/lib/rbot/core/irclog.rb +++ b/lib/rbot/core/irclog.rb @@ -47,7 +47,7 @@ class IrcLogModule < CoreBotModule end def timestamp(time) - return time.strftime @bot.config['irclog.timestamp_format'] + return time.strftime(@bot.config['irclog.timestamp_format']) end def event_irclog_list_changed(nolist, dolist) @@ -153,7 +153,7 @@ class IrcLogModule < CoreBotModule irclog "@ #{m.source} asked #{who} about #{[m.ctcp, m.message].join(' ')}", logtarget end else - if m.public? + if m.public? irclog "<#{m.source}> #{m.logmessage}", m.target else irclog "<#{m.source}(#{m.sourceaddress})> #{m.logmessage}", m.source @@ -263,7 +263,7 @@ class IrcLogModule < CoreBotModule else where_str = where.downcase.gsub(/[:!?$*()\/\\<>|"']/, "_") end - return unless can_log_on(where_str) + next unless can_log_on(where_str) # close the previous logfile if we're rotating if @logs.has_key? where_str @@ -289,7 +289,7 @@ class IrcLogModule < CoreBotModule # If it's a file, we rename to filename.old.filedate up = dir.dup until File.exist? up - up.replace File.dirname up + up.replace(File.dirname(up)) end unless File.directory? up backup = up.dup