--- deliantra/server/ext/tcp.ext 2010/04/29 07:32:34 1.16 +++ deliantra/server/ext/tcp.ext 2010/05/09 21:46:39 1.18 @@ -1,4 +1,4 @@ -#! perl # MANDATORY +#! perl # mandatory # this listens for new tcp connections and hands them over to the server core # wether this being an extension introduces or reduces stability problems @@ -18,7 +18,11 @@ my ($fh, $host, $port) = @_ or return; - cf::info "new connection from ", (format_hostport $host, $port), "\n"; + my $lhost = AnyEvent::Socket::format_address + +(AnyEvent::Socket::unpack_sockaddr getsockname $fh)[1]; + + cf::info "new connection from ", (format_hostport $host, $port), "\n" + if $lhost ne $host; # do not log connections from the host, e.g. for watchdogs cf::client::create fileno $fh, $host; };