X-Git-Url: http://www.dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FQXProt.pm;h=b9cf952cb497a553d4fed6aa0069f09d7d20e2f5;hb=1256794cae0d863c829011df3f87dc1fb70f977d;hp=82cb2075d8f8196edf32524b048b96dbc7ca445c;hpb=ef3eaa49d2dfc9ce74411ec534d31c46875d28e7;p=spider.git diff --git a/perl/QXProt.pm b/perl/QXProt.pm index 82cb2075..b9cf952c 100644 --- a/perl/QXProt.pm +++ b/perl/QXProt.pm @@ -154,10 +154,15 @@ sub handleI my $self = shift; my @f = split /\^/, $_[3]; - my $inv = Verify->new($f[7]); - unless ($inv->verify($f[8], $main::me->user->passphrase, $main::mycall, $self->call)) { - $self->sendnow('D','Sorry...'); - $self->disconnect; + if ($self->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...'); + $self->disconnect; + } + $self->{verified} = 1; + } else { + $self->{verified} = 0; } if ($self->{outbound}) { $self->send($self->genI); @@ -175,8 +180,12 @@ sub handleI sub genI { my $self = shift; - my $inp = Verify->new; - return frame('I', $self->call, "DXSpider", ($main::version + 53) * 100, $main::build, $inp->challenge, $inp->response($self->user->passphrase, $self->call, $main::mycall)); + my @out = ('I', $self->call, "DXSpider", ($main::version + 53) * 100, $main::build); + if (my $pass = $self->user->passphrase) { + my $inp = Verify->new; + push @out, $inp->challenge, $inp->response($pass, $self->call, $main::mycall); + } + return frame(@out); } sub handleR