summaryrefslogtreecommitdiff
path: root/src/modules/m_sslmodes.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_sslmodes.cpp')
-rw-r--r--src/modules/m_sslmodes.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/modules/m_sslmodes.cpp b/src/modules/m_sslmodes.cpp
index bf742b05e..ccedd5aa2 100644
--- a/src/modules/m_sslmodes.cpp
+++ b/src/modules/m_sslmodes.cpp
@@ -66,16 +66,13 @@ class SSLMode : public ModeHandler
class ModuleSSLModes : public Module
{
- SSLMode* sslm;
+ SSLMode sslm;
public:
ModuleSSLModes(InspIRCd* Me)
- : Module(Me)
+ : Module(Me), sslm(Me)
{
-
-
- sslm = new SSLMode(ServerInstance);
- if (!ServerInstance->Modes->AddMode(sslm))
+ if (!ServerInstance->Modes->AddMode(&sslm))
throw ModuleException("Could not add new modes!");
Implementation eventlist[] = { I_OnUserPreJoin };
ServerInstance->Modules->Attach(eventlist, this, 1);
@@ -104,8 +101,7 @@ class ModuleSSLModes : public Module
virtual ~ModuleSSLModes()
{
- ServerInstance->Modes->DelMode(sslm);
- delete sslm;
+ ServerInstance->Modes->DelMode(&sslm);
}
virtual Version GetVersion()