]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_chgident.cpp
Merge insp20
[user/henk/code/inspircd.git] / src / modules / m_chgident.cpp
index 968497f8c6046e679340dceee7fe3e0385e1d66a..2ef44c684ce762ec4eda10ee06e6305270d8bf8f 100644 (file)
@@ -31,6 +31,7 @@ class CommandChgident : public Command
  public:
        CommandChgident(Module* Creator) : Command(Creator,"CHGIDENT", 2)
        {
+               allow_empty_last_param = false;
                flags_needed = 'o';
                syntax = "<nick> <newident>";
                TRANSLATE3(TR_NICK, TR_TEXT, TR_END);
@@ -40,7 +41,7 @@ class CommandChgident : public Command
        {
                User* dest = ServerInstance->FindNick(parameters[0]);
 
-               if (!dest)
+               if ((!dest) || (dest->registered != REG_ALL))
                {
                        user->WriteNumeric(ERR_NOSUCHNICK, "%s %s :No such nick/channel", user->nick.c_str(), parameters[0].c_str());
                        return CMD_FAILURE;
@@ -78,7 +79,6 @@ class CommandChgident : public Command
        }
 };
 
-
 class ModuleChgIdent : public Module
 {
        CommandChgident cmd;
@@ -93,10 +93,6 @@ public:
                ServerInstance->Modules->AddService(cmd);
        }
 
-       virtual ~ModuleChgIdent()
-       {
-       }
-
        virtual Version GetVersion()
        {
                return Version("Provides support for the CHGIDENT command", VF_OPTCOMMON | VF_VENDOR);
@@ -105,4 +101,3 @@ public:
 };
 
 MODULE_INIT(ModuleChgIdent)
-