| 1 | #$Id: clihub.pm 998 2013-08-14 12:21:20Z pro $ $URL: svn://svn.setun.net/dcppp/trunk/lib/Net/DirectConnect/clihub.pm $ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | package #hide from cpan | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3 | Net::DirectConnect::clihub; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4 | 1 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5 | 1 | ▶ | no strict qw(refs); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 6 | 1 | ▶ | use warnings "NONFATAL" => "all"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 7 | 1 | ▶ | no warnings qw(uninitialized); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 8 | 1 | ▶ | no if $] >= 5.017011, warnings => 'experimental::smartmatch'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 9 | 1 | ▶ | use utf8; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 10 | 1 | ▶ | use Time::HiRes qw(time sleep); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 11 | 1 | ▶ | use Data::Dumper; #dev only | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 12 | 1 | $Data::Dumper::Sortkeys = $Data::Dumper::Indent = 1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 13 | 1 | ▶ | use Net::DirectConnect; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 14 | 1 | ▶ | use Net::DirectConnect::clicli; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 15 | #use Net::DirectConnect::http; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 16 | 1 | our $VERSION = ( split( ' ', '$Revision: 998 $' ) )[1]; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 17 | 1 | ▶ | use base 'Net::DirectConnect'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 18 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 19 | 0 | ▶ | sub name_to_ip($) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
name_to_ip: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 20 | 0 | my ($name) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 21 | 0 | ▶ | unless ( $name =~ /^\d+\.\d+\.\d+\.\d+$/ ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 22 | 0 | local $_ = ( gethostbyname($name) )[4]; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 23 | 0 | ▶ | return ( $name, 1 ) unless length($_) == 4; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 24 | 0 | $name = inet_ntoa($_); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 25 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 26 | 0 | return $name; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 27 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 28 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 29 | 0 | ▶ | sub init { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
init: not called CC=14 SCAR=53.5
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 30 | 0 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 31 | #%$self = ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 32 | #%$self, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 33 | 0 | local %_ = ( | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 34 | 'Nick' => 'NetDCBot', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 35 | 'port' => 411, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 36 | 'host' => 'localhost', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 37 | 'Pass' => '', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 38 | 'key' => 'zzz', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 39 | #'auto_wait' => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 40 | 'supports_avail' => [ qw( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 41 | NoGetINFO | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 42 | NoHello | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 43 | UserIP2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 44 | UserCommand | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 45 | TTHSearch | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 46 | OpPlus | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 47 | Feed | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 48 | MCTo | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 49 | HubTopic | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 50 | ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 51 | ], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 52 | 'search_every' => 10, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 53 | 'search_every_min' => 10, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 54 | 'auto_connect' => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 55 | 'auto_bug' => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 56 | 'reconnects' => 99999, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 57 | 'NoGetINFO' => 1, #test | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 58 | 'NoHello' => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 59 | 'UserIP2' => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 60 | 'TTHSearch' => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 61 | 'Version' => '1,0091', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 62 | 'auto_GetNickList' => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 63 | 'follow_forcemove' => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 64 | 'incomingclass' => 'Net::DirectConnect::clicli', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 65 | 'disconnect_recursive' => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 66 | ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 67 | 0 | ▶ | $self->{$_} //= $_{$_} for keys %_; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
$self->{$_} //= $_{$_}
MC/DC0%0/2
$self->{$_} //= $_{$_}
$self->{$_}
$_{$_}
Truth table0%0/3
A //= B
A= $self->{$_}B= $_{$_}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 68 | 0 | ▶ | $self->{'periodic'}{ __FILE__ . __LINE__ } = sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=3 SCAR=24.8
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 69 | 0 | ▶ | my $self = shift if ref $_[0]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 70 | 0 | ▶ | $self->search_buffer() if $self->{'socket'}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 71 | 0 | }; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 72 | #$self->log($self, 'inited',"MT:$self->{'message_type'}", ' with', Dumper \@_); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 73 | #$self->baseinit(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 74 | #share_full share_tth want | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 75 | 0 | ▶ | $self->{$_} ||= $self->{'parent'}{$_} ||= {} for qw( NickList IpList PortList PortList_udp); #handler | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/5
$self->{$_} ||= ($self->{"parent"}{$_} ||= {})
$self->{"parent"}{$_} ||= {}
MC/DC0%0/2
$self->{$_} ||= ($self->{"parent"}{$_} ||= {})
$self->{$_}
($self->{"parent"}{$_} ||= {})
MC/DC0%0/1
$self->{"parent"}{$_} ||= {}
$self->{"parent"}{$_}
Truth table0%0/3
A ||= B
A= $self->{$_}B= ($self->{"parent"}{$_} ||= {})
Truth table0%0/2
A
A= $self->{"parent"}{$_}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 76 | #$self->{'NickList'} ||= {}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 77 | #$self->{'IpList'} ||= {}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 78 | #$self->{'PortList'} ||= {}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 79 | #$self->log( $self, 'inited3', "MT:$self->{'message_type'}", ' with' ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 80 | #You are already in the hub. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 81 | # $self->{'parse'} ||= { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 82 | 0 | $self->module_load('filelist'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 83 | local %_ = ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 84 | 0 | ▶ | 'chatline' => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=24 SCAR=64.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 85 | 0 | ▶ | my $self = shift if ref $_[0]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 86 | #$self->log( 'dev', Dumper \@_); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 87 | 0 | my ( $nick, $text ) = $_[0] =~ /^(?:<|\* )(.+?)>? (.+)$/s; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 88 | #$self->log('dcdev', 'chatline parse', Dumper(\@_,$nick, $text)); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 89 | $self->log( 'warn', "[$nick] oper: already in the hub [$self->{'Nick'}]" ), $self->nick_generate(), $self->reconnect(), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 90 | 0 | ▶ | if ( ( !keys %{ $self->{'NickList'} } or $self->{'NickList'}{$nick}{'oper'} ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/6
!keys(%{$$self{"NickList"};}) || $self->{"NickList"}{$nick}{"oper"} and $text eq "You are already in the hub."
not keys %{$$self{"NickList"};} or $self->{"NickList"}{$nick}{"oper"}
MC/DC0%0/3
!keys(%{$$self{"NickList"};}) || $self->{"NickList"}{$nick}{"oper"} and $text eq "You are already in the hub."
not keys %{$$self{"NickList"};}
$self->{"NickList"}{$nick}{"oper"}
$text eq "You are already in the hub."
Truth table0%0/5
not(A) or B and C
A= not keys %{$$self{"NickList"};}B= $self->{"NickList"}{$nick}{"oper"}C= $text eq "You are already in the hub."
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 91 | and $text eq 'You are already in the hub.' ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 92 | 0 | ▶ | if ( $self->{'NickList'}{$nick}{'oper'} or $self->{'NickList'}{$nick}{'hubbot'} or $nick eq 'Hub-Security' ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/6
$self->{"NickList"}{$nick}{"oper"} or $self->{"NickList"}{$nick}{"hubbot"} or $nick eq "Hub-Security"
$self->{"NickList"}{$nick}{"oper"} or $self->{"NickList"}{$nick}{"hubbot"}
MC/DC0%0/3
$self->{"NickList"}{$nick}{"oper"} or $self->{"NickList"}{$nick}{"hubbot"} or $nick eq "Hub-Security"
$self->{"NickList"}{$nick}{"oper"}
$self->{"NickList"}{$nick}{"hubbot"}
$nick eq "Hub-Security"
Truth table0%0/4
A or B or C
A= $self->{"NickList"}{$nick}{"oper"}B= $self->{"NickList"}{$nick}{"hubbot"}C= $nick eq "Hub-Security"
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 93 | 0 | ▶ | if ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/12
$text =~ /\x{41c}\x{438}\x{43d}\x{438}\x{43c}\x{430}\x{43b}\x{44c}\x{43d}\x{44b}\x{439} \x{438}\x{43d}\x{442}\x{435}\x{440}\x{432}\x{430}\x{43b} \x{43f}\x{43e}\x{438}\x{441}\x{43a}\x{430} \x{441}\x{43e}\x{441}\x{442}\x{430}\x{432}\x{43b}\x{44f}\x{435}\x{442}: \(Minimum search interval is:\) (\d+)\x{441}\x{435}\x{43a}\x{443}\x{43d}\x{434} \(seconds\)/ or $text =~ /^(?:Minimum search interval is|\x{41c}\x{438}\x{43d}\x{438}\x{43c}\x{430}\x{43b}\x{44c}\x{43d}\x{44b}\x{439} \x{438}\x{43d}\x{442}\x{435}\x{440}\x{432}\x{430}\x{43b} \x{43f}\x{43e}\x{438}\x{441}\x{43a}\x{430}):(\d+)s/ or $text =~ /Search ignored\. Please leave at least (\d+) seconds between search attempts\./ or $text =~ /\x{41c}\x{438}\x{43d}\x{438}\x{43c}\x{430}\x{43b}\x{44c}\x{43d}\x{44b}\x{439} \x{438}\x{43d}\x{442}\x{435}\x{440}\x{432}\x{430}\x{43b} \x{43c}\x{435}\x{436}\x{434}\x{443} \x{43f}\x{43e}\x{438}\x{441}\x{43a}\x{43e}\x{432}\x{44b}\x{43c}\x{438} \x{437}\x{430}\x{43f}\x{440}\x{43e}\x{441}\x{430}\x{43c}\x{438}:(\d+)\x{441}\x{435}\x{43a}., \x{43f}\x{43e}\x{43f}\x{440}\x{43e}\x{431}\x{443}\x{439}\x{442}\x{435} \x{447}\x{443}\x{442}\x{44c} \x{43f}\x{43e}\x{437}\x{436}\x{435}/ or $text =~ /You can do 1 searches in (\d+) seconds/
$text =~ /\x{41c}\x{438}\x{43d}\x{438}\x{43c}\x{430}\x{43b}\x{44c}\x{43d}\x{44b}\x{439} \x{438}\x{43d}\x{442}\x{435}\x{440}\x{432}\x{430}\x{43b} \x{43f}\x{43e}\x{438}\x{441}\x{43a}\x{430} \x{441}\x{43e}\x{441}\x{442}\x{430}\x{432}\x{43b}\x{44f}\x{435}\x{442}: \(Minimum search interval is:\) (\d+)\x{441}\x{435}\x{43a}\x{443}\x{43d}\x{434} \(seconds\)/ or $text =~ /^(?:Minimum search interval is|\x{41c}\x{438}\x{43d}\x{438}\x{43c}\x{430}\x{43b}\x{44c}\x{43d}\x{44b}\x{439} \x{438}\x{43d}\x{442}\x{435}\x{440}\x{432}\x{430}\x{43b} \x{43f}\x{43e}\x{438}\x{441}\x{43a}\x{430}):(\d+)s/ or $text =~ /Search ignored\. Please leave at least (\d+) seconds between search attempts\./ or $text =~ /\x{41c}\x{438}\x{43d}\x{438}\x{43c}\x{430}\x{43b}\x{44c}\x{43d}\x{44b}\x{439} \x{438}\x{43d}\x{442}\x{435}\x{440}\x{432}\x{430}\x{43b} \x{43c}\x{435}\x{436}\x{434}\x{443} \x{43f}\x{43e}\x{438}\x{441}\x{43a}\x{43e}\x{432}\x{44b}\x{43c}\x{438} \x{437}\x{430}\x{43f}\x{440}\x{43e}\x{441}\x{430}\x{43c}\x{438}:(\d+)\x{441}\x{435}\x{43a}., \x{43f}\x{43e}\x{43f}\x{440}\x{43e}\x{431}\x{443}\x{439}\x{442}\x{435} \x{447}\x{443}\x{442}\x{44c} \x{43f}\x{43e}\x{437}\x{436}\x{435}/
$text =~ /\x{41c}\x{438}\x{43d}\x{438}\x{43c}\x{430}\x{43b}\x{44c}\x{43d}\x{44b}\x{439} \x{438}\x{43d}\x{442}\x{435}\x{440}\x{432}\x{430}\x{43b} \x{43f}\x{43e}\x{438}\x{441}\x{43a}\x{430} \x{441}\x{43e}\x{441}\x{442}\x{430}\x{432}\x{43b}\x{44f}\x{435}\x{442}: \(Minimum search interval is:\) (\d+)\x{441}\x{435}\x{43a}\x{443}\x{43d}\x{434} \(seconds\)/ or $text =~ /^(?:Minimum search interval is|\x{41c}\x{438}\x{43d}\x{438}\x{43c}\x{430}\x{43b}\x{44c}\x{43d}\x{44b}\x{439} \x{438}\x{43d}\x{442}\x{435}\x{440}\x{432}\x{430}\x{43b} \x{43f}\x{43e}\x{438}\x{441}\x{43a}\x{430}):(\d+)s/ or $text =~ /Search ignored\. Please leave at least (\d+) seconds between search attempts\./
$text =~ /\x{41c}\x{438}\x{43d}\x{438}\x{43c}\x{430}\x{43b}\x{44c}\x{43d}\x{44b}\x{439} \x{438}\x{43d}\x{442}\x{435}\x{440}\x{432}\x{430}\x{43b} \x{43f}\x{43e}\x{438}\x{441}\x{43a}\x{430} \x{441}\x{43e}\x{441}\x{442}\x{430}\x{432}\x{43b}\x{44f}\x{435}\x{442}: \(Minimum search interval is:\) (\d+)\x{441}\x{435}\x{43a}\x{443}\x{43d}\x{434} \(seconds\)/ or $text =~ /^(?:Minimum search interval is|\x{41c}\x{438}\x{43d}\x{438}\x{43c}\x{430}\x{43b}\x{44c}\x{43d}\x{44b}\x{439} \x{438}\x{43d}\x{442}\x{435}\x{440}\x{432}\x{430}\x{43b} \x{43f}\x{43e}\x{438}\x{441}\x{43a}\x{430}):(\d+)s/
MC/DC0%0/5
$text =~ /\x{41c}\x{438}\x{43d}\x{438}\x{43c}\x{430}\x{43b}\x{44c}\x{43d}\x{44b}\x{439} \x{438}\x{43d}\x{442}\x{435}\x{440}\x{432}\x{430}\x{43b} \x{43f}\x{43e}\x{438}\x{441}\x{43a}\x{430} \x{441}\x{43e}\x{441}\x{442}\x{430}\x{432}\x{43b}\x{44f}\x{435}\x{442}: \(Minimum search interval is:\) (\d+)\x{441}\x{435}\x{43a}\x{443}\x{43d}\x{434} \(seconds\)/ or $text =~ /^(?:Minimum search interval is|\x{41c}\x{438}\x{43d}\x{438}\x{43c}\x{430}\x{43b}\x{44c}\x{43d}\x{44b}\x{439} \x{438}\x{43d}\x{442}\x{435}\x{440}\x{432}\x{430}\x{43b} \x{43f}\x{43e}\x{438}\x{441}\x{43a}\x{430}):(\d+)s/ or $text =~ /Search ignored\. Please leave at least (\d+) seconds between search attempts\./ or $text =~ /\x{41c}\x{438}\x{43d}\x{438}\x{43c}\x{430}\x{43b}\x{44c}\x{43d}\x{44b}\x{439} \x{438}\x{43d}\x{442}\x{435}\x{440}\x{432}\x{430}\x{43b} \x{43c}\x{435}\x{436}\x{434}\x{443} \x{43f}\x{43e}\x{438}\x{441}\x{43a}\x{43e}\x{432}\x{44b}\x{43c}\x{438} \x{437}\x{430}\x{43f}\x{440}\x{43e}\x{441}\x{430}\x{43c}\x{438}:(\d+)\x{441}\x{435}\x{43a}., \x{43f}\x{43e}\x{43f}\x{440}\x{43e}\x{431}\x{443}\x{439}\x{442}\x{435} \x{447}\x{443}\x{442}\x{44c} \x{43f}\x{43e}\x{437}\x{436}\x{435}/ or $text =~ /You can do 1 searches in (\d+) seconds/
$text =~ /\x{41c}\x{438}\x{43d}\x{438}\x{43c}\x{430}\x{43b}\x{44c}\x{43d}\x{44b}\x{439} \x{438}\x{43d}\x{442}\x{435}\x{440}\x{432}\x{430}\x{43b} \x{43f}\x{43e}\x{438}\x{441}\x{43a}\x{430} \x{441}\x{43e}\x{441}\x{442}\x{430}\x{432}\x{43b}\x{44f}\x{435}\x{442}: \(Minimum search interval is:\) (\d+)\x{441}\x{435}\x{43a}\x{443}\x{43d}\x{434} \(seconds\)/
$text =~ /^(?:Minimum search interval is|\x{41c}\x{438}\x{43d}\x{438}\x{43c}\x{430}\x{43b}\x{44c}\x{43d}\x{44b}\x{439} \x{438}\x{43d}\x{442}\x{435}\x{440}\x{432}\x{430}\x{43b} \x{43f}\x{43e}\x{438}\x{441}\x{43a}\x{430}):(\d+)s/
$text =~ /Search ignored\. Please leave at least (\d+) seconds between search attempts\./
$text =~ /\x{41c}\x{438}\x{43d}\x{438}\x{43c}\x{430}\x{43b}\x{44c}\x{43d}\x{44b}\x{439} \x{438}\x{43d}\x{442}\x{435}\x{440}\x{432}\x{430}\x{43b} \x{43c}\x{435}\x{436}\x{434}\x{443} \x{43f}\x{43e}\x{438}\x{441}\x{43a}\x{43e}\x{432}\x{44b}\x{43c}\x{438} \x{437}\x{430}\x{43f}\x{440}\x{43e}\x{441}\x{430}\x{43c}\x{438}:(\d+)\x{441}\x{435}\x{43a}., \x{43f}\x{43e}\x{43f}\x{440}\x{43e}\x{431}\x{443}\x{439}\x{442}\x{435} \x{447}\x{443}\x{442}\x{44c} \x{43f}\x{43e}\x{437}\x{436}\x{435}/
$text =~ /You can do 1 searches in (\d+) seconds/
Truth table0%0/6
A or B or C or D or E
A= $text =~ /\x{41c}\x{438}\x{43d}\x{438}\x{43c}\x{430}\x{43b}\x{44c}\x{43d}\x{44b}\x{439} \x{438}\x{43d}\x{442}\x{435}\x{440}\x{432}\x{430}\x{43b} \x{43f}\x{43e}\x{438}\x{441}\x{43a}\x{430} \x{441}\x{43e}\x{441}\x{442}\x{430}\x{432}\x{43b}\x{44f}\x{435}\x{442}: \(Minimum search interval is:\) (\d+)\x{441}\x{435}\x{43a}\x{443}\x{43d}\x{434} \(seconds\)/B= $text =~ /^(?:Minimum search interval is|\x{41c}\x{438}\x{43d}\x{438}\x{43c}\x{430}\x{43b}\x{44c}\x{43d}\x{44b}\x{439} \x{438}\x{43d}\x{442}\x{435}\x{440}\x{432}\x{430}\x{43b} \x{43f}\x{43e}\x{438}\x{441}\x{43a}\x{430}):(\d+)s/C= $text =~ /Search ignored\. Please leave at least (\d+) seconds between search attempts\./D= $text =~ /\x{41c}\x{438}\x{43d}\x{438}\x{43c}\x{430}\x{43b}\x{44c}\x{43d}\x{44b}\x{439} \x{438}\x{43d}\x{442}\x{435}\x{440}\x{432}\x{430}\x{43b} \x{43c}\x{435}\x{436}\x{434}\x{443} \x{43f}\x{43e}\x{438}\x{441}\x{43a}\x{43e}\x{432}\x{44b}\x{43c}\x{438} \x{437}\x{430}\x{43f}\x{440}\x{43e}\x{441}\x{430}\x{43c}\x{438}:(\d+)\x{441}\x{435}\x{43a}., \x{43f}\x{43e}\x{43f}\x{440}\x{43e}\x{431}\x{443}\x{439}\x{442}\x{435} \x{447}\x{443}\x{442}\x{44c} \x{43f}\x{43e}\x{437}\x{436}\x{435}/E= $text =~ /You can do 1 searches in (\d+) seconds/
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 94 | $text =~ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 95 | /Минимальный интервал поиска составляет: \(Minimum search interval is:\) (\d+)секунд \(seconds\)/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 96 | or $text =~ /^(?:Minimum search interval is|Минимальный интервал поиска):(\d+)s/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 97 | or $text =~ /Search ignored\. Please leave at least (\d+) seconds between search attempts\./ #Hub-Security opendchub | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 98 | or $text =~ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 99 | /Минимальный интервал между поисковыми запросами:(\d+)сек., попробуйте чуть позже/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 100 | or $text =~ /You can do 1 searches in (\d+) seconds/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 101 | ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 102 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 103 | 0 | ▶ | $self->{'search_every'} = int( rand(5) + $1 || $self->{'search_every_min'} ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
rand(5) + $1 || $self->{'search_every_min'}
MC/DC0%0/2
rand(5) + $1 || $self->{'search_every_min'}
rand(5) + $1
$self->{'search_every_min'}
Truth table0%0/3
A || B
A= rand(5) + $1B= $self->{'search_every_min'}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 104 | 0 | $self->log( 'warn', "[$nick] oper: set min interval = $self->{'search_every'}" ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 105 | 0 | $self->search_retry(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 106 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 107 | 0 | ▶ | if ( $text =~ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/12
$text =~ /(?:\x{41f}\x{43e}\x{436}\x{430}\x{43b}\x{443}\x{439}\x{441}\x{442}\x{430} )?\x{43f}\x{43e}\x{434}\x{43e}\x{436}\x{434}\x{438}\x{442}\x{435} (\d+) \x{441}\x{435}\x{43a}\x{443}\x{43d}\x{434} \x{43f}\x{435}\x{440}\x{435}\x{434} \x{441}\x{43b}\x{435}\x{434}\x{443}\x{44e}\x{449}\x{438}\x{43c} \x{43f}\x{43e}\x{438}\x{441}\x{43a}\x{43e}\x{43c}\./i or $text =~ /(?:Please )?wait (\d+) seconds before next search\./i or $text eq "\x{41f}\x{43e}\x{436}\x{430}\x{43b}\x{443}\x{439}\x{441}\x{442}\x{430} \x{43d}\x{435} \x{438}\x{441}\x{43f}\x{43e}\x{43b}\x{44c}\x{437}\x{443}\x{439}\x{442}\x{435} \x{43f}\x{43e}\x{438}\x{441}\x{43a} \x{442}\x{430}\x{43a} \x{447}\x{430}\x{441}\x{442}\x{43e}!" or $text eq "Please don't flood with searches!" or $text eq "Sorry Hub is busy now, no search, try later.."
$text =~ /(?:\x{41f}\x{43e}\x{436}\x{430}\x{43b}\x{443}\x{439}\x{441}\x{442}\x{430} )?\x{43f}\x{43e}\x{434}\x{43e}\x{436}\x{434}\x{438}\x{442}\x{435} (\d+) \x{441}\x{435}\x{43a}\x{443}\x{43d}\x{434} \x{43f}\x{435}\x{440}\x{435}\x{434} \x{441}\x{43b}\x{435}\x{434}\x{443}\x{44e}\x{449}\x{438}\x{43c} \x{43f}\x{43e}\x{438}\x{441}\x{43a}\x{43e}\x{43c}\./i or $text =~ /(?:Please )?wait (\d+) seconds before next search\./i or $text eq "\x{41f}\x{43e}\x{436}\x{430}\x{43b}\x{443}\x{439}\x{441}\x{442}\x{430} \x{43d}\x{435} \x{438}\x{441}\x{43f}\x{43e}\x{43b}\x{44c}\x{437}\x{443}\x{439}\x{442}\x{435} \x{43f}\x{43e}\x{438}\x{441}\x{43a} \x{442}\x{430}\x{43a} \x{447}\x{430}\x{441}\x{442}\x{43e}!" or $text eq "Please don't flood with searches!"
$text =~ /(?:\x{41f}\x{43e}\x{436}\x{430}\x{43b}\x{443}\x{439}\x{441}\x{442}\x{430} )?\x{43f}\x{43e}\x{434}\x{43e}\x{436}\x{434}\x{438}\x{442}\x{435} (\d+) \x{441}\x{435}\x{43a}\x{443}\x{43d}\x{434} \x{43f}\x{435}\x{440}\x{435}\x{434} \x{441}\x{43b}\x{435}\x{434}\x{443}\x{44e}\x{449}\x{438}\x{43c} \x{43f}\x{43e}\x{438}\x{441}\x{43a}\x{43e}\x{43c}\./i or $text =~ /(?:Please )?wait (\d+) seconds before next search\./i or $text eq "\x{41f}\x{43e}\x{436}\x{430}\x{43b}\x{443}\x{439}\x{441}\x{442}\x{430} \x{43d}\x{435} \x{438}\x{441}\x{43f}\x{43e}\x{43b}\x{44c}\x{437}\x{443}\x{439}\x{442}\x{435} \x{43f}\x{43e}\x{438}\x{441}\x{43a} \x{442}\x{430}\x{43a} \x{447}\x{430}\x{441}\x{442}\x{43e}!"
$text =~ /(?:\x{41f}\x{43e}\x{436}\x{430}\x{43b}\x{443}\x{439}\x{441}\x{442}\x{430} )?\x{43f}\x{43e}\x{434}\x{43e}\x{436}\x{434}\x{438}\x{442}\x{435} (\d+) \x{441}\x{435}\x{43a}\x{443}\x{43d}\x{434} \x{43f}\x{435}\x{440}\x{435}\x{434} \x{441}\x{43b}\x{435}\x{434}\x{443}\x{44e}\x{449}\x{438}\x{43c} \x{43f}\x{43e}\x{438}\x{441}\x{43a}\x{43e}\x{43c}\./i or $text =~ /(?:Please )?wait (\d+) seconds before next search\./i
MC/DC0%0/5
$text =~ /(?:\x{41f}\x{43e}\x{436}\x{430}\x{43b}\x{443}\x{439}\x{441}\x{442}\x{430} )?\x{43f}\x{43e}\x{434}\x{43e}\x{436}\x{434}\x{438}\x{442}\x{435} (\d+) \x{441}\x{435}\x{43a}\x{443}\x{43d}\x{434} \x{43f}\x{435}\x{440}\x{435}\x{434} \x{441}\x{43b}\x{435}\x{434}\x{443}\x{44e}\x{449}\x{438}\x{43c} \x{43f}\x{43e}\x{438}\x{441}\x{43a}\x{43e}\x{43c}\./i or $text =~ /(?:Please )?wait (\d+) seconds before next search\./i or $text eq "\x{41f}\x{43e}\x{436}\x{430}\x{43b}\x{443}\x{439}\x{441}\x{442}\x{430} \x{43d}\x{435} \x{438}\x{441}\x{43f}\x{43e}\x{43b}\x{44c}\x{437}\x{443}\x{439}\x{442}\x{435} \x{43f}\x{43e}\x{438}\x{441}\x{43a} \x{442}\x{430}\x{43a} \x{447}\x{430}\x{441}\x{442}\x{43e}!" or $text eq "Please don't flood with searches!" or $text eq "Sorry Hub is busy now, no search, try later.."
$text =~ /(?:\x{41f}\x{43e}\x{436}\x{430}\x{43b}\x{443}\x{439}\x{441}\x{442}\x{430} )?\x{43f}\x{43e}\x{434}\x{43e}\x{436}\x{434}\x{438}\x{442}\x{435} (\d+) \x{441}\x{435}\x{43a}\x{443}\x{43d}\x{434} \x{43f}\x{435}\x{440}\x{435}\x{434} \x{441}\x{43b}\x{435}\x{434}\x{443}\x{44e}\x{449}\x{438}\x{43c} \x{43f}\x{43e}\x{438}\x{441}\x{43a}\x{43e}\x{43c}\./i
$text =~ /(?:Please )?wait (\d+) seconds before next search\./i
$text eq "\x{41f}\x{43e}\x{436}\x{430}\x{43b}\x{443}\x{439}\x{441}\x{442}\x{430} \x{43d}\x{435} \x{438}\x{441}\x{43f}\x{43e}\x{43b}\x{44c}\x{437}\x{443}\x{439}\x{442}\x{435} \x{43f}\x{43e}\x{438}\x{441}\x{43a} \x{442}\x{430}\x{43a} \x{447}\x{430}\x{441}\x{442}\x{43e}!"
$text eq "Please don't flood with searches!"
$text eq "Sorry Hub is busy now, no search, try later.."
Truth table0%0/6
A or B or C or D or E
A= $text =~ /(?:\x{41f}\x{43e}\x{436}\x{430}\x{43b}\x{443}\x{439}\x{441}\x{442}\x{430} )?\x{43f}\x{43e}\x{434}\x{43e}\x{436}\x{434}\x{438}\x{442}\x{435} (\d+) \x{441}\x{435}\x{43a}\x{443}\x{43d}\x{434} \x{43f}\x{435}\x{440}\x{435}\x{434} \x{441}\x{43b}\x{435}\x{434}\x{443}\x{44e}\x{449}\x{438}\x{43c} \x{43f}\x{43e}\x{438}\x{441}\x{43a}\x{43e}\x{43c}\./iB= $text =~ /(?:Please )?wait (\d+) seconds before next search\./iC= $text eq "\x{41f}\x{43e}\x{436}\x{430}\x{43b}\x{443}\x{439}\x{441}\x{442}\x{430} \x{43d}\x{435} \x{438}\x{441}\x{43f}\x{43e}\x{43b}\x{44c}\x{437}\x{443}\x{439}\x{442}\x{435} \x{43f}\x{43e}\x{438}\x{441}\x{43a} \x{442}\x{430}\x{43a} \x{447}\x{430}\x{441}\x{442}\x{43e}!"D= $text eq "Please don't flood with searches!"E= $text eq "Sorry Hub is busy now, no search, try later.."
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 108 | /(?:Пожалуйста )?подождите (\d+) секунд перед следующим поиском\./i | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 109 | or $text =~ /(?:Please )?wait (\d+) seconds before next search\./i | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 110 | or $text eq 'Пожалуйста не используйте поиск так часто!' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 111 | or $text eq "Please don't flood with searches!" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 112 | or $text eq 'Sorry Hub is busy now, no search, try later..' ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 113 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 114 | 0 | ▶ | $self->{'search_every'} += int( rand(5) + $1 || $self->{'search_every_min'} ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
rand(5) + $1 || $self->{'search_every_min'}
MC/DC0%0/2
rand(5) + $1 || $self->{'search_every_min'}
rand(5) + $1
$self->{'search_every_min'}
Truth table0%0/3
A || B
A= rand(5) + $1B= $self->{'search_every_min'}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 115 | 0 | $self->log( 'warn', "[$nick] oper: increase min interval => $self->{'search_every'}" ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 116 | 0 | $self->search_retry(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 117 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 118 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 119 | 0 | ▶ | if ( !$self->{count_parse}{chatline} and $text =~ /PtokaX/i ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
not $self->{"count_parse"}{"chatline"} and $text =~ /PtokaX/i
MC/DC0%0/2
not $self->{"count_parse"}{"chatline"} and $text =~ /PtokaX/i
not $self->{"count_parse"}{"chatline"}
$text =~ /PtokaX/i
Truth table0%0/3
not(A) and B
A= not $self->{"count_parse"}{"chatline"}B= $text =~ /PtokaX/i
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 120 | #$self->log( 'dev', "[$nick] - probably hub bot" ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 121 | 0 | $self->{'NickList'}{$nick}{'hubbot'} = 1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 122 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 123 | $self->search_retry(), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 124 | 0 | ▶ | if $self->{'NickList'}->{$nick}{'oper'} and $text eq 'Sorry Hub is busy now, no search, try later..'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$self->{"NickList"}{$nick}{"oper"} and $text eq "Sorry Hub is busy now, no search, try later.."
MC/DC0%0/2
$self->{"NickList"}{$nick}{"oper"} and $text eq "Sorry Hub is busy now, no search, try later.."
$self->{"NickList"}{$nick}{"oper"}
$text eq "Sorry Hub is busy now, no search, try later.."
Truth table0%0/3
A and B
A= $self->{"NickList"}{$nick}{"oper"}B= $text eq "Sorry Hub is busy now, no search, try later.."
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 125 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 126 | 0 | ▶ | 'welcome' => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=13 SCAR=52.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 127 | 0 | ▶ | my $self = shift if ref $_[0]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 128 | 0 | my ( $nick, $text ) = $_[0] =~ /^(?:<|\* )(.+?)>? (.+)$/s; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 129 | 0 | ▶ | if ( !keys %{ $self->{'NickList'} } or !exists $self->{'NickList'}->{$nick} or $self->{'NickList'}->{$nick}{'oper'} ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/6
not keys %{$$self{"NickList"};} && exists $self->{"NickList"}{$nick} or $self->{"NickList"}{$nick}{"oper"}
keys %{$$self{'NickList'};} && exists $self->{'NickList'}{$nick}
MC/DC0%0/3
not keys %{$$self{"NickList"};} && exists $self->{"NickList"}{$nick} or $self->{"NickList"}{$nick}{"oper"}
keys %{$$self{'NickList'};}
exists $self->{'NickList'}{$nick}
$self->{"NickList"}{$nick}{"oper"}
Truth table0%0/4
not(A && B) or C
A= keys %{$$self{'NickList'};}B= exists $self->{'NickList'}{$nick}C= $self->{"NickList"}{$nick}{"oper"}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 130 | 0 | ▶ | if ( $text =~ /^Bad nickname: unallowed characters, use these (\S+)/ ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 3 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 131 | # | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 132 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 133 | 0 | my $try = $self->{'Nick'}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 134 | 0 | $try =~ s/[^\Q$1\E]//g; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 135 | 0 | $self->log( 'warn', "CHNICK $self->{'Nick'} -> $try" ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 136 | 0 | ▶ | $self->{'Nick'} = $try if length $try; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 137 | ▶ | } elsif ( $text =~ /Bad nickname: Wait (\d+)sec before reconnecting/i | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/6
$text =~ /Bad nickname: Wait (\d+)sec before reconnecting/i or $text =~ /\x{41f}\x{43e}\x{436}\x{430}\x{43b}\x{443}\x{439}\x{441}\x{442}\x{430} \x{43f}\x{43e}\x{434}\x{43e}\x{436}\x{434}\x{438}\x{442}\x{435} (\d+) \x{441}\x{435}\x{43a}\x{443}\x{43d}\x{434} \x{434}\x{43e} \x{43f}\x{43e}\x{432}\x{442}\x{43e}\x{440}\x{43d}\x{43e}\x{433}\x{43e} \x{43f}\x{43e}\x{434}\x{43a}\x{43b}\x{44e}\x{447}\x{435}\x{43d}\x{438}\x{44f}\./ or $text =~ /Do not reconnect too fast. Wait (\d+) secs before reconnecting./
$text =~ /Bad nickname: Wait (\d+)sec before reconnecting/i or $text =~ /\x{41f}\x{43e}\x{436}\x{430}\x{43b}\x{443}\x{439}\x{441}\x{442}\x{430} \x{43f}\x{43e}\x{434}\x{43e}\x{436}\x{434}\x{438}\x{442}\x{435} (\d+) \x{441}\x{435}\x{43a}\x{443}\x{43d}\x{434} \x{434}\x{43e} \x{43f}\x{43e}\x{432}\x{442}\x{43e}\x{440}\x{43d}\x{43e}\x{433}\x{43e} \x{43f}\x{43e}\x{434}\x{43a}\x{43b}\x{44e}\x{447}\x{435}\x{43d}\x{438}\x{44f}\./
MC/DC0%0/3
$text =~ /Bad nickname: Wait (\d+)sec before reconnecting/i or $text =~ /\x{41f}\x{43e}\x{436}\x{430}\x{43b}\x{443}\x{439}\x{441}\x{442}\x{430} \x{43f}\x{43e}\x{434}\x{43e}\x{436}\x{434}\x{438}\x{442}\x{435} (\d+) \x{441}\x{435}\x{43a}\x{443}\x{43d}\x{434} \x{434}\x{43e} \x{43f}\x{43e}\x{432}\x{442}\x{43e}\x{440}\x{43d}\x{43e}\x{433}\x{43e} \x{43f}\x{43e}\x{434}\x{43a}\x{43b}\x{44e}\x{447}\x{435}\x{43d}\x{438}\x{44f}\./ or $text =~ /Do not reconnect too fast. Wait (\d+) secs before reconnecting./
$text =~ /Bad nickname: Wait (\d+)sec before reconnecting/i
$text =~ /\x{41f}\x{43e}\x{436}\x{430}\x{43b}\x{443}\x{439}\x{441}\x{442}\x{430} \x{43f}\x{43e}\x{434}\x{43e}\x{436}\x{434}\x{438}\x{442}\x{435} (\d+) \x{441}\x{435}\x{43a}\x{443}\x{43d}\x{434} \x{434}\x{43e} \x{43f}\x{43e}\x{432}\x{442}\x{43e}\x{440}\x{43d}\x{43e}\x{433}\x{43e} \x{43f}\x{43e}\x{434}\x{43a}\x{43b}\x{44e}\x{447}\x{435}\x{43d}\x{438}\x{44f}\./
$text =~ /Do not reconnect too fast. Wait (\d+) secs before reconnecting./
Truth table0%0/4
A or B or C
A= $text =~ /Bad nickname: Wait (\d+)sec before reconnecting/iB= $text =~ /\x{41f}\x{43e}\x{436}\x{430}\x{43b}\x{443}\x{439}\x{441}\x{442}\x{430} \x{43f}\x{43e}\x{434}\x{43e}\x{436}\x{434}\x{438}\x{442}\x{435} (\d+) \x{441}\x{435}\x{43a}\x{443}\x{43d}\x{434} \x{434}\x{43e} \x{43f}\x{43e}\x{432}\x{442}\x{43e}\x{440}\x{43d}\x{43e}\x{433}\x{43e} \x{43f}\x{43e}\x{434}\x{43a}\x{43b}\x{44e}\x{447}\x{435}\x{43d}\x{438}\x{44f}\./C= $text =~ /Do not reconnect too fast. Wait (\d+) secs before reconnecting./
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 138 | or $text =~ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 139 | /Пожалуйста подождите (\d+) секунд до повторного подключения\./ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 140 | or $text =~ /Do not reconnect too fast. Wait (\d+) secs before reconnecting./ ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 141 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 142 | #sleep $1 + 1; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 143 | 0 | $self->work( $1 + 10 ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 144 | ▶ | } elsif ( $self->{'auto_bug'} and $nick eq 'VerliHub' and $text =~ /^This Hub Is Running Version 0.9.8d/i ) { #_RC1 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/6
$self->{"auto_bug"} and $nick eq "VerliHub" and $text =~ /^This Hub Is Running Version 0.9.8d/i
$self->{"auto_bug"} and $nick eq "VerliHub"
MC/DC0%0/3
$self->{"auto_bug"} and $nick eq "VerliHub" and $text =~ /^This Hub Is Running Version 0.9.8d/i
$self->{"auto_bug"}
$nick eq "VerliHub"
$text =~ /^This Hub Is Running Version 0.9.8d/i
Truth table0%0/4
A and B and C
A= $self->{"auto_bug"}B= $nick eq "VerliHub"C= $text =~ /^This Hub Is Running Version 0.9.8d/i
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 145 | 0 | ++$self->{'bug_MyINFO_last'}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 146 | 0 | $self->log( 'dev', "possible bug fixed [$self->{'bug_MyINFO_last'}]" ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 147 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 148 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 149 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 150 | 0 | ▶ | 'Lock' => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 151 | 0 | ▶ | my $self = shift if ref $_[0]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 152 | #$self->log( "lockparse", @_ ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 153 | 0 | $self->{'sendbuf'} = 1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 154 | 0 | $self->cmd('Supports'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 155 | 0 | my ($lock) = $_[0] =~ /^(.+?)(\s+Pk=.+)?\s*$/is; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 156 | #print "lock[$1]\n"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 157 | #$self->log( 'dev', "lock from [$_[0]] = [$lock]"); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 158 | 0 | $self->cmd( 'Key', $self->lock2key($lock) ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 159 | 0 | $self->{'sendbuf'} = 0; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 160 | 0 | $self->cmd('ValidateNick'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 161 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 162 | 0 | ▶ | 'Hello' => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=8 SCAR=42.8
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 163 | 0 | ▶ | my $self = shift if ref $_[0]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 164 | #$self->log('info', "HELLO recieved, connected. me=[$self->{'Nick'}]", @_); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 165 | 0 | ▶ | return unless $_[0] eq $self->{'Nick'}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 166 | 0 | $self->{'sendbuf'} = 1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 167 | 0 | $self->cmd('Version'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 168 | 0 | ▶ | $self->{'sendbuf'} = 0 unless $self->{'auto_GetNickList'}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 169 | 0 | ▶ | $self->cmd('MyINFO') unless $self->{'bug_MyINFO_last'}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 170 | 0 | ▶ | $self->{'sendbuf'} = 0, $self->cmd('GetNickList') if $self->{'auto_GetNickList'}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 171 | 0 | ▶ | $self->{'sendbuf'} = 0, $self->cmd('MyINFO') if $self->{'bug_MyINFO_last'}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 172 | 0 | $self->{'status'} = 'connected'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 173 | 0 | ▶ | $self->cmd('BotINFO') if $self->{botinfo}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 174 | 0 | $self->cmd('make_hub'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 175 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 176 | 0 | ▶ | 'Supports' => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 177 | 0 | ▶ | my $self = shift if ref $_[0]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 178 | 0 | $self->supports_parse( $_[0], $self ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 179 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 180 | 0 | ▶ | 'ValidateDenide' => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 181 | 0 | ▶ | my $self = shift if ref $_[0]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 182 | 0 | $self->log( 'warn', "ValidateDenide", $self->{'Nick'}, @_ ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 183 | 0 | $self->cmd('nick_generate'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 184 | 0 | $self->cmd('ValidateNick'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 185 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 186 | 0 | ▶ | 'To' => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 187 | 0 | ▶ | my $self = shift if ref $_[0]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 188 | #$self->log( 'msg', "Private message to", @_ ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 189 | #@_; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 190 | 0 | undef; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 191 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 192 | 0 | ▶ | 'MyINFO' => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 193 | 0 | ▶ | my $self = shift if ref $_[0]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 194 | 0 | my ( $nick, $info ) = $_[0] =~ /\S+\s+(\S+)\s+(.*)/; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 195 | 0 | $self->{'NickList'}->{$nick}{'Nick'} = $nick; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 196 | 0 | $self->info_parse( $info, $self->{'NickList'}{$nick} ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 197 | 0 | $self->{'NickList'}->{$nick}{'online'} = 1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 198 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 199 | 0 | ▶ | 'UserIP' => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=3 SCAR=24.8
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 200 | 0 | ▶ | my $self = shift if ref $_[0]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 201 | /(\S+)\s+(\S+)/, $self->{'NickList'}{$1}{'ip'} = $2, $self->{'IpList'}{$2} = $self->{'NickList'}{$1}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 202 | $self->{'IpList'}{$2}{'port'} = $self->{'PortList'}{$2} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 203 | 0 | for grep $_, split /\$\$/, $_[0]; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 204 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 205 | 0 | ▶ | 'HubName' => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 206 | 0 | ▶ | my $self = shift if ref $_[0]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 207 | 0 | $self->{'HubName'} = $_[0]; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 208 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 209 | 0 | ▶ | 'HubTopic' => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 210 | 0 | ▶ | my $self = shift if ref $_[0]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 211 | 0 | $self->{'HubTopic'} = $_[0]; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 212 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 213 | 0 | ▶ | 'NickList' => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=4 SCAR=30.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 214 | 0 | ▶ | my $self = shift if ref $_[0]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 215 | 0 | $self->{'NickList'}->{$_}{'online'} = 1 for grep $_, split /\$\$/, $_[0]; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 216 | 0 | ▶ | $self->GetINFO() if $self->{auto_GetINFO}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 217 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 218 | 0 | ▶ | 'OpList' => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=3 SCAR=24.8
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 219 | 0 | ▶ | my $self = shift if ref $_[0]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 220 | 0 | $self->{'NickList'}->{$_}{'oper'} = 1 for grep $_, split /\$\$/, $_[0]; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 221 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 222 | 0 | ▶ | 'ForceMove' => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=4 SCAR=30.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 223 | 0 | ▶ | my $self = shift if ref $_[0]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 224 | 0 | my ($to) = grep { length $_ } split /;/, $_[0]; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 225 | 0 | $self->log( 'warn', "ForceMove to $to :: ", @_ ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 226 | 0 | $self->disconnect(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 227 | 0 | sleep(1); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 228 | 0 | ▶ | $self->connect($to) if $self->{'follow_forcemove'} and $to; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$self->{"follow_forcemove"} and $to
MC/DC0%0/2
$self->{"follow_forcemove"} and $to
$self->{"follow_forcemove"}
$to
Truth table0%0/3
A and B
A= $self->{"follow_forcemove"}B= $to
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 229 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 230 | 0 | ▶ | 'Quit' => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 231 | 0 | ▶ | my $self = shift if ref $_[0]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 232 | 0 | $self->{'NickList'}->{ $_[0] }{'online'} = 0; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 233 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 234 | 0 | ▶ | 'ConnectToMe' => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=4 SCAR=30.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 235 | 0 | ▶ | my $self = shift if ref $_[0]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 236 | 0 | my ( $nick, $host, $port ) = $_[0] =~ /\s*(\S+)\s+(\S+)\:(\S+)/; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 237 | 0 | $self->{'IpList'}{$host}{'port'} = $self->{'PortList'}->{$host} = $port; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 238 | #$self->log('dev', "portlist: $host = $self->{'PortList'}->{$host} :=$port"); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 239 | $self->log("ignore flooding attempt to [$host:$port ] ($self->{flood}{$host})"), $self->{flood}{$host} = time + 30, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 240 | return | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 241 | 0 | ▶ | if $self->{flood}{$host} > time; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 242 | 0 | $self->{flood}{$host} = time + 60; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 243 | 0 | ▶ | return if $self->{'clients'}{ $host . ':' . $port }->{'socket'}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 244 | 0 | $self->{'clients'}{ $host . ':' . $port } = Net::DirectConnect::clicli->new( | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 245 | #! %$self, $self->clear(), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 246 | parent => $self, 'host' => $host, 'port' => $port, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 247 | #'want' => \%{ $self->{'want'} }, 'NickList' => \%{ $self->{'NickList'} }, 'IpList' => \%{ $self->{'IpList'} }, 'PortList' => \%{ $self->{'PortList'} }, 'handler' => \%{ $self->{'handler'} }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 248 | #'want' => $self->{'want'}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 249 | #'NickList' => $self->{'NickList'}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 250 | #'IpList' => $self->{'IpList'}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 251 | #'PortList' => $self->{'PortList'}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 252 | #'handler' => $self->{'handler'}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 253 | #'share_tth' => $self->{'share_tth'}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 254 | #'reconnects' => 0, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 255 | 'auto_connect' => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 256 | ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 257 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 258 | 0 | ▶ | 'RevConnectToMe' => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=3 SCAR=24.8
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 259 | 0 | ▶ | my $self = shift if ref $_[0]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 260 | 0 | my ( $to, $from ) = split /\s+/, $_[0]; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 261 | #$self->log( 'dev', "[$from eq $self->{'Nick'}] ($_[0])" ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 262 | #$self->log( 'dev', 'go ctm' ), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 263 | 0 | ▶ | $self->cmd( 'ConnectToMe', $to ) if $from eq $self->{'Nick'}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 264 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 265 | 0 | ▶ | 'GetPass' => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 266 | 0 | ▶ | my $self = shift if ref $_[0]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 267 | 0 | $self->cmd('MyPass'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 268 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 269 | 0 | ▶ | 'BadPass' => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 270 | 0 | ▶ | my $self = shift if ref $_[0]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 271 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 272 | 0 | ▶ | 'LogedIn' => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 273 | 0 | ▶ | my $self = shift if ref $_[0]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 274 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 275 | 0 | ▶ | 'Search' => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=16 SCAR=56.1
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 276 | 0 | ▶ | my $self = shift if ref $_[0]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 277 | 0 | my $search = $_[0]; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 278 | 0 | $self->make_hub(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 279 | 0 | my $params = { 'time' => int( time() ), 'hub' => $self->{'hub_name'}, }; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 280 | 0 | ( $params->{'who'}, $params->{'cmds'} ) = split /\s+/, $search; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 281 | 0 | $params->{'cmd'} = [ split /\?/, $params->{'cmds'} ]; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 282 | 0 | ▶ | if ( $params->{'who'} =~ /^Hub:(.+)$/ ) { $params->{'nick'} = $1; } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 283 | 0 | else { ( $params->{'ip'}, $params->{'udp'} ) = split /:/, $params->{'who'}; } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 284 | 0 | ▶ | if ( $params->{'cmd'}[4] =~ /^TTH:([0-9A-Z]{39})$/ ) { $params->{'tth'} = $1; } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 285 | 0 | else { $params->{'string'} = $params->{'cmd'}[4]; } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 286 | 0 | ▶ | $self->{'PortList_udp'}->{ $params->{'ip'} } = $params->{'udp'} if $params->{'udp'}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 287 | 0 | $params->{'string'} =~ tr/$/ /; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 288 | #$self->cmd('make_hub'); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 289 | #r$self->{'share_tth'} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 290 | 0 | ▶ | my $found = $self->{'share_full'}{ $params->{'tth'} } || $self->{'share_full'}{ $params->{'string'} }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
$self->{'share_full'}{$params->{'tth'}} || $self->{'share_full'}{$params->{'string'}}
MC/DC0%0/2
$self->{'share_full'}{$params->{'tth'}} || $self->{'share_full'}{$params->{'string'}}
$self->{'share_full'}{$params->{'tth'}}
$self->{'share_full'}{$params->{'string'}}
Truth table0%0/3
A || B
A= $self->{'share_full'}{$params->{'tth'}}B= $self->{'share_full'}{$params->{'string'}}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 291 | 0 | my $tth = $self->{'share_tth'}{$found}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 292 | 0 | ▶ | if ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$found and $tth
MC/DC0%0/2
$found and $tth
$found
$tth
Truth table0%0/3
A and B
A= $foundB= $tth
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 293 | $found | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 294 | and $tth | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 295 | #$params->{'tth'} and $self->{'share_tth'}{ $params->{'tth'} } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 296 | ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 297 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 298 | $self->log( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 299 | 0 | 'adcdev', 'Search', $params->{'who'}, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 300 | #$self->{'share_tth'}{ $params->{'tth'} }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 301 | $found, -s $found, -e $found, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 302 | ), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 303 | #$self->{'share_tth'}{ $params->{'tth'} } =~ tr{\\}{/}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 304 | #$self->{'share_tth'}{ $params->{'tth'} } =~ s{^/+}{}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 305 | my $path; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 306 | 0 | ▶ | if ( $self->{'adc'} ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 307 | 0 | $path = $self->adc_path_encode( | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 308 | $found | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 309 | #$self->{'share_tth'}{ $params->{'tth'} } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 310 | ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 311 | } else { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 312 | 0 | $path = $found; #$self->{'share_tth'}{ $params->{'tth'} }; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 313 | 0 | $path =~ s{^\w:}{}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 314 | 0 | $path =~ s{^\W+}{}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 315 | 0 | $path =~ tr{/}{\\}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 316 | $path = Encode::encode $self->{charset_protocol}, Encode::decode( $self->{charset_fs}, $path, Encode::FB_WARN ), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 317 | Encode::FB_WARN | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 318 | 0 | ▶ | if $self->{charset_fs} ne $self->{charset_protocol}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 319 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 320 | local @_ = ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 321 | 'SR', ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 322 | #( $self->{'M'} eq 'P' or !$self->{'myport_tcp'} or !$self->{'myip'} ) ? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 323 | $self->{'Nick'} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 324 | #: $self->{'myip'} . ':' . $self->{'myport_tcp'} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 325 | ), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 326 | $path . "\x05" . ( -s $found or -1 ), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 327 | $self->{'S'} . '/' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 328 | . $self->{'S'} . "\x05" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 329 | . | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 330 | #"TTH:" . $params->{'tth'} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 331 | ( $params->{'tth'} ? $params->{'cmd'}[4] : "TTH:" . $tth ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 332 | #. ( $self->{'M'} eq 'P' ? " ($self->{'host'}:$self->{'port'})" : '' ), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 333 | #. ( " ($self->{'host'}:$self->{'port'})\x05$params->{'nick'}" ), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 334 | . ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 335 | #" ($self->{'host'}:$self->{'port'})" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 336 | #" (".name_to_ip($self->{'host'}).":$self->{'port'})" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 337 | #" (".inet_ntoa(gethostbyname ($self->{'host'})).":$self->{'port'})" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 338 | 0 | ▶ | " ($self->{'hostip'}:$self->{'port'})" . ( ( $params->{'ip'} and $params->{'udp'} ) ? '' : "\x05$params->{'nick'}" ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
Condition0%0/5
-s $found || -1
$params->{"ip"} and $params->{"udp"}
MC/DC0%0/1
-s $found || -1
-s $found
MC/DC0%0/2
$params->{"ip"} and $params->{"udp"}
$params->{"ip"}
$params->{"udp"}
Truth table0%0/2
A
A= -s $found
Truth table0%0/3
A and B
A= $params->{"ip"}B= $params->{"udp"}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 339 | ), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 340 | #. ( $self->{'M'} eq 'P' ? " ($self->{'host'}:$self->{'port'})\x05$params->{'nick'}" : '' ), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 341 | #{ SI => -s $self->{'share_tth'}{ $params->{TR} },SL => $self->{INF}{SL},FN => $self->adc_path_encode( $self->{'share_tth'}{ $params->{TR} } ),=> $params->{TO} || $self->make_token($peerid),TR => $params->{TR}} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 342 | ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 343 | 0 | ▶ | if ( $params->{'ip'} and $params->{'udp'} ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$params->{"ip"} and $params->{"udp"}
MC/DC0%0/2
$params->{"ip"} and $params->{"udp"}
$params->{"ip"}
$params->{"udp"}
Truth table0%0/3
A and B
A= $params->{"ip"}B= $params->{"udp"}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 344 | 0 | $self->send_udp( $params->{'ip'}, $params->{'udp'}, $self->{'cmd_bef'} . join ' ', @_ ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 345 | } else { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 346 | 0 | $self->cmd(@_); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 347 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 348 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 349 | #'SR', ( $self->{'M'} eq 'P' ? "Hub:$self->{'Nick'}" : "$self->{'myip'}:$self->{'myport_udp'}" ), join '?', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 350 | #Hub: [Outgoing][80.240.208.42:4111] $SR prrrrroo0 distr\s60\games\10598_paintball2.zip621237 1/2TTH:3TFVOXE2DS6W62RWL2QBEKZBQLK3WRSLG556ZCA (80.240.208.42:4111)breathe| | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 351 | #$SR prrrrroo0 distr\moscow\mom\Mo\P\Paintball.htm1506 1/2TTH:NRRZNA5MYJSZGMPQ634CPGCPX3ZBRLKHAACPAFQ (80.240.208.42:4111)breathe| | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 352 | #$SR prrrrroo0 distr\moscow\mom\Map\P\Paintball.htm3966 1/2TTH:QLRRMET6MSNJTIRKBDLQYU6RMI5QVZDZOGAXEXA (80.240.208.42:4111)breathe| | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 353 | #$SR ILICH ЕГТС_07_2007\bases\sidhouse.DBF120923801 6/8TTH:4BAKR7LLXE65I6S4HASIXWIZONBEFS7VVZ7QQ2Y (80.240.211.183:411) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 354 | #$SR gellarion7119 MuZonnO\Mark Knopfler - Get Lucky (2009)\mark_knopfler_-_you_cant_beat_the_house.mp36599140 7/7TTH:IDPHZ4AJIIWDYOFEKCCVJUNVIPGSGTYFW5CGEQQ (80.240.211.183:411) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 355 | #$SR 13th_day Картинки\еще девки\sacrifice_penthouse02.jpg62412 0/20TTH:GHMWHVBKRLF52V26VFO4M4RUQ65NC3YKWIW7FPI (80.240.211.183:411) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 356 | #DIRECT: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 357 | #$SR server1 server\Unsorted\Desperate.Housewives.S04.720p.HDTV.x264\desperate.housewives.s04e03.720p.hdtv.x264.Rus.Eng.mkv1194423977 2/2TTH:6YWRGDXNQJEOGSB4Q7Y3Y7XRM7EXPLUK7GBRJ3A (80.240.211.183:411) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 358 | #$SR MikMEBX Deep purple\1980-1988\08-The House Of Blue Light.1987 10/10[ f12p.ru ][ F12P-HUB ] - день единства... вспомните хорошее и улыбнитесь друг другу.. пусть это будет днем гармонии (80.240.211.183) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 359 | #PASSIVE | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 360 | #$SR ILICH ЕГТС_07_2007\bases\sidhouse.DBF120923801 6/8TTH:4BAKR7LLXE65I6S4HASIXWIZONBEFS7VVZ7QQ2Y (80.240.211.183:411) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 361 | #$SR gellarion7119 MuZonnO\Mark Knopfler - Get Lucky (2009)\mark_knopfler_-_you_cant_beat_the_house.mp36599140 7/7TTH:IDPHZ4AJIIWDYOFEKCCVJUNVIPGSGTYFW5CGEQQ (80.240.211.183:411) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 362 | #$SR SALAGA Видео\Фильмы\XXX\xxx Penthouse.avi732665856 0/5TTH:3OFCM6GPQZNBNAMV6SRDFHFPK2X76EO6UCIO7ZQ (80.240.211.183:411) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 363 | 0 | return $params; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 364 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 365 | 0 | ▶ | 'SR' => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=7 SCAR=40.3
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 366 | 0 | ▶ | my $self = shift if ref $_[0]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 367 | #$self->log( 'dev', "SR", @_ , 'parent=>', $self->{parent}, 'h=', $self->{handler}, Dumper($self->{handler}), 'ph=', $self->{parent}{handler}, Dumper($self->{parent}{handler}), ) if $self; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 368 | 0 | $self->make_hub(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 369 | 0 | my $params = { 'time' => int( time() ), 'hub' => $self->{'hub_name'}, }; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 370 | 0 | ( $params->{'nick'}, $params->{'str'} ) = split / /, $_[0], 2; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 371 | 0 | $params->{'str'} = [ split /\x05/, $params->{'str'} ]; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 372 | 0 | $params->{'file'} = shift @{ $params->{'str'} }; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 373 | 0 | ( $params->{'filename'} ) = $params->{'file'} =~ m{([^\\]+)$}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 374 | 0 | ( $params->{'ext'} ) = $params->{'filename'} =~ m{[^.]+\.([^.]+)$}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 375 | 0 | ( $params->{'size'}, $params->{'slots'} ) = split / /, shift @{ $params->{'str'} }; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 376 | 0 | ( $params->{'tth'}, $params->{'ipport'} ) = split / /, shift @{ $params->{'str'} }; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 377 | 0 | ▶ | ( $params->{'tth'}, $params->{'ipport'} ) = ( $params->{'size'}, $params->{'slots'} ) unless $params->{'tth'}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 378 | 0 | ( $params->{'target'} ) = shift @{ $params->{'str'} }; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 379 | 0 | $params->{'tth'} =~ s/^TTH://; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 380 | 0 | ( $params->{'ipport'}, $params->{'ip'}, $params->{'tcp'} ) = $params->{'ipport'} =~ /\(((\S+):(\d+))\)/; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 381 | 0 | delete $params->{'str'}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 382 | #( $params->{'slotsopen'}, $params->{'S'} ) = split /\//, $params->{'slots'}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 383 | #$params->{'slotsfree'} = $params->{'S'} - $params->{'slotsopen'}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 384 | 0 | ( $params->{'slotsfree'}, $params->{'S'} ) = split /\//, $params->{'slots'}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 385 | #$params->{'slotsfree'} = $params->{'S'} - $params->{'slotsopen'}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 386 | 0 | $params->{'string'} = $self->{'search_last_string'}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 387 | 0 | $self->{'NickList'}{ $params->{'nick'} }{$_} = $params->{$_} for qw(S ip tcp); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 388 | 0 | $self->{'PortList'}->{ $params->{'ip'} } = $params->{'tcp'}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 389 | 0 | $self->{'IpList'}->{ $params->{'ip'} } = $self->{'NickList'}{ $params->{'nick'} }; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 390 | 0 | $params->{'TR'} = $params->{'tth'}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 391 | 0 | $params->{FN} = $params->{'filename'}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 392 | 0 | my $peerid = $params->{'nick'}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 393 | 0 | $params->{CID} = $peerid; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 394 | #($params->{'file'}) = $params->{FN} =~ m{([^\\/]+)$}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 395 | 0 | ▶ | my $wdl = $self->{'want_download'}{ $params->{'TR'} } || $self->{'want_download'}{ $params->{'filename'} }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
$self->{'want_download'}{$params->{'TR'}} || $self->{'want_download'}{$params->{'filename'}}
MC/DC0%0/2
$self->{'want_download'}{$params->{'TR'}} || $self->{'want_download'}{$params->{'filename'}}
$self->{'want_download'}{$params->{'TR'}}
$self->{'want_download'}{$params->{'filename'}}
Truth table0%0/3
A || B
A= $self->{'want_download'}{$params->{'TR'}}B= $self->{'want_download'}{$params->{'filename'}}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 396 | 0 | ▶ | if ($wdl) { #exists $self->{'want_download'}{ $params->{'TR'} } ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 397 | #$self->{'want_download'}{ $params->{'TR'} } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 398 | 0 | $wdl->{$peerid} = $params; #maybe not all | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 399 | 0 | ▶ | if ( $params->{'filename'} ) { ++$self->{'want_download_filename'}{ $params->{TR} }{ $params->{'filename'} }; } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 400 | 0 | $self->{'want_download'}{ $params->{TR} }{$peerid} = $params; # _tth_from | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 401 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 402 | 0 | return $params; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 403 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 404 | 0 | ▶ | 'UserCommand' => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 405 | 0 | ▶ | my $self = shift if ref $_[0]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 406 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 407 | #}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 408 | 0 | ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 409 | 0 | ▶ | $self->{'parse'}{$_} ||= $_{$_} for keys %_; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
$self->{"parse"}{$_} ||= $_{$_}
MC/DC0%0/2
$self->{"parse"}{$_} ||= $_{$_}
$self->{"parse"}{$_}
$_{$_}
Truth table0%0/3
A ||= B
A= $self->{"parse"}{$_}B= $_{$_}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 410 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 411 | =COMMANDS | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 412 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 413 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 414 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 415 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 416 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 417 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 418 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 419 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 420 | =cut | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 421 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 422 | #$self->{'cmd'} = { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 423 | local %_ = ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 424 | 0 | ▶ | 'connect_aft' => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 425 | 0 | ▶ | my $self = shift if ref $_[0]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 426 | #$self->log( 'dbg', "nothing to do after connect"); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 427 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 428 | 0 | ▶ | 'chatline' => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=5 SCAR=34.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 429 | 0 | ▶ | my $self = shift if ref $_[0]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 430 | 0 | for (@_) { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 431 | 0 | ▶ | if ( $self->{'min_chat_delay'} and ( time - $self->{'last_chat_time'} < $self->{'min_chat_delay'} ) ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$self->{"min_chat_delay"} and &Net::DirectConnect::clihub::time() - $self->{"last_chat_time"} < $self->{"min_chat_delay"}
MC/DC0%0/2
$self->{"min_chat_delay"} and &Net::DirectConnect::clihub::time() - $self->{"last_chat_time"} < $self->{"min_chat_delay"}
$self->{"min_chat_delay"}
&Net::DirectConnect::clihub::time() - $self->{"last_chat_time"} < $self->{"min_chat_delay"}
Truth table0%0/3
A and B
A= $self->{"min_chat_delay"}B= &Net::DirectConnect::clihub::time() - $self->{"last_chat_time"} < $self->{"min_chat_delay"}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 432 | 0 | $self->log( 'dbg', 'sleep', $self->{'min_chat_delay'} - time + $self->{'last_chat_time'} ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 433 | 0 | $self->wait_sleep( $self->{'min_chat_delay'} - time + $self->{'last_chat_time'} ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 434 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 435 | 0 | $self->{'last_chat_time'} = time; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 436 | 0 | $self->log( | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 437 | 'dcdmp', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 438 | "($self->{'number'}) we send [", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 439 | "<$self->{'Nick'}> $_|", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 440 | "]:", $self->send("<$self->{'Nick'}> $_|"), $! | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 441 | ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 442 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 443 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 444 | 0 | ▶ | 'To' => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=3 SCAR=24.8
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 445 | 0 | ▶ | my $self = shift if ref $_[0]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 446 | 0 | my $to = shift; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 447 | 0 | $self->sendcmd( 'To:', $to, "From: $self->{'Nick'} \$<$self->{'Nick'}> $_" ) for (@_); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 448 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 449 | 0 | ▶ | 'Key' => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 450 | 0 | ▶ | my $self = shift if ref $_[0]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 451 | 0 | $self->sendcmd( 'Key', $_[0] ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 452 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 453 | 0 | ▶ | 'ValidateNick' => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 454 | 0 | ▶ | my $self = shift if ref $_[0]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 455 | 0 | $self->sendcmd( 'ValidateNick', $self->{'Nick'} ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 456 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 457 | 0 | ▶ | 'Version' => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 458 | 0 | ▶ | my $self = shift if ref $_[0]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 459 | 0 | $self->sendcmd( 'Version', $self->{'Version'} ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 460 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 461 | 0 | ▶ | 'MyINFO' => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 462 | 0 | ▶ | my $self = shift if ref $_[0]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 463 | 0 | $self->sendcmd( 'MyINFO', '$ALL', $self->myinfo() ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 464 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 465 | 0 | ▶ | 'GetNickList' => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 466 | 0 | $self->sendcmd('GetNickList'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 467 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 468 | 0 | ▶ | 'GetINFO' => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=5 SCAR=34.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 469 | 0 | ▶ | my $self = shift if ref $_[0]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 470 | 0 | ▶ | @_ = grep { $self->{'NickList'}{$_}{'online'} and !$self->{'NickList'}{$_}{'info'} } keys %{ $self->{'NickList'} } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$self->{'NickList'}{$_}{'online'} && !$self->{'NickList'}{$_}{'info'}
MC/DC0%0/2
$self->{'NickList'}{$_}{'online'} && !$self->{'NickList'}{$_}{'info'}
$self->{'NickList'}{$_}{'online'}
!$self->{'NickList'}{$_}{'info'}
Truth table0%0/3
A && not(B)
A= $self->{'NickList'}{$_}{'online'}B= !$self->{'NickList'}{$_}{'info'}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 471 | unless @_; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 472 | 0 | local $self->{'sendbuf'} = 1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 473 | 0 | $self->sendcmd( 'GetINFO', $_, $self->{'Nick'} ) for @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 474 | 0 | $self->sendcmd(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 475 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 476 | 0 | ▶ | 'BotINFO' => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 477 | 0 | ▶ | my $self = shift if ref $_[0]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 478 | 0 | $self->sendcmd( 'BotINFO', $self->{botinfo} ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 479 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 480 | 0 | ▶ | 'ConnectToMe' => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=5 SCAR=34.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 481 | 0 | ▶ | my $self = shift if ref $_[0]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 482 | $self->log( 'dcdbg', "cannot ConnectToMe from passive mode" ), return | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 483 | 0 | ▶ | if $self->{'M'} eq 'P' and !$self->{'allow_passive_ConnectToMe'}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$self->{"M"} eq "P" and not $self->{"allow_passive_ConnectToMe"}
MC/DC0%0/2
$self->{"M"} eq "P" and not $self->{"allow_passive_ConnectToMe"}
$self->{"M"} eq "P"
not $self->{"allow_passive_ConnectToMe"}
Truth table0%0/3
A and not(B)
A= $self->{"M"} eq "P"B= not $self->{"allow_passive_ConnectToMe"}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 484 | 0 | ▶ | $self->log( 'err', "please define myip" ), return unless $self->{'myip'}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 485 | 0 | $self->sendcmd( 'ConnectToMe', $_[0], "$self->{'myip'}:$self->{'myport'}" ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 486 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 487 | 0 | ▶ | 'RevConnectToMe' => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 488 | 0 | ▶ | my $self = shift if ref $_[0]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 489 | 0 | $self->log( "send", ( 'RevConnectToMe', $self->{'Nick'}, $_[0] ), ref $_[0] ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 490 | 0 | $self->sendcmd( 'RevConnectToMe', $self->{'Nick'}, $_[0] ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 491 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 492 | 0 | ▶ | 'MyPass' => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=4 SCAR=30.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 493 | 0 | ▶ | my $self = shift if ref $_[0]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 494 | 0 | ▶ | my $pass = ( $_[0] or $self->{'Pass'} ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
$_[0] || $self->{'Pass'}
MC/DC0%0/2
$_[0] || $self->{'Pass'}
$_[0]
$self->{'Pass'}
Truth table0%0/3
A || B
A= $_[0]B= $self->{'Pass'}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 495 | 0 | ▶ | $self->sendcmd( 'MyPass', $pass ) if $pass; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 496 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 497 | 0 | ▶ | 'Supports' => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=3 SCAR=24.8
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 498 | 0 | ▶ | my $self = shift if ref $_[0]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 499 | 0 | ▶ | $self->sendcmd( 'Supports', $self->supports() || return ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/2
$self->supports || (return)
MC/DC0%0/1
$self->supports || (return)
$self->supports
Truth table0%0/2
A
A= $self->supports
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 500 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 501 | 0 | ▶ | 'Quit' => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 502 | 0 | ▶ | my $self = shift if ref $_[0]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 503 | 0 | $self->sendcmd( 'Quit', $self->{'Nick'} ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 504 | 0 | $self->disconnect(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 505 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 506 | 0 | ▶ | 'SR' => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 507 | 0 | ▶ | my $self = shift if ref $_[0]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 508 | 0 | $self->sendcmd( 'SR', @_ ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 509 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 510 | 0 | ▶ | 'Search' => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=3 SCAR=24.8
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 511 | 0 | ▶ | my $self = shift if ref $_[0]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 512 | #$self->log('devsearch', "mode=[$self->{'M'}]"); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 513 | 0 | ▶ | $self->sendcmd( 'Search', ( $self->{'M'} eq 'P' ? "Hub:$self->{'Nick'}" : "$self->{'myip'}:$self->{'myport_udp'}" ), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 514 | join '?', @_ ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 515 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 516 | 0 | ▶ | 'search_nmdc' => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=5 SCAR=34.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 517 | 0 | ▶ | my $self = shift if ref $_[0]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 518 | 0 | local @_ = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 519 | 0 | $_[0] =~ tr/ /$/; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 520 | 0 | @_ = ( ( 'F', 'T', '0', undef )[ 0 .. 3 - $#_ ], reverse @_ ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 521 | 0 | ▶ | $_[3] ||= ( $_[4] =~ s/^(TTH:)?([A-Z0-9]{39})$/TTH:$2/ ? '9' : '1' ) unless defined $_[3]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
Condition0%0/3
$_[3] ||= $_[4] =~ s/^(TTH:)?([A-Z0-9]{39})$/TTH:$2/ ? 9 : 1
MC/DC0%0/2
$_[3] ||= $_[4] =~ s/^(TTH:)?([A-Z0-9]{39})$/TTH:$2/ ? 9 : 1
$_[3]
$_[4] =~ s/^(TTH:)?([A-Z0-9]{39})$/TTH:$2/ ? 9 : 1
Truth table0%0/3
A ||= B
A= $_[3]B= $_[4] =~ s/^(TTH:)?([A-Z0-9]{39})$/TTH:$2/ ? 9 : 1
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 522 | # | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 523 | #$self->cmd( 'search_buffer', 'F', 'T', '0', '1', @_ ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 524 | 0 | $self->search_buffer(@_); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 525 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 526 | 0 | ▶ | 'search_tth' => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 527 | 0 | ▶ | my $self = shift if ref $_[0]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 528 | 0 | $self->{'search_last_string'} = undef; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 529 | 0 | $self->search_nmdc(@_); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 530 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 531 | 0 | ▶ | 'search_string' => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 532 | 0 | ▶ | my $self = shift if ref $_[0]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 533 | #my $string = $_[0]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 534 | 0 | $self->{'search_last_string'} = $_[0]; #$string; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 535 | #$string =~ tr/ /$/; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 536 | 0 | $self->search_nmdc(@_); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 537 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 538 | 0 | ▶ | 'search_send' => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=6 SCAR=37.4
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 539 | 0 | ▶ | my $self = shift if ref $_[0]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 540 | #$self->log( 'devsearchsend', "$self->{'M'} ne 'P' and $self->{'myip'} and $self->{'myport_udp'}" ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 541 | $self->sendcmd( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 542 | 'Search', ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 543 | ( $self->{'M'} ne 'P' and $self->{'myip'} and $self->{'myport_udp'} ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 544 | ? "$self->{'myip'}:$self->{'myport_udp'}" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 545 | : 'Hub:' . $self->{'Nick'} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 546 | ), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 547 | join '?', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 548 | 0 | ▶ | @{ $_[0] || $self->{'search_last'} } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/9
$self->{"M"} ne "P" and $self->{"myip"} and $self->{"myport_udp"}
$self->{"M"} ne "P" and $self->{"myip"}
$_[0] || $self->{'search_last'}
MC/DC0%0/3
$self->{"M"} ne "P" and $self->{"myip"} and $self->{"myport_udp"}
$self->{"M"} ne "P"
$self->{"myip"}
$self->{"myport_udp"}
MC/DC0%0/2
$_[0] || $self->{'search_last'}
$_[0]
$self->{'search_last'}
Truth table0%0/4
A and B and C
A= $self->{"M"} ne "P"B= $self->{"myip"}C= $self->{"myport_udp"}
Truth table0%0/3
A || B
A= $_[0]B= $self->{'search_last'}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 549 | ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 550 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 551 | # | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 552 | 0 | ▶ | 'stat_hub' => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=4 SCAR=30.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 553 | 0 | ▶ | my $self = shift if ref $_[0]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 554 | 0 | local %_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 555 | #for my $w qw(SS) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 556 | #++$_{UC}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 557 | 0 | ▶ | local @_ = grep { length $_ and $_ ne $self->{'Nick'} } keys %{ $self->{'NickList'} }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
length $_ && $_ ne $self->{'Nick'}
MC/DC0%0/2
length $_ && $_ ne $self->{'Nick'}
length $_
$_ ne $self->{'Nick'}
Truth table0%0/3
A && B
A= length $_B= $_ ne $self->{'Nick'}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 558 | 0 | $_{SS} += $self->{'NickList'}{$_}{'sharesize'} for @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 559 | #} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 560 | 0 | $_{UC} = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 561 | 0 | return \%_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 562 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 563 | #}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 564 | 0 | ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 565 | 0 | ▶ | $self->{'cmd'}{$_} ||= $_{$_} for keys %_; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
$self->{"cmd"}{$_} ||= $_{$_}
MC/DC0%0/2
$self->{"cmd"}{$_} ||= $_{$_}
$self->{"cmd"}{$_}
$_{$_}
Truth table0%0/3
A ||= B
A= $self->{"cmd"}{$_}B= $_{$_}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 566 | #$self->log( 'dev', "0making listeners [$self->{'M'}]" ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 567 | 0 | ▶ | if ( $self->{'M'} eq 'A' or !$self->{'M'} ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$self->{"M"} eq "A" or not $self->{"M"}
MC/DC0%0/2
$self->{"M"} eq "A" or not $self->{"M"}
$self->{"M"} eq "A"
not $self->{"M"}
Truth table0%0/3
A or not(B)
A= $self->{"M"} eq "A"B= not $self->{"M"}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 568 | #$self->log( 'dev', "making listeners: tcp, class=", $self->{'incomingclass'} ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 569 | $self->{'clients'}{'listener_tcp'} = $self->{'incomingclass'}->new( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 570 | #%$self, $self->clear(), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 571 | #'want' => \%{ $self->{'want'} }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 572 | #'NickList' => \%{ $self->{'NickList'} }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 573 | #'IpList' => \%{ $self->{'IpList'} }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 574 | #'PortList' => \%{ $self->{'PortList'} }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 575 | #'handler' => \%{ $self->{'handler'} }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 576 | #'share_tth' => $self->{'share_tth'}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 577 | 0 | 'myport' => $self->{'myport'}, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 578 | 'auto_listen' => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 579 | 'parent' => $self, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 580 | ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 581 | 0 | $self->{'myport'} = $self->{'myport_tcp'} = $self->{'clients'}{'listener_tcp'}{'myport'}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 582 | 0 | ▶ | $self->log( 'err', "cant listen tcp (file transfers)" ) unless $self->{'myport_tcp'}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 583 | #$self->log( 'dev', "making listeners: udp" ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 584 | $self->{'clients'}{'listener_udp'} = $self->{'incomingclass'}->new( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 585 | #%$self, $self->clear(), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 586 | 'parent' => $self, 'Proto' => 'udp', 'myport' => $self->{myport_udp}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 587 | #? 'want' => \%{ $self->{'want'} }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 588 | #? 'NickList' => \%{ $self->{'NickList'} }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 589 | #? 'IpList' => \%{ $self->{'IpList'} }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 590 | #? 'PortList' => \%{ $self->{'PortList'} }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 591 | #'handler' => \%{ $self->{'handler'} }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 592 | #'handler' => $self->{'handler'} , | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 593 | #$self->{'clients'}{''} = $self->{'incomingclass'}->new( %$self, $self->clear(), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 594 | #'LocalPort'=>$self->{'myport'}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 595 | #'debug'=>1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 596 | #'nonblocking' => 0, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 597 | 'parse' => { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 598 | 'SR' => $self->{'parse'}{'SR'}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 599 | 0 | ▶ | 'PSR' => sub { #U | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=3 SCAR=24.8
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 600 | 0 | ▶ | my $self = shift if ref $_[0]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 601 | #my $self = ref $_[0] ? shift() : $self; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 602 | 0 | ▶ | $self->log( 'dev', "PSR", @_ ) if $self; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 603 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 604 | 0 | ▶ | 'UPSR' => sub { # TODO | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=4 SCAR=30.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 605 | 0 | ▶ | my $self = shift if ref $_[0]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 606 | #my $self = ref $_[0] ? shift() : $self; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 607 | #!$self->log( 'dev', "UPSR", 'udp' ) if $self; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 608 | 0 | ▶ | for ( split /\n+/, $_[0] ) { return $self->parser($_) if /^\$SR/; } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 609 | #$self->log( 'dev', "UPSR", @_ ) if $self; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 610 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 611 | #2008/12/14-13:30:50 [3] rcv: welcome UPSR FQ2DNFEXG72IK6IXALNSMBAGJ5JAYOQXJGCUZ4A NIsss2911 HI81.9.63.68:4111 U40 TRZ34KN23JX2BQC2USOTJLGZNEWGDFB327RRU3VUQ PC4 PI0,64,92,94,100,128,132,135 RI64,65,66,67,68,68,69,70,71,72 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 612 | #UPSR CDARCZ6URO4RAZKK6NDFTVYUQNLMFHS6YAR3RKQ NIAspid HI81.9.63.68:411 U40 TRQ6SHQECTUXWJG5ZHG3L322N5B2IV7YN2FG4YXFI PC2 PI15,17,20,128 RI128,129,130,131 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 613 | #$SR [Predator]Wolf DC++\Btyan Adams - Please Forgive Me.mp314217310 18/20TTH:G7DXSTGPHTXSD2ZZFQEUBWI7PORILSKD4EENOII (81.9.63.68:4111) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 614 | #2008/12/14-13:30:50 welcome UPSR FQ2DNFEXG72IK6IXALNSMBAGJ5JAYOQXJGCUZ4A NIsss2911 HI81.9.63.68:4111 U40 TRZ34KN23JX2BQC2USOTJLGZNEWGDFB327RRU3VUQ PC4 PI0,64,92,94,100,128,132,135 RI64,65,66,67,68,68,69,70,71,72 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 615 | #UPSR CDARCZ6URO4RAZKK6NDFTVYUQNLMFHS6YAR3RKQ NIAspid HI81.9.63.68:411 U40 TRQ6SHQECTUXWJG5ZHG3L322N5B2IV7YN2FG4YXFI PC2 PI15,17,20,128 RI128,129,130,131 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 616 | #$SR [Predator]Wolf DC++\Btyan Adams - Please Forgive Me.mp314217310 18/20TTH:G7DXSTGPHTXSD2ZZFQEUBWI7PORILSKD4EENOII (81.9.63.68:4111) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 617 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 618 | 0 | 'auto_listen' => 1, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 619 | 'parent' => $self, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 620 | ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 621 | 0 | $self->{'myport_udp'} = $self->{'clients'}{'listener_udp'}{'myport'}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 622 | 0 | ▶ | $self->log( 'err', "cant listen udp (search repiles)" ) unless $self->{'myport_udp'}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 623 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 624 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 625 | =z | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 626 | $self->log( 'dev', "making listeners: http" ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 627 | $self->{'clients'}{'listener_http'} = Net::DirectConnect::http->new( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 628 | %$self, $self->clear(), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 629 | #'want' => \%{ $self->{'want'} }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 630 | #'NickList' => \%{ $self->{'NickList'} }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 631 | #'IpList' => \%{ $self->{'IpList'} }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 632 | ## 'PortList' => \%{ $self->{'PortList'} }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 633 | 'handler' => \%{ $self->{'handler'} }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 634 | #$self->{'clients'}{''} = $self->{'incomingclass'}->new( %$self, $self->clear(), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 635 | #'LocalPort'=>$self->{'myport'}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 636 | #'debug'=>1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 637 | 'auto_listen' => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 638 | ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 639 | $self->{'myport_http'} = $self->{'clients'}{'listener_http'}{'myport'}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 640 | $self->log( 'err', "cant listen http" ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 641 | unless $self->{'myport_http'}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 642 | =cut | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 643 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 644 | 0 | ▶ | $self->{'handler_int'}{'disconnect_bef'} = sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 645 | #delete $self->{'sid'}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 646 | #$self->log( 'dev', 'disconnect int' ) if $self and $self->{'log'}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 647 | 0 | }; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 648 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 649 | 1 | 1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||