From 3ac4e6956d4ec4c976aef19772b65e7108d6315a Mon Sep 17 00:00:00 2001 From: attilamolnar Date: Sat, 7 Jul 2012 13:40:30 +0200 Subject: m_setname, m_chgname Disallow empty GECOS, spotted by @Robby- --- src/modules/m_setname.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/modules/m_setname.cpp') diff --git a/src/modules/m_setname.cpp b/src/modules/m_setname.cpp index 0d6b1d9f3..3b8d4d149 100644 --- a/src/modules/m_setname.cpp +++ b/src/modules/m_setname.cpp @@ -36,7 +36,7 @@ class CommandSetname : public Command CmdResult Handle (const std::vector& parameters, User *user) { - if (parameters.size() == 0) + if (parameters[0].empty()) { user->WriteServ("NOTICE %s :*** SETNAME: GECOS must be specified", user->nick.c_str()); return CMD_FAILURE; @@ -51,7 +51,6 @@ class CommandSetname : public Command if (user->ChangeName(parameters[0].c_str())) { ServerInstance->SNO->WriteGlobalSno('a', "%s used SETNAME to change their GECOS to %s", user->nick.c_str(), parameters[0].c_str()); - return CMD_SUCCESS; } return CMD_SUCCESS; -- cgit v1.2.3