1
0
mirror of https://github.com/anope/anope.git synced 2026-06-25 15:46: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:
Adam
2010-07-31 21:37:45 -04:00
parent 9d0d44d738
commit c770c47e18
149 changed files with 743 additions and 444 deletions
+3 -1
View File
@@ -63,6 +63,8 @@ class CommandNSResetPass : public Command
class NSResetPass : public Module
{
CommandNSResetPass commandnsresetpass;
public:
NSResetPass(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
@@ -72,7 +74,7 @@ class NSResetPass : public Module
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(NickServ, new CommandNSResetPass());
this->AddCommand(NickServ, &commandnsresetpass);
ModuleManager::Attach(I_OnPreCommand, this);
}