From 25c4b1af8f95d195797cb85f5585125182c1a520 Mon Sep 17 00:00:00 2001
From: dms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
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@190 c11ca15a-4712-0410-83d8-924469b57eb5
---
 blootbot/src/core.pl | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/blootbot/src/core.pl b/blootbot/src/core.pl
index aca4ce2..4faff2f 100644
--- a/blootbot/src/core.pl
+++ b/blootbot/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.5