X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FQXProt.pm;h=41b34d6f2eacc03ca4a5d5b9f85c980b7bc62c64;hb=eed4648da2421ce33c3679fa2cd1519eed6c2e45;hp=38d878ed3b73be1ffcac23e0807a319219af0952;hpb=26bef9a106b74abceabc68cab21c9b9e9284266d;p=spider.git diff --git a/perl/QXProt.pm b/perl/QXProt.pm index 38d878ed..41b34d6f 100644 --- a/perl/QXProt.pm +++ b/perl/QXProt.pm @@ -152,7 +152,7 @@ sub frame sub send_frame { my $self = shift; - my $origin = shift; + my $origin = shift || $main::me; for (@_) { $self->send(frame('X', undef, $origin == $main::me || $origin->is_user ? '' : $origin->call, $_)); } @@ -163,7 +163,7 @@ sub handleI my $self = shift; my @f = split /\^/, $_[3]; - if ($self->passphrase && $f[7] && $f[8]) { + if ($self->user->passphrase && $f[7] && $f[8]) { my $inv = Verify->new($f[7]); unless ($inv->verify($f[8], $main::me->user->passphrase, $main::mycall, $self->call)) { $self->sendnow('D','Sorry...'); @@ -220,12 +220,12 @@ sub genP sub handleX { my $self = shift; - my ($tonode, $fromnode, $msgid, $line) = @_[0..3]; - my ($origin, $l) = split /\^/, $line, 2; + my ($sort, $to, $from, $msgid, $origin, $line) = split /\^/, $_[3], 6; - my ($pcno) = $l =~ /^PC(\d\d)/; + my ($pcno) = $line =~ /^PC(\d\d)/; if ($pcno) { - DXProt::normal($self, $l); + $line =~ s/^[\x\x]$//; + DXProt::normal($self, $line); } }