- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
perl/modules/IRC/lib/BarnOwl/Message/IRC.pm
r8df6cbb r38a7f22 20 20 my $inst = shift; 21 21 22 my ($filter, $ftext); 22 my $filter; 23 my @filter; 23 24 24 25 if($self->is_private) { … … 30 31 } 31 32 $filter = "irc-user-$who"; 32 my $ftext = 33 qq{type ^irc\$ and ( ( direction ^in\$ and sender ^$who\$ ) } 34 . qq{or ( direction ^out\$ and recipient ^$who\$ ) ) }; 35 BarnOwl::filter("$filter $ftext"); 33 @filter = 34 (qw{( type ^irc$ and filter personal and }, 35 qw{( ( direction ^in$ and sender}, "^$who\$", 36 qw{ ) or ( direction ^out$ and recipient}, "^$who\$", 37 qw{) ) ) }); 38 BarnOwl::command("filter", "$filter", @filter); 36 39 return $filter; 37 40 } else { … … 43 46 if ($inst && $self->body =~ /^(\S+):/) { 44 47 $filter = "irc-$network-channel-$channel-$sender-$1"; 45 $ftext = qq{type ^irc\$ and network ^$network\$ and channel ^$channel\$ and ( sender ^$sender\$ or sender ^$1\$ )}; 48 @filter = 49 (qw{type ^irc$ and network}, "^$network\$", 50 qw{and channel}, "^$channel\$", 51 qw{and ( sender}, "^$sender\$", 52 qw{or sender}, "^$1\$",qq{)}); 46 53 } else { 47 54 $filter = "irc-$network-channel-$channel"; 48 $ftext = qq{type ^irc\$ and network ^$network\$ and channel ^$channel\$}; 55 @filter = (qw{type ^irc$ and network}, "^$network\$", 56 qw{and channel}, "^$channel\$"); 49 57 } 50 BarnOwl:: filter("$filter $ftext");58 BarnOwl::command("filter", "$filter", @filter); 51 59 return $filter; 52 60 } … … 56 64 sub network {shift->{network}} 57 65 sub channel {shift->{channel}} 66 sub action {shift->{action}} 67 sub reason {shift->{reason}} 58 68 59 69 # display … … 65 75 sub login_type { 66 76 my $self = shift; 67 return " (" . ($self->is_login ? "JOIN" : "PART"). ")";77 return " (" . uc $self->action . ")"; 68 78 } 69 79 70 sub login_extra { shift->channel; } 71 80 sub login_extra { 81 my $self = shift; 82 if ($self->action eq "quit") { 83 return $self->reason; 84 } else { 85 return $self->channel; 86 } 87 } 72 88 73 89 1;
Note: See TracChangeset
for help on using the changeset viewer.