summaryrefslogtreecommitdiff
path: root/src/modules/m_chghost.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_chghost.cpp')
-rw-r--r--src/modules/m_chghost.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/modules/m_chghost.cpp b/src/modules/m_chghost.cpp
index e29bb1bed..cfd8f6035 100644
--- a/src/modules/m_chghost.cpp
+++ b/src/modules/m_chghost.cpp
@@ -81,15 +81,14 @@ class CommandChghost : public Command
class ModuleChgHost : public Module
{
- CommandChghost* mycommand;
+ CommandChghost cmd;
char hostmap[256];
public:
ModuleChgHost(InspIRCd* Me)
- : Module(Me)
+ : Module(Me), cmd(Me, hostmap)
{
OnRehash(NULL);
- mycommand = new CommandChghost(ServerInstance, hostmap);
- ServerInstance->AddCommand(mycommand);
+ ServerInstance->AddCommand(&cmd);
Implementation eventlist[] = { I_OnRehash };
ServerInstance->Modules->Attach(eventlist, this, 1);
}