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;
Config->ClearStack();
Config->Read(true,NULL);
CheckRoot();
- SetupCommandTable();
+ Parser = new CommandParser;
+ Parser->SetupCommandTable();
AddServerName(Config->ServerName);
CheckDie();
stats->BoundPortCount = BindPorts();
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;