1
0
mirror of https://github.com/anope/anope.git synced 2026-06-26 00: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
+9 -1
View File
@@ -16,6 +16,8 @@ Command::Command(const Anope::string &sname, size_t min_params, size_t max_param
Command::~Command()
{
if (this->module)
this->module->DelCommand(this->service, this);
}
CommandReturn Command::Execute(User *u, const std::vector<Anope::string> &)
@@ -39,7 +41,13 @@ bool Command::AddSubcommand(Command *c)
return false;
}
bool Command::DelSubcommand(const Anope::string &cname)
bool Command::DelSubcommand(Command *c)
{
return false;
}
Command *Command::FindSubcommand(const Anope::string &name)
{
return NULL;
}