From da2441ef2f62bc1aa3f650af0ba1151e38b0b16a Mon Sep 17 00:00:00 2001 From: timriker Date: Thu, 21 Nov 2002 06:51:58 +0000 Subject: [PATCH] change startup msgs git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk@636 c11ca15a-4712-0410-83d8-924469b57eb5 --- blootbot/src/db_dbm.pl | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/blootbot/src/db_dbm.pl b/blootbot/src/db_dbm.pl index 7d97f5a..d702d9e 100644 --- a/blootbot/src/db_dbm.pl +++ b/blootbot/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."); } } } -- 2.39.5