| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Net::OSCAR::Callbacks; |
|
2
|
|
|
|
|
|
|
BEGIN { |
|
3
|
1
|
|
|
1
|
|
40
|
$Net::OSCAR::Callbacks::VERSION = '1.928'; |
|
4
|
|
|
|
|
|
|
} |
|
5
|
1
|
|
|
1
|
|
75
|
use strict; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
45
|
|
|
6
|
1
|
|
|
1
|
|
8
|
use warnings; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
66
|
|
|
7
|
1
|
|
|
1
|
|
8
|
use vars qw($connection $snac $conntype $family $subtype $data $reqid $reqdata $session $protobit %data); |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
147
|
|
|
8
|
1
|
|
|
1
|
|
7
|
use Net::OSCAR::Utility qw(millitime); |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
926
|
|
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub { |
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
$connection->unpause(); |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
if($session->{rate_manage_mode} != OSCAR_RATE_MANAGE_NONE) { |
|
15
|
|
|
|
|
|
|
$connection->{rate_limits} ||= {classmap => {}}; |
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
my $rinfo = $connection->{rate_limits}; |
|
18
|
|
|
|
|
|
|
my $time = millitime(); |
|
19
|
|
|
|
|
|
|
foreach my $class (@{$data{classes}}) { |
|
20
|
|
|
|
|
|
|
$class->{time_offset} = $time - $class->{last_time}; |
|
21
|
|
|
|
|
|
|
$rinfo->{$class->{class_id}} = $class; |
|
22
|
|
|
|
|
|
|
} |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
my $map = $rinfo->{classmap}; |
|
25
|
|
|
|
|
|
|
foreach my $class (@{$data{classmembers}}) { |
|
26
|
|
|
|
|
|
|
my $id = $class->{class_id}; |
|
27
|
|
|
|
|
|
|
foreach my $snacfam (@{$class->{snacs}}) { |
|
28
|
|
|
|
|
|
|
my $key = pack("nn", $snacfam->{family}, $snacfam->{subtype}); |
|
29
|
|
|
|
|
|
|
$map->{$key} = $id; |
|
30
|
|
|
|
|
|
|
} |
|
31
|
|
|
|
|
|
|
} |
|
32
|
|
|
|
|
|
|
} |
|
33
|
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
$connection->proto_send(protobit => "rate_acknowledgement", |
|
35
|
|
|
|
|
|
|
classes => [map {$_->{class_id}} @{$data{classes}}]); |
|
36
|
|
|
|
|
|
|
$connection->log_print(OSCAR_DBG_NOTICE, "BOS handshake complete!"); |
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
if($conntype == CONNTYPE_BOS) { |
|
39
|
|
|
|
|
|
|
$connection->log_print(OSCAR_DBG_SIGNON, "Signon BOS handshake complete!"); |
|
40
|
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
$connection->proto_send(protobit => "personal_info_request"); |
|
42
|
|
|
|
|
|
|
$session->set_stealth(1) if $session->{stealth}; |
|
43
|
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
$connection->proto_send(protobit => "buddylist_rights_request"); |
|
45
|
|
|
|
|
|
|
$connection->proto_send(protobit => "buddylist_request"); |
|
46
|
|
|
|
|
|
|
$connection->proto_send(protobit => "locate_rights_request"); |
|
47
|
|
|
|
|
|
|
$connection->proto_send(protobit => "buddy_rights_request"); |
|
48
|
|
|
|
|
|
|
$connection->proto_send(protobit => "IM_parameter_request"); |
|
49
|
|
|
|
|
|
|
$connection->proto_send(protobit => "BOS_rights_request"); |
|
50
|
|
|
|
|
|
|
} elsif($conntype == CONNTYPE_CHAT) { |
|
51
|
|
|
|
|
|
|
$connection->ready(); |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
$session->callback_chat_joined($connection->name, $connection) unless $connection->{sent_joined}++; |
|
54
|
|
|
|
|
|
|
} else { |
|
55
|
|
|
|
|
|
|
if($conntype == CONNTYPE_CHATNAV) { |
|
56
|
|
|
|
|
|
|
$connection->proto_send(protobit => "chat_navigator_rights_request"); |
|
57
|
|
|
|
|
|
|
} |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
$session->{services}->{$conntype} = $connection; |
|
60
|
|
|
|
|
|
|
$connection->ready(); |
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
if($session->{svcqueues}->{$conntype}) { |
|
63
|
|
|
|
|
|
|
foreach my $proto_item(@{$session->{svcqueues}->{$conntype}}) { |
|
64
|
|
|
|
|
|
|
$connection->proto_send(%$proto_item); |
|
65
|
|
|
|
|
|
|
} |
|
66
|
|
|
|
|
|
|
} |
|
67
|
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
delete $session->{svcqueues}->{$conntype}; |
|
69
|
|
|
|
|
|
|
} |
|
70
|
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
}; |