source: perl/modules/AIM/lib/Net/OSCAR/Callbacks/3/buddy_signoff.pm @ 7a1c90d

barnowl_perlaim
Last change on this file since 7a1c90d was 7a1c90d, checked in by Geoffrey Thomas <geofft@mit.edu>, 17 years ago
Skeleton AIM module, and Net::OSCAR 1.925
  • Property mode set to 100644
File size: 687 bytes
Line 
1package Net::OSCAR::Callbacks;
2use strict;
3use warnings;
4use vars qw($connection $snac $conntype $family $subtype $data $reqid $reqdata $session $protobit %data);
5sub {
6
7my $buddy = $data{screenname};
8my($grpname, $group) = $session->findbuddy($buddy);
9return unless $grpname;
10
11                delete $session->{userinfo}->{$buddy};
12my $budinfo = $group->{members}->{$buddy};
13foreach (keys %$budinfo) {
14        delete $budinfo->{$_} unless /^(?:buddyid|data|__BLI.*|alias|online|comment|screenname)$/;
15}
16$budinfo->{online} = 0;
17
18$connection->log_print(OSCAR_DBG_DEBUG, "And so, another former ally has abandoned us.  Curse you, $buddy!");
19$session->callback_buddy_out($budinfo->{screenname}, $grpname);
20
21};
Note: See TracBrowser for help on using the repository browser.