]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Changed to use CommandParser for RemoveCommands
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Fri, 16 Dec 2005 10:46:02 +0000 (10:46 +0000)
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Fri, 16 Dec 2005 10:46:02 +0000 (10:46 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2517 e03df62e-2008-0410-955e-edbf42e46eb7

src/inspircd.cpp

index aee1666d0d3fca557fe46843cb68fc4abd209a53..08946ddd28acf8514cb0bb5acc928cab05b52f6e 100644 (file)
@@ -92,7 +92,7 @@ userrec* fd_ref_table[65536];
 serverstats* stats = new serverstats;
 Server* MyServer = new Server;
 ServerConfig *Config = new ServerConfig;
-CommandParser *Parser = new CommandParser;
+CommandParser *Parser = NULL;
 
 user_hash clientlist;
 chan_hash chanlist;
@@ -188,7 +188,8 @@ InspIRCd::InspIRCd(int argc, char** argv)
         Config->ClearStack();
         Config->Read(true,NULL);
         CheckRoot();
-        SetupCommandTable();
+       Parser = new CommandParser;
+        Parser->SetupCommandTable();
         AddServerName(Config->ServerName);
         CheckDie();
         stats->BoundPortCount = BindPorts();
@@ -304,7 +305,7 @@ bool InspIRCd::UnloadModule(const char* filename)
                        log(DEBUG,"Erasing module entry...");
                        erase_factory(j);
                         log(DEBUG,"Removing dependent commands...");
-                        remove_commands(filename);
+                        Parser->RemoveCommands(filename);
                        log(DEFAULT,"Module %s unloaded",filename);
                        MODCOUNT--;
                        return true;