]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_chgname.cpp
Send HALFOP= line in CAPAB CAPABILITIES for 1201 compat (anope relies on this)
[user/henk/code/inspircd.git] / src / modules / m_chgname.cpp
index 0f9302a76c052afaf8610eea819df5e679d77276..45d584dc8c3c5a02662c3dd3196405ebbbdf5551 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
@@ -20,8 +20,9 @@
 class CommandChgname : public Command
 {
  public:
-       CommandChgname (InspIRCd* Instance, Module* Creator) : Command(Instance, Creator,"CHGNAME", "o", 2, 2)
+       CommandChgname(Module* Creator) : Command(Creator,"CHGNAME", 2, 2)
        {
+               flags_needed = 'o';
                syntax = "<nick> <newname>";
                TRANSLATE3(TR_NICK, TR_TEXT, TR_END);
        }
@@ -36,12 +37,6 @@ class CommandChgname : public Command
                        return CMD_FAILURE;
                }
 
-               if (parameters[1].empty())
-               {
-                       user->WriteServ("NOTICE %s :*** GECOS must be specified", user->nick.c_str());
-                       return CMD_FAILURE;
-               }
-
                if (parameters[1].length() > ServerInstance->Config->Limits.MaxGecos)
                {
                        user->WriteServ("NOTICE %s :*** GECOS too long", user->nick.c_str());
@@ -72,7 +67,7 @@ class ModuleChgName : public Module
        CommandChgname cmd;
 
 public:
-       ModuleChgName(InspIRCd* Me) : Module(Me), cmd(Me, this)
+       ModuleChgName() : cmd(this)
        {
                ServerInstance->AddCommand(&cmd);
        }
@@ -83,7 +78,7 @@ public:
 
        virtual Version GetVersion()
        {
-               return Version("$Id$", VF_OPTCOMMON | VF_VENDOR, API_VERSION);
+               return Version("Provides support for the CHGNAME command", VF_OPTCOMMON | VF_VENDOR);
        }
 
 };