From a15a182b2cf6ed3a64cfb48bbf59519d086d98f3 Mon Sep 17 00:00:00 2001 From: Doug Freed Date: Wed, 13 Jan 2016 22:09:28 -0700 Subject: More bugfixes and improvements - Request and save the real IP when syncing - Handle our nick not matching what we want it to be when we're kicked - Minor style consistency fix - Greatly improve channel syncing - Retrieve hostname/IP bans and quiets better - Clean up generation of reversed IP for DNSBL checking - Improve getHostIP's detection of real hostnames --- lib/ASM/Inspect.pm | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'lib/ASM/Inspect.pm') diff --git a/lib/ASM/Inspect.pm b/lib/ASM/Inspect.pm index 5d8b8e3..9f27100 100644 --- a/lib/ASM/Inspect.pm +++ b/lib/ASM/Inspect.pm @@ -26,15 +26,10 @@ sub inspect { my $nick = lc $event->{nick}; my $xresult; return if (index($nick, ".") != -1); - if ( $event->{host} =~ /gateway\/web\// ) { - if ( $event->{user} =~ /([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})/ ) { - $rev = sprintf("%d.%d.%d.%d.", hex($4), hex($3), hex($2), hex($1)); - } - } - if ( (!defined($rev)) && ($event->{type} eq 'join') ) { + if ( $event->{type} eq 'join' ) { # Only doing DNS lookups for join events will mean that DNSBL will break if we try to do it on something other than joins, # But it also means we cut back on the DNS lookups by a metric shitton - $iaddr = gethostbyname($event->{host}) if ($event->{host} !~ /\//); + $iaddr = ASM::Util->getHostIP($event->{host}); $rev = join('.', reverse(unpack('C4', $iaddr))).'.' if (defined $iaddr); } ## NB: isn't there a better way to do this with grep, somehow? -- cgit v1.2.3