File Coverage

blib/lib/Net/OSCAR/ServerCallbacks/19/buddylist_request.pm
Criterion Covered Total %
statement 10 10 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod n/a
total 14 14 100.0


line stmt bran cond sub pod time code
1             package Net::OSCAR::ServerCallbacks;
2             BEGIN {
3 1     1   17 $Net::OSCAR::ServerCallbacks::VERSION = '1.928';
4             }
5 1     1   6 use strict;
  1         2  
  1         23  
6 1     1   5 use warnings;
  1         2  
  1         36  
7 1     1   6 use vars qw($SESSIONS $SCREENNAMES %COOKIES $screenname $connection $snac $conntype $family $subtype $data $reqid $reqdata $session $protobit %data);
  1         2  
  1         368  
8             sub {
9              
10             my $blist;
11              
12             my $visdata = tlv_encode(tlv(
13             0xCA => 0,
14             0xCB => 0xFFFFFFFF,
15             ));
16             $blist = "xxx";
17             $blist .= pack("n5a*", 0, 0, 0xCB, 4, length($visdata), $visdata);
18             $blist .= pack("na*n4", length("Buddies"), "Buddies", 1, 0, 1, 0);
19             my $i = 1;
20             $blist .= pack("na*n4", length($_), $_, 1, $i++, 0, 0) foreach @{$SCREENNAMES->{$screenname}->{blist}};
21              
22             $connection->proto_send(reqid => $reqid, protobit => "buddylist", protodata => {data => $blist});
23              
24             };
25