]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_cloaking.cpp
Fix an issue in r11370 spotted by danieldg
[user/henk/code/inspircd.git] / src / modules / m_cloaking.cpp
index a5e3773e43a87abb2ef7023819062a2b87757440..8bba9cedab4acd9d151b132def4d66dc91edc693 100644 (file)
@@ -2,8 +2,8 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2008 InspIRCd Development Team
- * See: http://www.inspircd.org/wiki/index.php/Credits
+ *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
+ * See: http://wiki.inspircd.org/Credits
  *
  * This program is free but copyrighted software; see
  *         the file COPYING for details.
@@ -243,6 +243,11 @@ class CloakUser : public ModeHandler
 
                        throw ModuleException("You have not defined cloak keys for m_cloaking!!! THIS IS INSECURE AND SHOULD BE CHECKED! - " + detail);
                }
+               else if (key1 == 0x01234567 || key2 == 0x01234567 || key3 == 0x01234567 || key4 = 0x01234567)
+               {
+                       /* Simple test to see if the config was changed from the values in the example config, as these would be very insecure. */
+                       throw ModuleException("You did not change the cloak keys for m_cloaking! You must randomly create your own keys in the <cloak> tag.");
+               }
        }
 };
 
@@ -332,11 +337,11 @@ class ModuleCloaking : public Module
        void Prioritize()
        {
                /* Needs to be after m_banexception etc. */
-               ServerInstance->Modules->SetPriority(this, I_OnCheckBan, PRIO_LAST);
+               ServerInstance->Modules->SetPriority(this, I_OnCheckBan, PRIORITY_LAST);
 
                /* but before m_conn_umodes, so host is generated ready to apply */
                Module *um = ServerInstance->Modules->Find("m_conn_umodes.so");
-               ServerInstance->Modules->SetPriority(this, I_OnUserConnect, PRIO_AFTER, &um);
+               ServerInstance->Modules->SetPriority(this, I_OnUserConnect, PRIORITY_AFTER, &um);
        }
 
        virtual void OnUserDisconnect(User* user)