Changeset 4b9c3b9


Ignore:
Timestamp:
Jan 7, 2014, 6:02:24 PM (8 years ago)
Author:
Jason Gross <jgross@mit.edu>
Children:
cc27237
Parents:
9367711
git-author:
Jason Gross <jgross@mit.edu> (07/27/13 13:08:51)
git-committer:
Jason Gross <jgross@mit.edu> (01/07/14 18:02:24)
Message:
Update IRC logging to be more idiomatic

Based on a message from kini on #oplss at 2013-07-27 12:40:
   freenode / #oplss / kini  2013-07-27 12:40  (kini!kini@unaffiliated/kini)
       jgross: the standard format is "[timestamp] <username> message", one line per message
   freenode / #oplss / kini  2013-07-27 12:41  (kini!kini@unaffiliated/kini)
       non-message events are usually notated as "* event description", e.g. "* kini (unaffiliated/kini) joined
       #oplss", or whatever
File:
1 edited

Legend:

Unmodified
Added
Removed
  • perl/modules/IRC/lib/BarnOwl/Message/IRC.pm

    r33d384a r4b9c3b9  
    110110}
    111111
     112sub log {
     113    my ($m) = @_;
     114    my $sender = $m->sender;
     115    my $timestr = $m->time;
     116    my $body = $m->body;
     117    if ($m->is_loginout) {
     118        return BarnOwl::Message::log($m);
     119    } else {
     120        return "[$timestr] <$sender> $body\n";
     121    }
     122}
     123
    1121241;
Note: See TracChangeset for help on using the changeset viewer.