]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/commands/cmd_part.cpp
Chain ValidateServerName onto ValidateHostname so that the servername gets hostname...
[user/henk/code/inspircd.git] / src / commands / cmd_part.cpp
index aaff9e30fb300f35fd5e32463bd5d20ebae079a4..360287c45eca277bc0693d496c57f75163ab6f9d 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
@@ -19,7 +19,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance)
        return new CommandPart(Instance);
 }
 
-CmdResult CommandPart::Handle (const char** parameters, int pcnt, User *user)
+CmdResult CommandPart::Handle (const char* const* parameters, int pcnt, User *user)
 {
        std::string reason;
 
@@ -37,7 +37,7 @@ CmdResult CommandPart::Handle (const char** parameters, int pcnt, User *user)
        }
        else
        {
-               reason = pcnt ? parameters[1] : "";
+               reason = pcnt > 1 ? parameters[1] : "";
        }
 
        if (ServerInstance->Parser->LoopCall(user, this, parameters, pcnt, 0))