diff options
| author | 2016-01-13 22:09:28 -0700 | |
|---|---|---|
| committer | 2016-01-13 22:09:28 -0700 | |
| commit | a15a182b2cf6ed3a64cfb48bbf59519d086d98f3 (patch) | |
| tree | 38a8cb91dfc5f88b97bf5d2aad026e44520f4580 /lib/ASM/Inspect.pm | |
| parent | aa8fb99e32987c4da8871607fa94d70577c39495 (diff) | |
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
Diffstat (limited to 'lib/ASM/Inspect.pm')
| -rw-r--r-- | lib/ASM/Inspect.pm | 9 |
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? |
