summaryrefslogtreecommitdiff
path: root/src/modules/m_silence.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_silence.cpp')
-rw-r--r--src/modules/m_silence.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/modules/m_silence.cpp b/src/modules/m_silence.cpp
index e1c4f3fee..9933cc9bf 100644
--- a/src/modules/m_silence.cpp
+++ b/src/modules/m_silence.cpp
@@ -125,9 +125,10 @@ class ModuleSilence : public Module
Server *Srv;
public:
- ModuleSilence()
+ ModuleSilence(Server* Me)
+ : Module::Module(Me)
{
- Srv = new Server;
+ Srv = Me;
Srv->AddCommand("SILENCE",handle_silence,0,0,"m_silence.so");
}
@@ -199,7 +200,6 @@ class ModuleSilence : public Module
virtual ~ModuleSilence()
{
- delete Srv;
}
virtual Version GetVersion()
@@ -220,9 +220,9 @@ class ModuleSilenceFactory : public ModuleFactory
{
}
- virtual Module * CreateModule()
+ virtual Module * CreateModule(Server* Me)
{
- return new ModuleSilence;
+ return new ModuleSilence(Me);
}
};