From 7b5f6e1b78b371540379b43d771028f815b3a416 Mon Sep 17 00:00:00 2001 From: dms Date: Wed, 31 Jan 2001 13:17:40 +0000 Subject: [PATCH] prevent repetion in verifyUser. git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk@280 c11ca15a-4712-0410-83d8-924469b57eb5 --- blootbot/src/DynaConfig.pl | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/blootbot/src/DynaConfig.pl b/blootbot/src/DynaConfig.pl index bfc5dd1..3378ef0 100644 --- a/blootbot/src/DynaConfig.pl +++ b/blootbot/src/DynaConfig.pl @@ -316,6 +316,10 @@ sub IsFlag { my $flags = shift; my ($ret, $f, $o) = ""; + if (!defined $userHandle) { + &DEBUG("Dyna: line 320: add verifyUser"); + } + foreach $f (split //, $users{$userHandle}{FLAGS}) { foreach $o ( split //, $flags ) { next unless ($f eq $o); @@ -354,8 +358,9 @@ sub verifyUser { last if ($userHandle ne ""); - if ($user =~ /^\Q$nick\E$/i) { + if ($user =~ /^\Q$nick\E$/i and !exists $cache{VUSERWARN}{$user}) { &status("vU: nick matched but host is not in list ($lnuh)."); + $cache{VUSERWARN}{$user} = 1; } } @@ -410,14 +415,17 @@ sub ignoreAdd { $expire = 0; } + my $exist = 0; + $exist++ if (exists $ignore{$chan}{$mask}); + $ignore{$chan}{$mask} = [$expire, $count, $who, time(), $comment]; - if (exists $ignore{$chan}{$mask}) { - return 0; - } else { + if ($exist) { $utime_userfile = time(); $ucount_userfile++; + return 2; + } else { return 1; } } -- 2.39.5