summaryrefslogtreecommitdiff
path: root/src/modules/m_check.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_check.cpp')
-rw-r--r--src/modules/m_check.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/modules/m_check.cpp b/src/modules/m_check.cpp
index 4172e19a3..3b79081ad 100644
--- a/src/modules/m_check.cpp
+++ b/src/modules/m_check.cpp
@@ -190,12 +190,11 @@ class CommandCheck : public Command
class ModuleCheck : public Module
{
private:
- CommandCheck *mycommand;
+ CommandCheck mycommand;
public:
- ModuleCheck(InspIRCd* Me) : Module(Me)
+ ModuleCheck(InspIRCd* Me) : Module(Me), mycommand(Me, this)
{
- mycommand = new CommandCheck(ServerInstance, this);
- ServerInstance->AddCommand(mycommand);
+ ServerInstance->AddCommand(&mycommand);
}
virtual ~ModuleCheck()
@@ -211,7 +210,7 @@ class ModuleCheck : public Module
{
User* user = static_cast<User*>(opaque);
user->WriteServ("304 " + std::string(user->nick) + " :CHECK meta:" + name + " " + value);
- mycommand->md_sent = true;
+ mycommand.md_sent = true;
}
};