]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/commands/cmd_names.cpp
Chain ValidateServerName onto ValidateHostname so that the servername gets hostname...
[user/henk/code/inspircd.git] / src / commands / cmd_names.cpp
index 4049364a7f31edcd98c7661ddcda9a15a84e6c96..0c34926303017d5669c1abde6d3b9aca308d699e 100644 (file)
@@ -2,7 +2,7 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2007 InspIRCd Development Team
+ *  InspIRCd: (C) 2002-2008 InspIRCd Development Team
  * See: http://www.inspircd.org/wiki/index.php/Credits
  *
  * This program is free but copyrighted software; see
@@ -21,13 +21,13 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance)
 
 /** Handle /NAMES
  */
-CmdResult CommandNames::Handle (const char** parameters, int pcnt, User *user)
+CmdResult CommandNames::Handle (const char* const* parameters, int pcnt, User *user)
 {
        Channel* c;
 
        if (!pcnt)
        {
-               user->WriteServ("366 %s * :End of /NAMES list.",user->nick);
+               user->WriteNumeric(366, "%s * :End of /NAMES list.",user->nick);
                return CMD_SUCCESS;
        }
 
@@ -39,14 +39,14 @@ CmdResult CommandNames::Handle (const char** parameters, int pcnt, User *user)
        {
                if ((c->IsModeSet('s')) && (!c->HasUser(user)))
                {
-                     user->WriteServ("401 %s %s :No such nick/channel",user->nick, c->name);
+                     user->WriteNumeric(401, "%s %s :No such nick/channel",user->nick, c->name);
                      return CMD_FAILURE;
                }
                c->UserList(user);
        }
        else
        {
-               user->WriteServ("401 %s %s :No such nick/channel",user->nick, parameters[0]);
+               user->WriteNumeric(401, "%s %s :No such nick/channel",user->nick, parameters[0]);
        }
 
        return CMD_SUCCESS;