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