From: dms Date: Fri, 8 Nov 2002 15:27:27 +0000 (+0000) Subject: - updated apt's source to cvs, undefined values here and there popped X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=601bb143b9109c8f243f6e2403449acf8e6e7709;p=infobot.git - updated apt's source to cvs, undefined values here and there popped up. fixed. git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk@610 c11ca15a-4712-0410-83d8-924469b57eb5 --- diff --git a/blootbot/src/IRC/Irc.pl b/blootbot/src/IRC/Irc.pl index 3496cb4..5d16ddc 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*$/) { + if (!defined $chan or $chan =~ /^\s*$/ or $chan =~ /^_default$/) { return 0; } diff --git a/blootbot/src/IRC/IrcHooks.pl b/blootbot/src/IRC/IrcHooks.pl index fee1b60..92238fb 100644 --- a/blootbot/src/IRC/IrcHooks.pl +++ b/blootbot/src/IRC/IrcHooks.pl @@ -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 = ( diff --git a/blootbot/src/Modules/Debian.pl b/blootbot/src/Modules/Debian.pl index d963a97..86bf028 100644 --- a/blootbot/src/Modules/Debian.pl +++ b/blootbot/src/Modules/Debian.pl @@ -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", ); diff --git a/blootbot/src/UserExtra.pl b/blootbot/src/UserExtra.pl index 2e2dc64..c26b3b3 100644 --- a/blootbot/src/UserExtra.pl +++ b/blootbot/src/UserExtra.pl @@ -347,7 +347,7 @@ sub tell { $who = $oldwho; # no such factoid. - if ($result =~ /^0?$/) { + if (!defined $result || $result =~ /^0?$/) { $who = $target; $msgType = "private"; diff --git a/blootbot/src/db_mysql.pl b/blootbot/src/db_mysql.pl index 559ac2d..1c925bd 100644 --- a/blootbot/src/db_mysql.pl +++ b/blootbot/src/db_mysql.pl @@ -312,7 +312,7 @@ sub dbReplace { push(@vals, $hash{'-'.$_}); } else { push(@keys, $_); - push(@vals, &dbQuote($hash{$_})); + push(@vals, &dbQuote( $hash{$_} )); } }