diff options
Diffstat (limited to 'src/modules/m_chgname.cpp')
-rw-r--r-- | src/modules/m_chgname.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/modules/m_chgname.cpp b/src/modules/m_chgname.cpp index 194ecf80e..2ac24c5d5 100644 --- a/src/modules/m_chgname.cpp +++ b/src/modules/m_chgname.cpp @@ -44,16 +44,22 @@ class CommandChgname : public Command return CMD_FAILURE; } + if (parameters[1].empty()) + { + user->WriteServ("NOTICE %s :*** CHGNAME: 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()); + user->WriteServ("NOTICE %s :*** CHGNAME: GECOS too long", user->nick.c_str()); return CMD_FAILURE; } if (IS_LOCAL(dest)) { dest->ChangeName(parameters[1].c_str()); - ServerInstance->SNO->WriteGlobalSno('a', "%s used CHGNAME to change %s's real name to '%s'", user->nick.c_str(), dest->nick.c_str(), dest->fullname.c_str()); + ServerInstance->SNO->WriteGlobalSno('a', "%s used CHGNAME to change %s's GECOS to '%s'", user->nick.c_str(), dest->nick.c_str(), dest->fullname.c_str()); } return CMD_SUCCESS; |