]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/cmd_rehash.cpp
Fixed an issue that could cause empty parameters in module commands to not be sent...
[user/henk/code/inspircd.git] / src / cmd_rehash.cpp
index 34789b0eaca8f0d6b46a8b4771f122d125830650..ed972007d61d7a1c83e763352faf8748bfb878fd 100644 (file)
@@ -12,9 +12,6 @@
  */
 
 #include "inspircd.h"
-#include "configreader.h"
-#include "users.h"
-#include "modules.h"
 #include "commands/cmd_rehash.h"
 
 
@@ -37,7 +34,8 @@ CmdResult cmd_rehash::Handle (const char** parameters, int pcnt, userrec *user)
        {
                ServerInstance->WriteOpers("*** %s is rehashing config file %s",user->nick,ServerConfig::CleanFilename(ServerInstance->ConfigFileName));
                ServerInstance->CloseLog();
-               ServerInstance->OpenLog(ServerInstance->Config->argv, ServerInstance->Config->argc);
+               if (!ServerInstance->OpenLog(ServerInstance->Config->argv, ServerInstance->Config->argc))
+                       user->WriteServ("*** NOTICE %s :ERROR: Could not open logfile %s: %s", user->nick, ServerInstance->Config->logpath.c_str(), strerror(errno));
                ServerInstance->RehashUsersAndChans();
                FOREACH_MOD(I_OnGarbageCollect, OnGarbageCollect());
                ServerInstance->Config->Read(false,user);