1
0
mirror of https://github.com/anope/anope.git synced 2026-06-29 10:36:38 +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:
Adam
2010-07-31 21:37:45 -04:00
parent 9d0d44d738
commit c770c47e18
149 changed files with 743 additions and 444 deletions
+3 -1
View File
@@ -59,6 +59,8 @@ class CommandOSModLoad : public Command
class OSModLoad : public Module
{
CommandOSModLoad commandosmodload;
public:
OSModLoad(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
@@ -66,7 +68,7 @@ class OSModLoad : public Module
this->SetType(CORE);
this->SetPermanent(true);
this->AddCommand(OperServ, new CommandOSModLoad());
this->AddCommand(OperServ, &commandosmodload);
}
};