summaryrefslogtreecommitdiff
path: root/src/modules/m_nonicks.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_nonicks.cpp')
-rw-r--r--src/modules/m_nonicks.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/modules/m_nonicks.cpp b/src/modules/m_nonicks.cpp
index 08baef5df..b3b739807 100644
--- a/src/modules/m_nonicks.cpp
+++ b/src/modules/m_nonicks.cpp
@@ -45,21 +45,18 @@ class NoNicks : public ModeHandler
class ModuleNoNickChange : public Module
{
- NoNicks* nn;
+ NoNicks nn;
public:
- ModuleNoNickChange(InspIRCd* Me) : Module(Me)
+ ModuleNoNickChange(InspIRCd* Me) : Module(Me), nn(Me)
{
-
- nn = new NoNicks(ServerInstance);
- ServerInstance->Modes->AddMode(nn);
+ ServerInstance->Modes->AddMode(&nn);
Implementation eventlist[] = { I_OnUserPreNick, I_On005Numeric };
ServerInstance->Modules->Attach(eventlist, this, 2);
}
virtual ~ModuleNoNickChange()
{
- ServerInstance->Modes->DelMode(nn);
- delete nn;
+ ServerInstance->Modes->DelMode(&nn);
}
virtual Version GetVersion()