From 78ba1baa05ad579c05d22acab029290ee3a3c7d5 Mon Sep 17 00:00:00 2001 From: dms Date: Fri, 8 Dec 2000 13:09:55 +0000 Subject: [PATCH] renamed limitCheck to chanlimitCheck git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@183 c11ca15a-4712-0410-83d8-924469b57eb5 --- src/IRC/Schedulers.pl | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/IRC/Schedulers.pl b/src/IRC/Schedulers.pl index 4b6987b..97d795c 100644 --- a/src/IRC/Schedulers.pl +++ b/src/IRC/Schedulers.pl @@ -17,7 +17,7 @@ sub setupSchedulers { &randomQuote(1) if (&IsParam("randomQuote")); &randomFactoid(1) if (&IsParam("randomFactoid")); &logCycle(1) if (defined fileno LOG and &IsParam("logfile") and &IsParam("maxLogSize")); - &limitCheck(1) if (&IsParam("limitcheck")); + &chanlimitCheck(1) if (&IsParam("chanlimitcheck")); &netsplitCheck(1); # mandatory &floodCycle(1); # mandatory &seenFlush(1) if (&IsParam("seen") and &IsParam("seenFlushInterval")); @@ -204,9 +204,9 @@ sub seenFlushOld { &ScheduleThis(1440, "seenFlushOld") if (@_); } -sub limitCheck { - my $limitplus = $param{'limitcheckPlus'} || 5; - my @channels = split(/[\s\t]+/, lc $param{'limitcheck'}); +sub chanlimitCheck { + my $limitplus = $param{'chanlimitcheckPlus'} || 5; + my @channels = split(/[\s\t]+/, lc $param{'chanlimitcheck'}); foreach (@channels) { next unless (&validChan($_)); @@ -214,6 +214,10 @@ sub limitCheck { my $newlimit = scalar(keys %{$channels{$_}{''}}) + $limitplus; my $limit = $channels{$_}{'l'}; + if (scalar keys %{$channels{$_}{''}} > $limit) { + &status("LIMIT: set too low!!! FIXME"); + } + next unless (!defined $limit or $limit != $newlimit); if (scalar keys %netsplit and $limit) { @@ -222,14 +226,14 @@ sub limitCheck { } if (!exists $channels{$_}{'o'}{$ident}) { - &ERROR("limitcheck: dont have ops on $_."); + &ERROR("chanlimitcheck: dont have ops on $_."); next; } &rawout("MODE $_ +l $newlimit"); } - my $interval = $param{'limitcheckInterval'} || 10; - &ScheduleThis($interval, "limitCheck") if (@_); + my $interval = $param{'chanlimitcheckInterval'} || 10; + &ScheduleThis($interval, "chanlimitCheck") if (@_); } sub netsplitCheck { -- 2.39.5