barnowl_perlaim
Last change
on this file since a1c2f06 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:
705 bytes
|
Line | |
---|
1 | package Net::OSCAR::ServerCallbacks; |
---|
2 | use strict; |
---|
3 | use warnings; |
---|
4 | use vars qw($SESSIONS $SCREENNAMES %COOKIES $screenname $connection $snac $conntype $family $subtype $data $reqid $reqdata $session $protobit %data); |
---|
5 | sub { |
---|
6 | |
---|
7 | my $target = $SESSIONS->{$data{screenname}}; |
---|
8 | if(!$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.