mirror of
https://github.com/anope/anope.git
synced 2026-07-04 18: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:
@@ -73,6 +73,8 @@ class CommandMSRSend : public Command
|
||||
|
||||
class MSRSend : public Module
|
||||
{
|
||||
CommandMSRSend commandmsrsend;
|
||||
|
||||
public:
|
||||
MSRSend(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
|
||||
{
|
||||
@@ -82,7 +84,7 @@ class MSRSend : public Module
|
||||
this->SetAuthor("Anope");
|
||||
this->SetType(CORE);
|
||||
|
||||
this->AddCommand(MemoServ, new CommandMSRSend());
|
||||
this->AddCommand(MemoServ, &commandmsrsend);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user