]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Crash on /rehash fixed (old code in here passed NULL, 0 as argc, argv, this is BAD...
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Sat, 23 Dec 2006 23:18:34 +0000 (23:18 +0000)
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Sat, 23 Dec 2006 23:18:34 +0000 (23:18 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6081 e03df62e-2008-0410-955e-edbf42e46eb7

src/cmd_rehash.cpp
src/helperfuncs.cpp
src/inspircd.cpp

index 518b7fbf4f15a3560372312b5dc07386bb94969b..7b9db22e0a3bfa42b0cd5ccbeb90c0a299ba9526 100644 (file)
@@ -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);
        }
index 506b6e2d6d3006822665e98c0b7d8b285bba9feb..fdbeb613f809b4ce0c698f743b0d2605e0df7f7e 100644 (file)
@@ -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)
        {
index 5cfb55ab186ff9a2bb68c950f6d5dca205b58bc6..c8be0d019a3c8f8bcf3733d96456611432850f69 100644 (file)
@@ -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);