From: timriker Date: Thu, 21 Nov 2002 06:51:58 +0000 (+0000) Subject: change startup msgs X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=a2444dae59a436d1d20500ce781f3ddd284daf63;p=infobot.git change startup msgs git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@636 c11ca15a-4712-0410-83d8-924469b57eb5 --- diff --git a/src/db_dbm.pl b/src/db_dbm.pl index 7d97f5a..d702d9e 100644 --- a/src/db_dbm.pl +++ b/src/db_dbm.pl @@ -62,17 +62,18 @@ use vars qw(%factoids %freshmeat %seen %rootwarn); # db hash. sub openDB { my ($dbname) = @_; use DB_File; - foreach (keys %formats) { - next unless (&::IsParam($_)); - - my $file = "$dbname-$_"; - - if (dbmopen(%{ $_ }, $file, 0666)) { - &::status("Opened DBM $_ ($file)."); + foreach $table (keys %formats) { + my $file = "$dbname-$table"; + if (&::IsParam($table)) { + if (dbmopen(%{ $table }, $file, 0666)) { + &::status("Opened DBM $table ($file)."); + } else { + &::ERROR("Failed open to DBM $table ($file)."); + &::shutdown(); + exit 1; + } } else { - &::ERROR("Failed open to DBM $_ ($file)."); - &::shutdown(); - exit 1; + &::status("DBM $table ($file) disabled."); } } }