Changeset 0e52069 for perl/modules


Ignore:
Timestamp:
Jan 9, 2008, 12:26:15 AM (17 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, barnowl_perlaim, debian, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
380b1ab
Parents:
2c40dc0
git-author:
Nelson Elhage <nelhage@mit.edu> (01/09/08 00:25:13)
git-committer:
Nelson Elhage <nelhage@mit.edu> (01/09/08 00:26:15)
Message:
Implement smartnarrow on channels
Location:
perl/modules/IRC/lib/BarnOwl
Files:
3 edited

Legend:

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

    r2c40dc0 r0e52069  
    3636        return $filter;
    3737    } else {
    38         # Unimplemented
    39         return undef;
     38        # To a Channel
     39        my $network = $self->network;
     40        my $channel = $self->channel;
     41        my $filter = "irc-$network-channel-$channel";
     42        my $ftext = qq{type ^irc\$ and network ^$network\$ and channel ^$channel\$};
     43        BarnOwl::filter("$filter $ftext");
     44        return $filter;
    4045    }
    4146}
     
    4348sub server {shift->{server}}
    4449sub network {shift->{network}}
     50sub channel {shift->{channel}}
    4551
    4652# display
  • perl/modules/IRC/lib/BarnOwl/Module/IRC.pm

    r2c40dc0 r0e52069  
    154154        sender      => $conn->nick,
    155155        is_private($to) ?
    156           (isprivate  => 'true') : (),
     156          (isprivate  => 'true') : (channel => $to),
    157157        replycmd    => "irc-msg $to",
    158158        replysendercmd => "irc-msg $to"
  • perl/modules/IRC/lib/BarnOwl/Module/IRC/Connection.pm

    r2c40dc0 r0e52069  
    6767          (notice     => 'true') : (),
    6868        is_private($recipient) ?
    69           (isprivate  => 'true') : (),
     69          (isprivate  => 'true') : (channel => $recipient),
    7070        replycmd    => 'irc-msg ' .
    7171            (is_private($recipient) ? $evt->nick : $recipient),
Note: See TracChangeset for help on using the changeset viewer.