mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-13 20:49:02 -04:00
Crash on /rehash fixed (old code in here passed NULL, 0 as argc, argv, this is BAD BAD BAD.)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6081 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
parent
74c8913f72
commit
72da54c1c2
@ -36,7 +36,7 @@ CmdResult cmd_rehash::Handle (const char** parameters, int pcnt, userrec *user)
|
||||
{
|
||||
ServerInstance->WriteOpers("%s is rehashing config file %s",user->nick,ServerConfig::CleanFilename(CONFIG_FILE));
|
||||
ServerInstance->CloseLog();
|
||||
ServerInstance->OpenLog(NULL,0);
|
||||
ServerInstance->OpenLog(ServerInstance->Config->argv, ServerInstance->Config->argc);
|
||||
ServerInstance->RehashUsersAndChans();
|
||||
ServerInstance->Config->Read(false,user);
|
||||
}
|
||||
|
@ -429,8 +429,6 @@ bool InspIRCd::IsNick(const char* n)
|
||||
void InspIRCd::OpenLog(char** argv, int argc)
|
||||
{
|
||||
Config->MyDir = ServerConfig::GetFullProgDir(argv,argc);
|
||||
Config->argv = argv;
|
||||
Config->argc = argc;
|
||||
|
||||
if (!*this->LogFileName)
|
||||
{
|
||||
|
@ -266,6 +266,10 @@ InspIRCd::InspIRCd(int argc, char** argv)
|
||||
this->chanlist = new chan_hash();
|
||||
|
||||
this->Config = new ServerConfig(this);
|
||||
|
||||
this->Config->argv = argv;
|
||||
this->Config->argc = argc;
|
||||
|
||||
this->Config->opertypes.clear();
|
||||
this->Config->operclass.clear();
|
||||
this->SNO = new SnomaskManager(this);
|
||||
|
Loading…
x
Reference in New Issue
Block a user