mirror of
https://github.com/anope/anope.git
synced 2026-06-26 01:46:39 +02:00
Don't dynamically allocate commands in modules anymore, instead made them members of modules. This means the commands are automatically destructed when the module is unloaded. Cleans up some old ugly code.
This commit is contained in:
@@ -185,7 +185,6 @@ int Module::AddCommand(BotInfo *bi, Command *c)
|
||||
if (it.second != true)
|
||||
{
|
||||
Alog() << "Error creating command " << c->name << ". Command already exists!";
|
||||
delete c;
|
||||
return MOD_ERR_EXISTS;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user