mirror of
https://github.com/anope/anope.git
synced 2026-07-03 14:03:12 +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:
@@ -67,6 +67,8 @@ class CommandOSOLine : public Command
|
||||
|
||||
class OSOLine : public Module
|
||||
{
|
||||
CommandOSOLine commandosoline;
|
||||
|
||||
public:
|
||||
OSOLine(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
|
||||
{
|
||||
@@ -76,7 +78,7 @@ class OSOLine : public Module
|
||||
this->SetAuthor("Anope");
|
||||
this->SetType(CORE);
|
||||
|
||||
this->AddCommand(OperServ, new CommandOSOLine());
|
||||
this->AddCommand(OperServ, &commandosoline);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user