]> git.donarmstrong.com Git - infobot.git/commitdiff
wingate -> Wingate
authortimriker <timriker@c11ca15a-4712-0410-83d8-924469b57eb5>
Tue, 23 Nov 2004 07:12:24 +0000 (07:12 +0000)
committertimriker <timriker@c11ca15a-4712-0410-83d8-924469b57eb5>
Tue, 23 Nov 2004 07:12:24 +0000 (07:12 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@1076 c11ca15a-4712-0410-83d8-924469b57eb5

files/sample/blootbot.config
src/CommandStubs.pl
src/IRC/IrcHooks.pl
src/IRC/Schedulers.pl
src/Modules/Wingate.pl
src/modules.pl

index 6b984761f2d7f08965e2f32721cce07ca75af6c2..df2d9d8d5eaeed0816f5d1b8989a154dc4e12461 100644 (file)
@@ -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.
index 34c8be1169280d39d1e636aa56e3380cb756aca2..7383d1a681b3356b369447943433eecb78420d2d 100644 (file)
@@ -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";
index fc71c18011dd64c899fe6f3bf5d44894fc952335..57b41a01c064593ec2f8423f38f5dac7882636f4 100644 (file)
@@ -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 (<IN>) {
index 26df088c51c6bc6f8347a587ac7dbc385be6e8b4..9fbe0c8cc5c64c03780ff9bfc3171b9b2c5794e7 100644 (file)
@@ -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 (<IN>) {
@@ -981,7 +981,7 @@ sub wingateWriteFile {
        @wingateNow = sort keys %hash;
     }
 
-    &DEBUG("wingateWF: writing...");
+    &DEBUG('wingateWF: writing...');
     open(OUT, ">$file");
     foreach (@wingateNow) {
        print OUT "$_\n";
index f834fb467e19248d109db2e54db50d97f62ac023..bb93593bf4f7176ad85a7577a31e86f978b40677 100644 (file)
@@ -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\*");
index 73bed3a7ef9e649f3d05effcb7095f7333664acd..e66af51b3bb9ac6dbfcb0cc54a779c55c43cdc4c 100644 (file)
@@ -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",