mirror of
https://github.com/anope/anope.git
synced 2026-07-02 12:53: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:
@@ -220,6 +220,8 @@ class CommandCSEnforce : public Command
|
||||
|
||||
class CSEnforce : public Module
|
||||
{
|
||||
CommandCSEnforce commandcsenforce;
|
||||
|
||||
public:
|
||||
CSEnforce(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
|
||||
{
|
||||
@@ -228,7 +230,7 @@ class CSEnforce : public Module
|
||||
this->SetAuthor(AUTHOR);
|
||||
this->SetType(SUPPORTED);
|
||||
|
||||
this->AddCommand(ChanServ, new CommandCSEnforce());
|
||||
this->AddCommand(ChanServ, &commandcsenforce);
|
||||
|
||||
/* English (US) */
|
||||
const char *langtable_en_us[] = {
|
||||
|
||||
Reference in New Issue
Block a user