*/
#include "inspircd.h"
-#include "configreader.h"
-#include "users.h"
-#include "modules.h"
#include "commands/cmd_rehash.h"
{
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);