]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_chgname.cpp
Change to Duration for second param
[user/henk/code/inspircd.git] / src / modules / m_chgname.cpp
index 0f9302a76c052afaf8610eea819df5e679d77276..86e01ad33cef16a9dbafca09aa8d78e32d28fed8 100644 (file)
@@ -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);
        }
 
 };