mirror of
https://github.com/anope/anope.git
synced 2026-07-03 23:23: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:
@@ -77,6 +77,8 @@ class CommandNSGetPass : public Command
|
||||
|
||||
class NSGetPass : public Module
|
||||
{
|
||||
CommandNSGetPass commandnsgetpass;
|
||||
|
||||
public:
|
||||
NSGetPass(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
|
||||
{
|
||||
@@ -87,7 +89,7 @@ class NSGetPass : public Module
|
||||
this->SetAuthor("Anope");
|
||||
this->SetType(CORE);
|
||||
|
||||
this->AddCommand(NickServ, new CommandNSGetPass());
|
||||
this->AddCommand(NickServ, &commandnsgetpass);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user