mirror of
https://github.com/anope/anope.git
synced 2026-07-02 03:26: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:
@@ -61,6 +61,8 @@ class CommandOSModUnLoad : public Command
|
||||
|
||||
class OSModUnLoad : public Module
|
||||
{
|
||||
CommandOSModUnLoad commandosmodunload;
|
||||
|
||||
public:
|
||||
OSModUnLoad(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
|
||||
{
|
||||
@@ -68,7 +70,7 @@ class OSModUnLoad : public Module
|
||||
this->SetType(CORE);
|
||||
this->SetPermanent(true);
|
||||
|
||||
this->AddCommand(OperServ, new CommandOSModUnLoad());
|
||||
this->AddCommand(OperServ, &commandosmodunload);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user