]> git.donarmstrong.com Git - infobot.git/commitdiff
tempdir fix
authordms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Sun, 10 Dec 2000 12:52:55 +0000 (12:52 +0000)
committerdms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Sun, 10 Dec 2000 12:52:55 +0000 (12:52 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@190 c11ca15a-4712-0410-83d8-924469b57eb5

src/core.pl

index aca4ce23a1de6950795a4e2ec5625803000ccf46..4faff2fb4ec8f32587f4dc41aeed5c4070bea8a6 100644 (file)
@@ -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.");
     }