Changeset 47225c9


Ignore:
Timestamp:
Aug 16, 2017, 12:53:41 PM (7 years ago)
Author:
Jason Gross <jasongross9@gmail.com>
Branches:
master
Children:
d2ba33c
Parents:
6ddfb07
git-author:
Jason Gross <jgross@mit.edu> (07/27/13 13:08:51)
git-committer:
Jason Gross <jasongross9@gmail.com> (08/16/17 12:53:41)
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

    r15b87cc r47225c9  
    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.