From: Paul Date: Sat, 4 Oct 2008 21:02:45 +0000 (+0100) Subject: move some more data/log paths missed before X-Git-Url: https://jfr.im/git/irc/quakenet/newserv.git/commitdiff_plain/9e9df6d40f8ab71343e49b0720189d1691b214d3 move some more data/log paths missed before --- diff --git a/core/error.c b/core/error.c index 5e4e02c2..6bc221cf 100644 --- a/core/error.c +++ b/core/error.c @@ -40,11 +40,11 @@ void reopen_logfile(int hooknum, void *arg) { if (logfile) fclose(logfile); - logfile=fopen("newserv.log","a"); + logfile=fopen("log/newserv.log","a"); } void init_logfile() { - logfile=fopen("newserv.log","a"); + logfile=fopen("log/newserv.log","a"); registerhook(HOOK_CORE_SIGUSR1, reopen_logfile); } diff --git a/proxyscan/proxyscan.c b/proxyscan/proxyscan.c index 776d483e..b1663f1f 100644 --- a/proxyscan/proxyscan.c +++ b/proxyscan/proxyscan.c @@ -256,7 +256,7 @@ void _init(void) { /* Schedule saves */ schedulerecurring(time(NULL)+3600,0,3600,&dumpcachehosts,NULL); - ps_logfile=fopen("proxyscan.log","a"); + ps_logfile=fopen("log/proxyscan.log","a"); } void registerproxyscannick(void *arg) { diff --git a/proxyscan/proxyscancache.c b/proxyscan/proxyscancache.c index 81dd5f2f..8c51ac79 100644 --- a/proxyscan/proxyscancache.c +++ b/proxyscan/proxyscancache.c @@ -75,7 +75,7 @@ void dumpcachehosts(void *arg) { foundproxy *fpp; patricia_node_t *node; - if ((fp=fopen("cleanhosts","w"))==NULL) { + if ((fp=fopen("data/cleanhosts","w"))==NULL) { Error("proxyscan",ERR_ERROR,"Unable to open cleanhosts file for writing!"); return; } @@ -129,7 +129,7 @@ void loadcachehosts() { unsigned char bits; patricia_node_t *node; - if ((fp=fopen("cleanhosts","r"))==NULL) { + if ((fp=fopen("data/cleanhosts","r"))==NULL) { Error("proxyscan",ERR_ERROR,"Unable to open cleanhosts file for reading!"); return; } diff --git a/proxyscan/proxyscanext.c b/proxyscan/proxyscanext.c index 81e6871f..23438c23 100644 --- a/proxyscan/proxyscanext.c +++ b/proxyscan/proxyscanext.c @@ -53,7 +53,7 @@ void loadextrascans() { unsigned char bits; patricia_node_t *node; - if ((fp=fopen("ports.txt","r"))==NULL) { + if ((fp=fopen("data/ports.txt","r"))==NULL) { Error("proxyscan",ERR_ERROR,"Unable to open ports file for reading!"); return; } diff --git a/qabot/qabot_dbase.c b/qabot/qabot_dbase.c index 987abf5d..4bd50c58 100644 --- a/qabot/qabot_dbase.c +++ b/qabot/qabot_dbase.c @@ -21,7 +21,7 @@ void qabot_loaddb() { time_t created; flag_t flags; - if (!(f = fopen("qab_users", "r"))) + if (!(f = fopen("data/qab_users", "r"))) return; while (!feof(f)) { @@ -41,7 +41,7 @@ void qabot_loaddb() { fclose(f); - if (!(f = fopen("qab_bots", "r"))) + if (!(f = fopen("data/qab_bots", "r"))) return; while (!feof(f)) { @@ -65,7 +65,7 @@ void qabot_savedb() { qab_user* u; qab_bot* b; - if (!(f = fopen("qab_users", "w"))) + if (!(f = fopen("data/qab_users", "w"))) return; for (u = qabot_users; u; u = u->next) @@ -73,7 +73,7 @@ void qabot_savedb() { fclose(f); - if (!(f = fopen("qab_bots", "w"))) + if (!(f = fopen("data/qab_bots", "w"))) return; for (b = qab_bots; b; b = b->next)