]> git.donarmstrong.com Git - infobot.git/commitdiff
lowercase chan in on_kick, found by xsdg!
authordms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Fri, 29 Dec 2000 14:05:14 +0000 (14:05 +0000)
committerdms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Fri, 29 Dec 2000 14:05:14 +0000 (14:05 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@212 c11ca15a-4712-0410-83d8-924469b57eb5

src/IRC/IrcHooks.pl

index 9b11e7aba9fee5975f2672cb7ff81a5d75102887..8351d9e6eb713e2a275443e65d8ed8d1708fb279 100644 (file)
@@ -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);