diff options
Diffstat (limited to 'src/modules/m_cap.cpp')
-rw-r--r-- | src/modules/m_cap.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/modules/m_cap.cpp b/src/modules/m_cap.cpp index d70b32cde..2e9a24811 100644 --- a/src/modules/m_cap.cpp +++ b/src/modules/m_cap.cpp @@ -132,14 +132,12 @@ class CommandCAP : public Command class ModuleCAP : public Module { - CommandCAP* newcommand; + CommandCAP newcommand; public: ModuleCAP(InspIRCd* Me) - : Module(Me) + : Module(Me), newcommand(Me, this) { - // Create a new command - newcommand = new CommandCAP(ServerInstance, this); - ServerInstance->AddCommand(newcommand); + ServerInstance->AddCommand(&newcommand); Implementation eventlist[] = { I_OnCheckReady }; ServerInstance->Modules->Attach(eventlist, this, 1); |