From e4c1ae81efcfce5d5105c49bbb17356496e67ff1 Mon Sep 17 00:00:00 2001 From: special Date: Tue, 26 Jun 2007 06:33:41 +0000 Subject: Made all of the error messages in chg* and set* a bit more uniform, and added a few that were missing git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7413 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_chgname.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/modules/m_chgname.cpp') diff --git a/src/modules/m_chgname.cpp b/src/modules/m_chgname.cpp index f3ea9cc25..887940124 100644 --- a/src/modules/m_chgname.cpp +++ b/src/modules/m_chgname.cpp @@ -37,11 +37,19 @@ class cmd_chgname : public command_t user->WriteServ("401 %s %s :No such nick/channel", user->nick, parameters[0]); return CMD_FAILURE; } + if (!*parameters[1]) { - user->WriteServ("NOTICE %s :*** GECOS is too short", user->nick); + user->WriteServ("NOTICE %s :*** GECOS must be specified", user->nick); return CMD_FAILURE; } + + if (strlen(parameters[1]) > MAXGECOS) + { + user->WriteServ("NOTICE %s :*** GECOS too long", user->nick); + return CMD_FAILURE; + } + if (IS_LOCAL(dest)) { dest->ChangeName(parameters[1]); -- cgit v1.2.3