summaryrefslogtreecommitdiff
path: root/src/modules/m_setname.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_setname.cpp')
-rw-r--r--src/modules/m_setname.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/modules/m_setname.cpp b/src/modules/m_setname.cpp
index 8804f185d..3ececbbb3 100644
--- a/src/modules/m_setname.cpp
+++ b/src/modules/m_setname.cpp
@@ -36,7 +36,13 @@ class cmd_setname : public command_t
{
line = line + std::string(parameters[i]) + " ";
}
+
line = line + std::string(parameters[pcnt-1]);
+ if (line.length() == 0)
+ {
+ user->WriteServ("NOTICE %s :*** GECOS too short", user->nick);
+ return CMD_FAILURE;
+ }
user->ChangeName(line.c_str());
return CMD_SUCCESS;