mirror of
https://github.com/anope/anope.git
synced 2026-07-03 09:13:12 +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:
@@ -58,13 +58,15 @@ class CommandOSMode : public Command
|
||||
|
||||
class OSMode : public Module
|
||||
{
|
||||
CommandOSMode commandosmode;
|
||||
|
||||
public:
|
||||
OSMode(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetType(CORE);
|
||||
|
||||
this->AddCommand(OperServ, new CommandOSMode());
|
||||
this->AddCommand(OperServ, &commandosmode);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user