added IP address logging for connections
[spider.git] / perl / DXProt.pm
index f6a32cce44f9ef97be30adf9cac8008de470032a..e78d9a7a20fb0e2f2afe27e671e2cae00c430954 100644 (file)
@@ -216,6 +216,10 @@ sub start
        my ($self, $line, $sort) = @_;
        my $call = $self->{call};
        my $user = $self->{user};
+
+       # log it
+       my $host = $self->{conn}->{peerhost} || "unknown";
+       Log('DXProt', "$call connected from $host");
        
        # remember type of connection
        $self->{consort} = $line;
@@ -267,8 +271,6 @@ sub start
 
        # send info to all logged in thingies
        $self->tell_login('loginn');
-
-       Log('DXProt', "$call connected");
 }
 
 #