mirror of
https://github.com/anope/anope.git
synced 2026-07-10 20:23:14 +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:
@@ -91,12 +91,14 @@ class CommandCSTBan : public Command
|
||||
|
||||
class CSTBan : public Module
|
||||
{
|
||||
CommandCSTBan commandcstban;
|
||||
|
||||
public:
|
||||
CSTBan(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
|
||||
{
|
||||
me = this;
|
||||
|
||||
this->AddCommand(ChanServ, new CommandCSTBan());
|
||||
this->AddCommand(ChanServ, &commandcstban);
|
||||
|
||||
this->SetAuthor(AUTHOR);
|
||||
this->SetType(SUPPORTED);
|
||||
|
||||
Reference in New Issue
Block a user