Changeset e4f33c1ea92b56b09c6e58514c73b9a65bf09922

Show
Ignore:
Timestamp:
08/10/08 16:12:08 (3 months ago)
Author:
Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
git-committer:
Giuseppe Bilotta <giuseppe.bilotta@gmail.com> 1218370328 +0200
git-parent:

[eebdc6973a6ab1089ed18c0ea02e72cd6e656120]

git-author:
Giuseppe Bilotta <giuseppe.bilotta@gmail.com> 1218370328 +0200
Message:

irclog core module: skip, don't die when unable to open logfile

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • lib/rbot/core/irclog.rb

    re862f8f re4f33c1  
    273273        end 
    274274        fp = logfilepath(where_str, now) 
    275         FileUtils.mkdir_p File.dirname(fp) 
    276         f = File.new(fp, "a") 
    277         f.sync = true 
    278         f.puts "[#{stamp}] @ Log started by #{@bot.myself.nick}" 
     275        begin 
     276          FileUtils.mkdir_p File.dirname(fp) 
     277          f = File.new(fp, "a") 
     278          f.sync = true 
     279          f.puts "[#{stamp}] @ Log started by #{@bot.myself.nick}" 
     280        rescue Exception => e 
     281          error e 
     282          next 
     283        end 
    279284        @logs[where_str] = [now, f] 
    280285      end