]> git.donarmstrong.com Git - infobot.git/commitdiff
- bleh. no need to explain. had to back out one change by mistake.
authordms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Fri, 8 Nov 2002 15:42:09 +0000 (15:42 +0000)
committerdms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Fri, 8 Nov 2002 15:42:09 +0000 (15:42 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@611 c11ca15a-4712-0410-83d8-924469b57eb5

src/IRC/Irc.pl
src/Modules/Debian.pl
src/UserExtra.pl

index 5d16ddcc2584fc54a07f847b2bb88a1af86205cd..a5a90cafe10754a6dca26c7ac29b1750ed0565c8 100644 (file)
@@ -720,7 +720,7 @@ sub validChan {
     # todo: use $c instead?
     my ($chan) = @_;
 
-    if (!defined $chan or $chan =~ /^\s*$/ or $chan =~ /^_default$/) {
+    if (!defined $chan or $chan =~ /^\s*$/) {
        return 0;
     }
 
@@ -731,7 +731,7 @@ sub validChan {
 
     # it's possible that this check creates the hash if empty.
     if (defined $channels{$chan} or exists $channels{$chan}) {
-       if ($chan eq "_default") {
+       if ($chan =~ /^_?default$/) {
 #          &WARN("validC: chan cannot be _default! returning 0!");
            return 0;
        }
index 86bf028c47e68988ff4571002bd3750fcd3be20e..f43804b8e366cf86cb10ca538d7ffdcd5d4f7ce0 100644 (file)
@@ -16,6 +16,7 @@ my $refresh = &::getChanConfDefault("debianRefreshInterval",7)
                        * 60 * 60 * 24;
 my $debug      = 0;
 my $debian_dir = "$::bot_state_dir/debian";
+my $country    = "ca";
 
 my %dists      = (
        "unstable"      => "sid",
@@ -27,7 +28,7 @@ my %dists     = (
 
 my %urlcontents = (
        "Contents-##DIST-i386.gz" =>
-               "ftp://ftp.us.debian.org".
+               "ftp://ftp.$country.debian.org".
                "/debian/dists/##DIST/Contents-i386.gz",
        "Contents-##DIST-i386-non-US.gz" =>
                "ftp://non-us.debian.org".
@@ -36,13 +37,13 @@ my %urlcontents = (
 
 my %urlpackages = (
        "Packages-##DIST-main-i386.gz" =>
-               "ftp://ftp.us.debian.org".
+               "ftp://ftp.$country.debian.org".
                "/debian/dists/##DIST/main/binary-i386/Packages.gz",
        "Packages-##DIST-contrib-i386.gz" =>
-               "ftp://ftp.us.debian.org".
+               "ftp://ftp.$country.debian.org".
                "/debian/dists/##DIST/contrib/binary-i386/Packages.gz",
        "Packages-##DIST-non-free-i386.gz" =>
-               "ftp://ftp.us.debian.org".
+               "ftp://ftp.$country.debian.org".
                "/debian/dists/##DIST/non-free/binary-i386/Packages.gz",
 
        "Packages-##DIST-non-US-main-i386.gz" =>
@@ -782,7 +783,7 @@ sub infoStats {
     }
 
     my %stats;
-    my %total;
+    my %total = (maint => 0, isize => 0, csize => 0);
     my $file;
     foreach $file (keys %urlpackages) {
        $file =~ s/##DIST/$dist/g;      # won't work for incoming.
index c26b3b3d511e4d8c67e0fb54b0f4771763fca6c1..895d8cb22616eec2c3fe5ce7ded3bffe535dabb7 100644 (file)
@@ -815,11 +815,12 @@ sub userCommands {
          "kB of memory."
        );
 
-       # todo: make dbGetColNiceHash().
+       # todo: use dbGetColNiceHash().
        my %hash = &dbGetCol("stats", "nick,counter", "type='cmdstats'".
 #                      " ORDER BY counter DESC LIMIT 3", 1);
                        " ORDER BY counter DESC", 1);
 
+if (0) {
        foreach (keys %hash) {
            my $i = $_;
            foreach (keys %{ $hash{$i} }) {
@@ -827,6 +828,7 @@ sub userCommands {
            }
        }
        &DEBUG("end of cmdstats.");
+}
 
        return;
     }