diff options
author | special <special@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-06-26 06:15:14 +0000 |
---|---|---|
committer | special <special@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-06-26 06:15:14 +0000 |
commit | ee6208dc8f5bb806eca36e230ca5bbb6d5a45f60 (patch) | |
tree | 8302f402166ca2bbb7ae724042c129d1fcaa75bf /src/modules/m_setname.cpp | |
parent | 97590f92393a62af0847728132970c38e334b687 (diff) |
Added checks for empty ident/host/gecos in the chg* and set* commands. Patch by Stskeeps
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7412 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_setname.cpp')
-rw-r--r-- | src/modules/m_setname.cpp | 6 |
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; |