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:
@@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user