mirror of
https://github.com/anope/anope.git
synced 2026-07-02 06:46: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:
@@ -70,6 +70,8 @@ class CommandOSUMode : public Command
|
||||
|
||||
class OSUMode : public Module
|
||||
{
|
||||
CommandOSUMode commandosumode;
|
||||
|
||||
public:
|
||||
OSUMode(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
|
||||
{
|
||||
@@ -79,7 +81,7 @@ class OSUMode : public Module
|
||||
this->SetAuthor("Anope");
|
||||
this->SetType(CORE);
|
||||
|
||||
this->AddCommand(OperServ, new CommandOSUMode());
|
||||
this->AddCommand(OperServ, &commandosumode);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user