[1053] in BarnOwl Developers

home help back first fref pref prev next nref lref last post

[D-O-H] r1035 - trunk/owl/perl/modules/IRC/lib/BarnOwl/Message

daemon@ATHENA.MIT.EDU (geofft@MIT.EDU)
Thu Oct 29 18:12:32 2009

Resent-From: nelhage@mit.edu
Resent-To: barnowl-dev-mtg@charon.mit.edu
X-Original-To: nelhage@nelhage.com
Date: Tue, 6 May 2008 01:37:29 -0400 (EDT)
To: dirty-owl-hackers@MIT.EDU
From: geofft@MIT.EDU
Reply-to: dirty-owl-hackers@MIT.EDU

Author: geofft
Date: 2008-05-06 01:37:29 -0400 (Tue, 06 May 2008)
New Revision: 1035

Modified:
   trunk/owl/perl/modules/IRC/lib/BarnOwl/Message/IRC.pm
Log:
IRC: Make M-N mostly, rather than completely, useless.

Modified: trunk/owl/perl/modules/IRC/lib/BarnOwl/Message/IRC.pm
===================================================================
--- trunk/owl/perl/modules/IRC/lib/BarnOwl/Message/IRC.pm	2008-05-05 18:56:52 UTC (rev 1034)
+++ trunk/owl/perl/modules/IRC/lib/BarnOwl/Message/IRC.pm	2008-05-06 05:37:29 UTC (rev 1035)
@@ -38,8 +38,15 @@
         # To a Channel
         my $network = $self->network;
         my $channel = $self->channel;
-        my $filter = "irc-$network-channel-$channel";
-        my $ftext = qq{type ^irc\$ and network ^$network\$ and channel ^$channel\$};
+        my $sender = $self->sender;
+        my ($filter, $ftext);
+        if ($inst && $self->body =~ /^(\S+):/) {
+            $filter = "irc-$network-channel-$channel-$sender-$1";
+            $ftext = qq{type ^irc\$ and network ^$network\$ and channel ^$channel\$ and ( sender ^$sender\$ or sender ^$1\$ )};
+        } else {
+            $filter = "irc-$network-channel-$channel";
+            $ftext = qq{type ^irc\$ and network ^$network\$ and channel ^$channel\$};
+        }
         BarnOwl::filter("$filter $ftext");
         return $filter;
     }


home help back first fref pref prev next nref lref last post