summaryrefslogtreecommitdiff
path: root/src/modules/m_userip.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_userip.cpp')
-rw-r--r--src/modules/m_userip.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/modules/m_userip.cpp b/src/modules/m_userip.cpp
index 00db26595..8600546bc 100644
--- a/src/modules/m_userip.cpp
+++ b/src/modules/m_userip.cpp
@@ -56,14 +56,12 @@ class CommandUserip : public Command
class ModuleUserIP : public Module
{
- CommandUserip* mycommand;
+ CommandUserip cmd;
public:
ModuleUserIP(InspIRCd* Me)
- : Module(Me)
+ : Module(Me), cmd(Me)
{
-
- mycommand = new CommandUserip(ServerInstance);
- ServerInstance->AddCommand(mycommand);
+ ServerInstance->AddCommand(&cmd);
Implementation eventlist[] = { I_On005Numeric };
ServerInstance->Modules->Attach(eventlist, this, 1);
}