]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_nicklock.cpp
Increase penalty for KNOCK
[user/henk/code/inspircd.git] / src / modules / m_nicklock.cpp
index c10b9c798cb48e4826dd63adedd2b2e04a801ff7..dd65a5a74e2e587141706f0c416d587fa2db6aaf 100644 (file)
@@ -2,7 +2,7 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
+ *  InspIRCd: (C) 2002-2010 InspIRCd Development Team
  * See: http://wiki.inspircd.org/Credits
  *
  * This program is free but copyrighted software; see
@@ -151,12 +151,12 @@ class ModuleNickLock : public Module
        CommandNicklock cmd1;
        CommandNickunlock cmd2;
  public:
-       ModuleNickLock(InspIRCd* Me)
-               : Module(Me), locked("nick_locked", this), cmd1(this, locked), cmd2(this, locked)
+       ModuleNickLock()
+               : locked("nick_locked", this), cmd1(this, locked), cmd2(this, locked)
        {
                ServerInstance->AddCommand(&cmd1);
                ServerInstance->AddCommand(&cmd2);
-               Extensible::Register(&locked);
+               ServerInstance->Extensions.Register(&locked);
                ServerInstance->Modules->Attach(I_OnUserPreNick, this);
        }
 
@@ -166,7 +166,7 @@ class ModuleNickLock : public Module
 
        Version GetVersion()
        {
-               return Version("$Id$", VF_COMMON | VF_VENDOR, API_VERSION);
+               return Version("Provides the NICKLOCK command, allows an oper to chage a users nick and lock them to it until they quit", VF_OPTCOMMON | VF_VENDOR);
        }
 
 
@@ -175,10 +175,7 @@ class ModuleNickLock : public Module
                if (!IS_LOCAL(user))
                        return MOD_RES_PASSTHRU;
 
-               if (isdigit(newnick[0])) /* Allow a switch to a UID */
-                       return MOD_RES_PASSTHRU;
-
-               if (User::NICKForced.get(user)) /* Allow forced nick changes */
+               if (ServerInstance->NICKForced.get(user)) /* Allow forced nick changes */
                        return MOD_RES_PASSTHRU;
 
                if (locked.get(user))