mirror of
https://github.com/anope/anope.git
synced 2026-06-28 19:56: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:
@@ -39,13 +39,15 @@ class CommandMSHelp : public Command
|
||||
|
||||
class MSHelp : public Module
|
||||
{
|
||||
CommandMSHelp commandmshelp;
|
||||
|
||||
public:
|
||||
MSHelp(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetType(CORE);
|
||||
|
||||
this->AddCommand(MemoServ, new CommandMSHelp());
|
||||
this->AddCommand(MemoServ, &commandmshelp);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user