Changeset 0da506c for perl/modules/jabber.pl
- Timestamp:
- Jan 26, 2007, 4:52:37 PM (18 years ago)
- 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:
- ac1bbe2
- Parents:
- c25a20f
- git-author:
- Nelson Elhage <nelhage@mit.edu> (01/26/07 16:41:33)
- git-committer:
- Nelson Elhage <nelhage@mit.edu> (01/26/07 16:52:37)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
perl/modules/jabber.pl
rc25a20f r0da506c 1414 1414 die("Unable to resolve account $from") unless $from_jid; 1415 1415 $to_jid = resolveDestJID($to, $from_jid); 1416 push @matches, [$from_jid, $to_jid] ;1416 push @matches, [$from_jid, $to_jid] if $to_jid; 1417 1417 } else { 1418 1418 for my $f ($conn->getJIDs) { … … 1461 1461 $user = $self->to; 1462 1462 } 1463 $user = Net::Jabber::JID->new($user)->GetJID($inst ? 'full' : 'base'); 1464 $filter = "jabber-user-$user"; 1465 $ftext = qq{type ^jabber\$ and ( ( direction ^in\$ and from ^$user ) } . 1466 qq{or ( direction ^out\$ and to ^$user ) ) }; 1467 BarnOwl::filter("$filter $ftext"); 1468 return $filter; 1463 return smartfilter_user($user, $inst); 1469 1464 } elsif ($self->jtype eq 'groupchat') { 1470 1465 my $room = $self->room; … … 1473 1468 BarnOwl::filter("$filter $ftext"); 1474 1469 return $filter; 1475 } 1476 } 1470 } elsif ($self->login ne 'none') { 1471 return smartfilter_user($self->from, $inst); 1472 } 1473 } 1474 1475 sub smartfilter_user { 1476 my $user = shift; 1477 my $inst = shift; 1478 1479 $user = Net::Jabber::JID->new($user)->GetJID( $inst ? 'full' : 'base' ); 1480 my $filter = "jabber-user-$user"; 1481 my $ftext = 1482 qq{type ^jabber\$ and ( ( direction ^in\$ and from ^$user ) } 1483 . qq{or ( direction ^out\$ and to ^$user ) ) }; 1484 BarnOwl::filter("$filter $ftext"); 1485 return $filter; 1486 1487 } 1488 1477 1489 1478 1490 1;
Note: See TracChangeset
for help on using the changeset viewer.