summaryrefslogtreecommitdiffstats
path: root/lib/ASM/Inspect.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ASM/Inspect.pm')
-rw-r--r--lib/ASM/Inspect.pm9
1 files changed, 2 insertions, 7 deletions
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?