From: timriker Date: Tue, 23 Nov 2004 07:12:24 +0000 (+0000) Subject: wingate -> Wingate X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=348d8918caacce3bb9483768c4afb1764b4ca01c;p=infobot.git wingate -> Wingate git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk@1076 c11ca15a-4712-0410-83d8-924469b57eb5 --- diff --git a/blootbot/files/sample/blootbot.config b/blootbot/files/sample/blootbot.config index 6b98476..df2d9d8 100644 --- a/blootbot/files/sample/blootbot.config +++ b/blootbot/files/sample/blootbot.config @@ -259,7 +259,7 @@ set UserInfo true set Uptime true # [0/1] Wingate checking and banning mechanism. FIXME: -###set wingate false +###set Wingate false # [int] seconds. minimum time to check. set wingateInterval 60 # [str] Wingate. diff --git a/blootbot/src/CommandStubs.pl b/blootbot/src/CommandStubs.pl index 34c8be1..7383d1a 100644 --- a/blootbot/src/CommandStubs.pl +++ b/blootbot/src/CommandStubs.pl @@ -457,7 +457,7 @@ sub Modules { # wingate. if ($message =~ /^wingate$/i) { - return unless (&hasParam("wingate")); + return unless (&hasParam('Wingate')); my $reply = "Wingate statistics: scanned \002" .scalar(keys %wingate)."\002 hosts"; diff --git a/blootbot/src/IRC/IrcHooks.pl b/blootbot/src/IRC/IrcHooks.pl index fc71c18..57b41a0 100644 --- a/blootbot/src/IRC/IrcHooks.pl +++ b/blootbot/src/IRC/IrcHooks.pl @@ -171,7 +171,7 @@ sub on_endofmotd { } # end of first time run. - if (&IsChanConf("wingate")) { + if (&IsChanConf('Wingate')) { my $file = "$bot_base_dir/$param{'ircUser'}.wingate"; open(IN, $file); while () { diff --git a/blootbot/src/IRC/Schedulers.pl b/blootbot/src/IRC/Schedulers.pl index 26df088..9fbe0c8 100644 --- a/blootbot/src/IRC/Schedulers.pl +++ b/blootbot/src/IRC/Schedulers.pl @@ -924,14 +924,14 @@ sub kernelLoop { } sub wingateCheck { - return unless &IsChanConf("wingate"); + return unless &IsChanConf('Wingate'); ### FILE CACHE OF OFFENDING WINGATES. foreach (grep /^$host$/, @wingateBad) { &status("Wingate: RUNNING ON $host BY $who"); - &ban("*!*\@$host", "") if &IsChanConf("wingateBan"); + &ban("*!*\@$host", "") if &IsChanConf('wingateBan'); - my $reason = &getChanConf("wingateKick"); + my $reason = &getChanConf('wingateKick'); next unless ($reason); &kick($who, "", $reason) @@ -945,21 +945,21 @@ sub wingateCheck { &DEBUG("Already scanned $host. good."); } - my $interval = &getChanConfDefault("wingateInterval", 60); # seconds. - return if (defined $forked{'wingate'}); + my $interval = &getChanConfDefault('wingateInterval', 60); # seconds. + return if (defined $forked{'Wingate'}); return if (time() - $wingaterun <= $interval); return unless (scalar(keys %wingateToDo)); $wingaterun = time(); - &Forker("wingate", sub { &Wingate::Wingates(keys %wingateToDo); } ); + &Forker('Wingate', sub { &Wingate::Wingates(keys %wingateToDo); } ); undef @wingateNow; } ### TODO: ?? sub wingateWriteFile { if (@_) { - &ScheduleThis(60, "wingateWriteFile"); + &ScheduleThis(60, 'wingateWriteFile'); return if ($_[0] eq "2"); # defer. } @@ -967,7 +967,7 @@ sub wingateWriteFile { my $file = "$bot_base_dir/$param{'ircUser'}.wingate"; if ($bot_pid != $$) { - &DEBUG("wingateWriteFile: Reorganising!"); + &DEBUG('wingateWriteFile: Reorganising!'); open(IN, $file); while () { @@ -981,7 +981,7 @@ sub wingateWriteFile { @wingateNow = sort keys %hash; } - &DEBUG("wingateWF: writing..."); + &DEBUG('wingateWF: writing...'); open(OUT, ">$file"); foreach (@wingateNow) { print OUT "$_\n"; diff --git a/blootbot/src/Modules/Wingate.pl b/blootbot/src/Modules/Wingate.pl index f834fb4..bb93593 100644 --- a/blootbot/src/Modules/Wingate.pl +++ b/blootbot/src/Modules/Wingate.pl @@ -72,13 +72,13 @@ sub Wingate { if ($wingate) { &::status("Wingate: RUNNING ON $host BY $::who."); - if (&::IsChanConf("wingateBan") > 0) { + if (&::IsChanConf('wingateBan') > 0) { &::ban("*!*\@$host", ""); } - my $reason = &::getChanConf("wingateKick"); + my $reason = &::getChanConf('wingateKick'); if ($reason) { - &::kick($::who, "", $reason); + &::kick($::who, '', $reason); } push(@::wingateBad, "$host\*"); diff --git a/blootbot/src/modules.pl b/blootbot/src/modules.pl index 73bed3a..e66af51 100644 --- a/blootbot/src/modules.pl +++ b/blootbot/src/modules.pl @@ -53,7 +53,7 @@ if ($@) { "UserInfo" => "UserInfo.pl", "Weather" => "Weather.pl", "wikipedia" => "wikipedia.pl", - "wingate" => "Wingate.pl", + "Wingate" => "Wingate.pl", "wwwsearch" => "W3Search.pl", "zfi" => "zfi.pl", "zippy" => "Zippy.pl",