From b33b383e821c959643f02cac6c636cb11dda53f1 Mon Sep 17 00:00:00 2001 From: dms Date: Fri, 8 Nov 2002 15:42:09 +0000 Subject: [PATCH] - bleh. no need to explain. had to back out one change by mistake. git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk@611 c11ca15a-4712-0410-83d8-924469b57eb5 --- blootbot/src/IRC/Irc.pl | 4 ++-- blootbot/src/Modules/Debian.pl | 11 ++++++----- blootbot/src/UserExtra.pl | 4 +++- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/blootbot/src/IRC/Irc.pl b/blootbot/src/IRC/Irc.pl index 5d16ddc..a5a90ca 100644 --- a/blootbot/src/IRC/Irc.pl +++ b/blootbot/src/IRC/Irc.pl @@ -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; } diff --git a/blootbot/src/Modules/Debian.pl b/blootbot/src/Modules/Debian.pl index 86bf028..f43804b 100644 --- a/blootbot/src/Modules/Debian.pl +++ b/blootbot/src/Modules/Debian.pl @@ -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. diff --git a/blootbot/src/UserExtra.pl b/blootbot/src/UserExtra.pl index c26b3b3..895d8cb 100644 --- a/blootbot/src/UserExtra.pl +++ b/blootbot/src/UserExtra.pl @@ -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; } -- 2.39.5