source: perl/modules/AIM/lib/Net/OSCAR/ServerCallbacks/4/outgoing_IM.pm @ a1c2f06

barnowl_perlaim
Last change on this file since a1c2f06 was 7a1c90d, checked in by Geoffrey Thomas <geofft@mit.edu>, 14 years ago
Skeleton AIM module, and Net::OSCAR 1.925
  • Property mode set to 100644
File size: 705 bytes
Line 
1package Net::OSCAR::ServerCallbacks;
2use strict;
3use warnings;
4use vars qw($SESSIONS $SCREENNAMES %COOKIES $screenname $connection $snac $conntype $family $subtype $data $reqid $reqdata $session $protobit %data);
5sub {
6
7my $target = $SESSIONS->{$data{screenname}};
8if(!$target or !$target->{sessions}->[0]) {
9        return srv_send_error($connection, $family, 4);
10}
11
12$connection->proto_send(reqid => $reqid, protobit => "IM_acknowledgement", protodata => {
13        cookie => $data{cookie},
14        channel => $data{channel},
15        screenname => $data{screenname}
16});
17
18
19$data{screenname} = $screenname;
20$data{evil} = 0;
21$data{flags} = 0;
22
23$target->{sessions}->[0]->proto_send(protobit => "incoming_IM", protodata => {%data});
24
25};
26
Note: See TracBrowser for help on using the repository browser.