]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_knock.cpp
Fix for bug #415, affects only trunk (wish i'd known this before i started!)
[user/henk/code/inspircd.git] / src / modules / m_knock.cpp
index 23ee0539564629c367f216ace2c3160c69187a72..5ed69273e2d4e82e42a69c5cd92e6585f324a626 100644 (file)
@@ -24,6 +24,7 @@ class cmd_knock : public command_t
        {
                this->source = "m_knock.so";
                syntax = "<channel> <reason>";
+               TRANSLATE3(TR_TEXT, TR_TEXT, TR_END);
        }
        
        CmdResult Handle (const char** parameters, int pcnt, userrec *user)
@@ -99,10 +100,11 @@ class ModuleKnock : public Module
  public:
        ModuleKnock(InspIRCd* Me) : Module(Me)
        {
-               
                kn = new Knock(ServerInstance);
+
                if (!ServerInstance->AddMode(kn, 'K'))
                        throw ModuleException("Could not add new modes!");
+
                mycommand = new cmd_knock(ServerInstance);
                ServerInstance->AddCommand(mycommand);
        }
@@ -114,7 +116,7 @@ class ModuleKnock : public Module
        virtual ~ModuleKnock()
        {
                ServerInstance->Modes->DelMode(kn);
-               DELETE(kn);
+               delete kn;
        }
 
        virtual Version GetVersion()