CVS: blootbot/src/IRC Irc.pl,1.103,1.104 Schedulers.pl,1.134,1.135
Brought to you by:
timriker
From: Tim R. <tim...@us...> - 2005-03-08 22:47:34
|
Update of /cvsroot/blootbot/blootbot/src/IRC In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25672/src/IRC Modified Files: Irc.pl Schedulers.pl Log Message: explicit $chan for getChanConfDefault Index: Irc.pl =================================================================== RCS file: /cvsroot/blootbot/blootbot/src/IRC/Irc.pl,v retrieving revision 1.103 retrieving revision 1.104 diff -u -r1.103 -r1.104 --- Irc.pl 28 Feb 2005 23:31:05 -0000 1.103 +++ Irc.pl 8 Mar 2005 22:47:20 -0000 1.104 @@ -233,8 +233,8 @@ $pubcount++; $pubsize += length $msg; - my $i = &getChanConfDefault("sendPublicLimitLines", 3); - my $j = &getChanConfDefault("sendPublicLimitBytes", 1000); + my $i = &getChanConfDefault("sendPublicLimitLines", 3, $chan); + my $j = &getChanConfDefault("sendPublicLimitBytes", 1000, $chan); if ( ($pubcount % $i) == 0 and $pubcount) { sleep 1; @@ -274,8 +274,8 @@ $msgcount++; $msgsize += length $msg; - my $i = &getChanConfDefault("sendPrivateLimitLines", 3); - my $j = &getChanConfDefault("sendPrivateLimitBytes", 1000); + my $i = &getChanConfDefault("sendPrivateLimitLines", 3, $chan); + my $j = &getChanConfDefault("sendPrivateLimitBytes", 1000, $chan); if ( ($msgcount % $i) == 0 and $msgcount) { sleep 1; } elsif ($msgsize > $j) { @@ -326,8 +326,8 @@ $notcount++; $notsize += length $txt; - my $i = &getChanConfDefault("sendNoticeLimitLines", 3); - my $j = &getChanConfDefault("sendNoticeLimitBytes", 1000); + my $i = &getChanConfDefault("sendNoticeLimitLines", 3, $chan); + my $j = &getChanConfDefault("sendNoticeLimitBytes", 1000, $chan); if ( ($notcount % $i) == 0 and $notcount) { sleep 1; Index: Schedulers.pl =================================================================== RCS file: /cvsroot/blootbot/blootbot/src/IRC/Schedulers.pl,v retrieving revision 1.134 retrieving revision 1.135 diff -u -r1.134 -r1.135 --- Schedulers.pl 2 Mar 2005 06:00:15 -0000 1.134 +++ Schedulers.pl 8 Mar 2005 22:47:21 -0000 1.135 @@ -29,7 +29,7 @@ sub queueTask { my($codename, $chanconfdef, $intervaldef, $defer) = @_; - my $t = &getChanConfDefault($chanconfdef, $intervaldef); + my $t = &getChanConfDefault($chanconfdef, $intervaldef, $chan); my $waittime = &getRandomInt($t); if (!defined $waittime) { @@ -125,7 +125,7 @@ #### sub randomQuote { - my $interval = &getChanConfDefault("randomQuoteInterval", 60); + my $interval = &getChanConfDefault("randomQuoteInterval", 60, $chan); if (@_) { &ScheduleThis($interval, "randomQuote"); return if ($_[0] eq "2"); # defer. @@ -151,7 +151,7 @@ my ($key,$val); my $error = 0; - my $interval = &getChanConfDefault("randomFactoidInterval", 60); + my $interval = &getChanConfDefault("randomFactoidInterval", 60, $chan); if (@_) { &ScheduleThis($interval, "randomFactoid"); return if ($_[0] eq "2"); # defer. @@ -259,7 +259,7 @@ return unless (&IsChanConf("seenFlushInterval") > 0); # global setting. does not make sense for per-channel. - my $max_time = &getChanConfDefault("seenMaxDays", 30) *60*60*24; + my $max_time = &getChanConfDefault("seenMaxDays", 30, $chan) *60*60*24; my $delete = 0; if ($param{'DBType'} =~ /^(pgsql|mysql|sqlite)/i) { @@ -369,7 +369,7 @@ } sub chanlimitCheck { - my $interval = &getChanConfDefault("chanlimitcheckInterval", 10); + my $interval = &getChanConfDefault("chanlimitcheckInterval", 10, $chan); my $mynick=$conn->nick(); if (@_) { @@ -523,7 +523,7 @@ } my $time = time(); - my $interval = &getChanConfDefault("floodCycle",60); + my $interval = &getChanConfDefault("floodCycle",60, $chan); foreach $who (keys %flood) { foreach (keys %{ $flood{$who} }) { @@ -543,7 +543,7 @@ sub seenFlush { if (@_) { - my $interval = &getChanConfDefault("seenFlushInterval", 60); + my $interval = &getChanConfDefault("seenFlushInterval", 60, $chan); &ScheduleThis($interval, "seenFlush"); return if ($_[0] eq "2"); } @@ -945,7 +945,7 @@ &DEBUG("Already scanned $host. good."); } - my $interval = &getChanConfDefault('wingateInterval', 60); # seconds. + my $interval = &getChanConfDefault('wingateInterval', 60, $chan); # seconds. return if (defined $forked{'Wingate'}); return if (time() - $wingaterun <= $interval); return unless (scalar(keys %wingateToDo)); @@ -996,7 +996,7 @@ } my @list = &searchTable("factoids", "factoid_key", "factoid_key", " #DEL#"); - my $stale = &getChanConfDefault("factoidDeleteDelay", 14) *60*60*24; + my $stale = &getChanConfDefault("factoidDeleteDelay", 14, $chan) *60*60*24; if ($stale < 1) { # disable it since it's "illegal". return; |