summaryrefslogtreecommitdiff
path: root/src/userprocess.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-01-15 14:41:26 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-01-15 14:41:26 +0000
commitbb22b5cd2c7326a044ae8a4074531159ac700cef (patch)
tree1d56c44ae9d416ac4ac85d0a19e028047a2b4c14 /src/userprocess.cpp
parent90ceee88f0dc73c5135b4fc650215652e9e5e323 (diff)
Made inspircd close and reopen its log on rehash
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2794 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/userprocess.cpp')
-rw-r--r--src/userprocess.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/userprocess.cpp b/src/userprocess.cpp
index 0d45c1f9c..5e8887701 100644
--- a/src/userprocess.cpp
+++ b/src/userprocess.cpp
@@ -56,6 +56,7 @@ using namespace std;
#include "helperfuncs.h"
#include "hashcomp.h"
#include "socketengine.h"
+#include "userprocess.h"
#include "typedefs.h"
#include "command_parse.h"
#include "cull_list.h"
@@ -347,18 +348,16 @@ bool DoBackgroundUserStuff(time_t TIME)
void OpenLog(char** argv, int argc)
{
- std::string logpath = GetFullProgDir(argv,argc) + "/ircd.log";
- Config->log_file = fopen(logpath.c_str(),"a+");
+ if (Config->logpath == "")
+ {
+ Config->logpath = GetFullProgDir(argv,argc) + "/ircd.log";
+ }
+ Config->log_file = fopen(Config->logpath.c_str(),"a+");
if (!Config->log_file)
{
- printf("ERROR: Could not write to logfile %s, bailing!\n\n",logpath.c_str());
+ printf("ERROR: Could not write to logfile %s, bailing!\n\n",Config->logpath.c_str());
Exit(ERROR);
}
-#ifdef IS_CYGWIN
- printf("Logging to ircd.log...\n");
-#else
- printf("Logging to %s...\n",logpath.c_str());
-#endif
}