]> git.donarmstrong.com Git - infobot.git/commitdiff
- updated apt's source to cvs, undefined values here and there popped
authordms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Fri, 8 Nov 2002 15:27:27 +0000 (15:27 +0000)
committerdms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Fri, 8 Nov 2002 15:27:27 +0000 (15:27 +0000)
  up. fixed.

git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@610 c11ca15a-4712-0410-83d8-924469b57eb5

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

index 3496cb4cd1720eda09c5b29a02b11e0ab380bdac..5d16ddcc2584fc54a07f847b2bb88a1af86205cd 100644 (file)
@@ -720,7 +720,7 @@ sub validChan {
     # todo: use $c instead?
     my ($chan) = @_;
 
-    if (!defined $chan or $chan =~ /^\s*$/) {
+    if (!defined $chan or $chan =~ /^\s*$/ or $chan =~ /^_default$/) {
        return 0;
     }
 
index fee1b60622c3700697f87928d0f6d366f352db43..92238fb9a0725787c3fe1ae6347720327600ef83 100644 (file)
@@ -887,6 +887,7 @@ sub on_public {
            $v++;
 
            # don't allow ppl to cheat the stats :-)
+           next unless (defined $t);
            next unless ($time - $t > 10);
 
            my %hash = (
index d963a973d7a99d57cef969936ed92ff8de131fb3..86bf028c47e68988ff4571002bd3750fcd3be20e 100644 (file)
@@ -17,20 +17,11 @@ my $refresh = &::getChanConfDefault("debianRefreshInterval",7)
 my $debug      = 0;
 my $debian_dir = "$::bot_state_dir/debian";
 
-### ... old
-#my %dists     = (
-#      "sid"           => "unstable",
-#      "woody"         => "testing",   # new since 20001219.
-#      "potato"        => "stable",
-#      "incoming"      => "incoming",
-#);
-
-### new... the right way.
 my %dists      = (
        "unstable"      => "sid",
-       "testing"       => "sarge",     # new since 20020719.
+       "testing"       => "sarge",
        "stable"        => "woody",
-       "old-stable"    => "potato",
+       "old-stable"    => "potato",    # this still works?
        "incoming"      => "incoming",
 );
 
index 2e2dc643fa8ffd1229e9a4e0aee1e23e89fdb99b..c26b3b3d511e4d8c67e0fb54b0f4771763fca6c1 100644 (file)
@@ -347,7 +347,7 @@ sub tell {
     $who               = $oldwho;
 
     # no such factoid.
-    if ($result =~ /^0?$/) {
+    if (!defined $result || $result =~ /^0?$/) {
        $who            = $target;
        $msgType        = "private";
 
index 559ac2d2dca8cb2553f87cb313b76e42e3aa56b6..1c925bdbdffb97c31d0ed5f8b5f80c6ad1567e43 100644 (file)
@@ -312,7 +312,7 @@ sub dbReplace {
            push(@vals, $hash{'-'.$_});
        } else {
            push(@keys, $_);
-           push(@vals, &dbQuote($hash{$_}));
+           push(@vals, &dbQuote( $hash{$_} ));
        }
     }