From 58832112fa26ced9a904a471a0eb12c8fb84dd33 Mon Sep 17 00:00:00 2001 From: dms Date: Fri, 29 Dec 2000 14:05:14 +0000 Subject: [PATCH] lowercase chan in on_kick, found by xsdg! git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@212 c11ca15a-4712-0410-83d8-924469b57eb5 --- src/IRC/IrcHooks.pl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/IRC/IrcHooks.pl b/src/IRC/IrcHooks.pl index 9b11e7a..8351d9e 100644 --- a/src/IRC/IrcHooks.pl +++ b/src/IRC/IrcHooks.pl @@ -127,7 +127,6 @@ sub on_endofmotd { } if ($firsttime) { - &DEBUG("on_EOM: calling sS in 60s."); $conn->schedule(60, \&setupSchedulers, ""); $firsttime = 0; } @@ -350,6 +349,8 @@ sub on_join { $chanstats{$chan}{'Join'}++; $userstats{lc $who}{'Join'} = time() if (&IsParam("seenStats")); + &joinfloodCheck($who, $chan, $event->userhost); + # netjoin detection. my $netsplit = 0; if (exists $netsplit{lc $who}) { @@ -408,6 +409,7 @@ sub on_kick { &status(">>> kick/$b_blue$chan$ob [$b$kickee!$uh$ob] by $b_cyan$kicker$ob $b_yellow($ob$reason$b_yellow)$ob"); + $chan = lc $chan; # forgot about this, found by xsdg, 20001229. $chanstats{$chan}{'Kick'}++; if ($kickee eq $ident) { @@ -562,6 +564,12 @@ sub on_part { my $nick = $event->nick; my $userhost = $event->userhost; + if (!exists $floodjoin{$chan}{$nick}{Time}) { + &WARN("on_part: $nick/$chan not in floodjoin hash?"); + } else { + delete $floodjoin{$chan}{$nick}; + } + $chanstats{$chan}{'Part'}++; &DeleteUserInfo($nick,$chan); &clearChanVars($chan) if ($nick eq $ident); -- 2.39.2