From 645cc36c05909b0ffd0ec9423e3633c8a1b8673b Mon Sep 17 00:00:00 2001 From: William Heimbigner Date: Thu, 7 Jan 2016 19:55:36 -0700 Subject: Use Tie::CPHash to make %::sn and %::sc case-insensitiveish. Clean up commands.xml and fix some bugs Add clone detection Minimize some excessive warnings Greatly improve syncing speed --- config-default/commands.xml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'config-default') diff --git a/config-default/commands.xml b/config-default/commands.xml index 7a568de..8c81588 100644 --- a/config-default/commands.xml +++ b/config-default/commands.xml @@ -200,11 +200,11 @@ my $dbh = $::db->{DBH}; my $mnicks = $dbh->do("SELECT * from $::db->{ACTIONTABLE} WHERE nick like " . $dbh->quote($nick) . ';'); - my $musers = (lc $person->{user} ~~ $::mysql->{ignoredidents}) ? "didn't check ($person->{user})" : + my $musers = (lc $person->{user} ~~ $::mysql->{ignoredidents}) ? "didn't check" : $dbh->do("SELECT * from $::db->{ACTIONTABLE} WHERE user like " . $dbh->quote($person->{user}) . ';'); my $mhosts = $dbh->do("SELECT * from $::db->{ACTIONTABLE} WHERE host like " . $dbh->quote($person->{host}) . ';'); my $maccts = $dbh->do("SELECT * from $::db->{ACTIONTABLE} WHERE account like " . $dbh->quote($person->{account}) . ';'); - my $mgecos = (lc $person->{gecos} ~~ $::mysql->{ignoredgecos}) ? "didn't check ($person->{gecos})" : + my $mgecos = (lc $person->{gecos} ~~ $::mysql->{ignoredgecos}) ? "didn't check" : $dbh->do("SELECT * from $::db->{ACTIONTABLE} WHERE gecos like " . $dbh->quote($person->{gecos}) . ';'); my $ip = ASM::Util->getNickIP($nick); @@ -218,14 +218,14 @@ $matchedip =~ s/0E0/0/; my $dq = ''; if (defined($ip)) { - $dq = '&realip=' . join '.', unpack 'C4', pack 'N', $ip; + $dq = join '.', unpack 'C4', pack 'N', $ip; } - $conn->privmsg($event->replyto, "I found $mnicks matches by nick, $musers user matches, $mhosts by hostname, " . - "$maccts by NickServ account, $mgecos by gecos field, and $matchedip by real IP." . + $conn->privmsg($event->replyto, "I found $mnicks matches by nick ($nick), $musers by user ($person->{user}), $mhosts by hostname ($person->{host}), " . + "$maccts by NickServ account ($person->{account}), $mgecos by gecos field ($person->{gecos}), and $matchedip by real IP ($dq)." . ' Web results are at https://antispammeta.net/cgi-bin/secret/investigate.pl?nick=' . uri_escape($nick) . ((lc $person->{user} ~~ $::mysql->{ignoredidents}) ? '' : '&user=' . uri_escape($person->{user})) . '&host=' . uri_escape($person->{host}) . '&account=' . uri_escape($person->{account}) . - ((lc $person->{gecos} ~~ $::mysql->{ignoredgecos}) ? '' : '&gecos=' . uri_escape($person->{gecos})) . $dq); + ((lc $person->{gecos} ~~ $::mysql->{ignoredgecos}) ? '' : '&gecos=' . uri_escape($person->{gecos})) . '&realip=' . $dq); ]]> @@ -426,11 +426,11 @@ {channel}})) { foreach my $level (keys(%{$::channels->{channel}->{$chan}->{hilights}})) { - if (grep(/^${nick}$/i, @{$::channels->{channel}->{$chan}->{hilights}->{$level}})) { + if ( $nick ~~ $::channels->{channel}->{$chan}->{hilights}->{$level}) { push @channels, $chan . " ($level)"; } } -- cgit v1.2.3