mirror of
https://github.com/anope/anope.git
synced 2026-07-04 19:53:13 +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:
@@ -276,15 +276,19 @@ class CommandNSGList : public Command
|
||||
|
||||
class NSGroup : public Module
|
||||
{
|
||||
CommandNSGroup commandnsgroup;
|
||||
CommandNSUngroup commandnsungroup;
|
||||
CommandNSGList commandnsglist;
|
||||
|
||||
public:
|
||||
NSGroup(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetType(CORE);
|
||||
|
||||
this->AddCommand(NickServ, new CommandNSGroup());
|
||||
this->AddCommand(NickServ, new CommandNSUngroup());
|
||||
this->AddCommand(NickServ, new CommandNSGList());
|
||||
this->AddCommand(NickServ, &commandnsgroup);
|
||||
this->AddCommand(NickServ, &commandnsungroup);
|
||||
this->AddCommand(NickServ, &commandnsglist);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user