--- src/main.c.orig Mon May 5 06:05:32 2003 +++ src/main.c Mon Jun 2 11:16:57 2003 @@ -70,7 +70,7 @@ #define _POSIX_SOURCE 1 #endif -extern char origbotname[], userfile[], botnetnick[]; +extern char origbotname[], userfile[], botnetnick[], tempdir[]; extern int dcc_total, conmask, cache_hit, cache_miss, max_logs, quick_logs; extern struct dcc_t *dcc; extern struct userrec *userlist; @@ -101,7 +101,7 @@ * stats? */ int term_z = 0; /* Foreground: use the terminal as a party * line? */ -char configfile[121] = "eggdrop.conf"; /* Name of the config file */ +char configfile[121] = __PREFIX__ "eggdrop.conf"; /* Name of the config file */ char helpdir[121] = "help/"; /* Directory of help files (if used) */ char textdir[121] = "text/"; /* Directory for text files that get dumped */ int keep_all_logs = 0; /* Never erase logfiles, no matter how old @@ -735,6 +735,8 @@ } #endif + chdir(__PREFIX__ "/share/eggdrop"); + /* Initialise context list */ for (i = 0; i < 16; i++) Context; @@ -834,7 +836,7 @@ cache_miss = 0; cache_hit = 0; if (!pid_file[0]) - egg_snprintf(pid_file, sizeof pid_file, "pid.%s", botnetnick); + egg_snprintf(pid_file, sizeof pid_file, "%.100s/pid.%.32s", tempdir, botnetnick); /* Check for pre-existing eggdrop! */ f = fopen(pid_file, "r");