mirror of
https://github.com/anope/anope.git
synced 2026-06-28 07:56:37 +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:
@@ -342,15 +342,20 @@ class CommandHSWaiting : public HSListBase
|
||||
|
||||
class HSRequest : public Module
|
||||
{
|
||||
CommandHSRequest commandhsrequest;
|
||||
CommandHSActivate commandhsactive;
|
||||
CommandHSReject commandhsreject;
|
||||
CommandHSWaiting commandhswaiting;
|
||||
|
||||
public:
|
||||
HSRequest(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
|
||||
{
|
||||
me = this;
|
||||
|
||||
this->AddCommand(HostServ, new CommandHSRequest());
|
||||
this->AddCommand(HostServ, new CommandHSActivate());
|
||||
this->AddCommand(HostServ, new CommandHSReject());
|
||||
this->AddCommand(HostServ, new CommandHSWaiting());
|
||||
this->AddCommand(HostServ, &commandhsrequest);
|
||||
this->AddCommand(HostServ, &commandhsactive);
|
||||
this->AddCommand(HostServ, &commandhsreject);
|
||||
this->AddCommand(HostServ, &commandhswaiting);
|
||||
|
||||
this->SetAuthor(AUTHOR);
|
||||
this->SetType(SUPPORTED);
|
||||
|
||||
Reference in New Issue
Block a user