]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_knock.cpp
To be more specific, specify rpath() macro here
[user/henk/code/inspircd.git] / src / modules / m_knock.cpp
index b8f712fd1306cb0274ea942e48068ba78e3778e0..d850ed35bf0da16a70468b71eddb5ba82ea81d87 100644 (file)
@@ -2,20 +2,15 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev.
- *                       E-mail:
- *                <brain@chatspike.net>
- *               <Craig@chatspike.net>
- *     
- * Written by Craig Edwards, Craig McLure, and others.
+ *  InspIRCd: (C) 2002-2007 InspIRCd Development Team
+ * See: http://www.inspircd.org/wiki/index.php/Credits
+ *
  * This program is free but copyrighted software; see
  *            the file COPYING for details.
  *
  * ---------------------------------------------------
  */
 
-using namespace std;
-
 #include <stdio.h>
 #include <string>
 #include "users.h"
@@ -116,7 +111,8 @@ class ModuleKnock : public Module
        {
                
                kn = new Knock(ServerInstance);
-               ServerInstance->AddMode(kn, 'K');
+               if (!ServerInstance->AddMode(kn, 'K'))
+                       throw ModuleException("Could not add new modes!");
                mycommand = new cmd_knock(ServerInstance);
                ServerInstance->AddCommand(mycommand);
        }
@@ -133,7 +129,7 @@ class ModuleKnock : public Module
 
        virtual Version GetVersion()
        {
-               return Version(1,0,0,1,VF_COMMON|VF_VENDOR,API_VERSION);
+               return Version(1,1,0,1,VF_COMMON|VF_VENDOR,API_VERSION);
        }
 };