From 7533314bbbd3a5c0ed294fdf44c8e7dc78d8d114 Mon Sep 17 00:00:00 2001 From: dms Date: Sun, 10 Dec 2000 12:52:55 +0000 Subject: [PATCH] tempdir fix git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@190 c11ca15a-4712-0410-83d8-924469b57eb5 --- src/core.pl | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/core.pl b/src/core.pl index aca4ce2..4faff2f 100644 --- a/src/core.pl +++ b/src/core.pl @@ -148,7 +148,7 @@ sub setup { &showProc(" (\&openLog before)"); &openLog(); # write, append. - foreach ("debian","Temp") { + foreach ("debian") { my $dir = "$bot_base_dir/$_/"; next if ( -d $dir); &status("Making dir $_"); @@ -185,12 +185,17 @@ sub setupConfig { &NEWloadConfig(); } - foreach ("ircNick", "ircUser", "ircName", "DBType") { + foreach ("ircNick", "ircUser", "ircName", "DBType", "tempDir") { next if &IsParam($_); &ERROR("Parameter $_ has not been defined."); exit 1; } + if (! -d $param{tempDir}) { + &status("making $param{tempDir}..."); + system("mkdir $param{tempDir}"); + } + # static scalar variables. $file{utm} = "$bot_base_dir/$param{'ircUser'}.uptime"; $file{PID} = "$bot_base_dir/$param{'ircUser'}.pid"; @@ -221,7 +226,7 @@ sub restart { my ($sig) = @_; if ($$ == $bot_pid) { - &status("$sig called."); + &status("--- $sig called."); ### crappy bug in Net::IRC? if (!$conn->connected and time - $msgtime > 900) { @@ -236,7 +241,7 @@ sub restart { &reloadAllModules() if (&IsParam("DEBUG")); &setup(); - &status("End of $sig."); + &status("--- End of $sig."); } else { &status("$sig called; ignoring restart."); } -- 2.39.2