mirror of
https://github.com/anope/anope.git
synced 2026-07-05 00:13: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:
@@ -116,13 +116,15 @@ class CommandCSForbid : public Command
|
||||
|
||||
class CSForbid : public Module
|
||||
{
|
||||
CommandCSForbid commandcsforbid;
|
||||
|
||||
public:
|
||||
CSForbid(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetType(CORE);
|
||||
|
||||
this->AddCommand(ChanServ, new CommandCSForbid());
|
||||
this->AddCommand(ChanServ, &commandcsforbid);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user