File Coverage

blib/lib/Net/OSCAR/Callbacks/1/self_information.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::Callbacks;
2             BEGIN {
3 1     1   123 $Net::OSCAR::Callbacks::VERSION = '1.928';
4             }
5 1     1   8 use strict;
  1         3  
  1         36  
6 1     1   7 use warnings;
  1         2  
  1         48  
7 1     1   6 use vars qw($connection $snac $conntype $family $subtype $data $reqid $reqdata $session $protobit %data);
  1         2  
  1         413  
8             sub {
9              
10             $session->{ip} = $data{ip} if $data{ip};
11              
12             if(exists($data{stealth_status})) {
13             my $stealth_state;
14             if($data{stealth_status} & 0x100) {
15             $stealth_state = 1;
16             } else {
17             $stealth_state = 0;
18             }
19              
20             if($stealth_state xor $session->{stealth}) {
21             $connection->log_print(OSCAR_DBG_DEBUG, "Stealth state changed: ", $stealth_state);
22             $session->{stealth} = $stealth_state;
23             $session->callback_stealth_changed($stealth_state);
24             }
25             }
26              
27              
28             if($data{session_length}) {
29             $connection->log_print(OSCAR_DBG_DEBUG, "Someone else signed on with this screenname? Session length == $data{session_length}");
30             }
31              
32             };