From b817341e2149af163011cce47605ae17b4f67eeb Mon Sep 17 00:00:00 2001 From: aquanight Date: Mon, 5 May 2008 02:06:59 +0000 Subject: Conversions git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9628 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_setname.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/modules/m_setname.cpp') diff --git a/src/modules/m_setname.cpp b/src/modules/m_setname.cpp index 8c48be9a5..75156378d 100644 --- a/src/modules/m_setname.cpp +++ b/src/modules/m_setname.cpp @@ -27,23 +27,23 @@ class CommandSetname : public Command TRANSLATE2(TR_TEXT, TR_END); } - CmdResult Handle (const char* const* parameters, int pcnt, User *user) + CmdResult Handle (const std::vector& parameters, User *user) { - if (!*parameters[0]) + if (parameters.size() == 0) { user->WriteServ("NOTICE %s :*** SETNAME: GECOS must be specified", user->nick); return CMD_FAILURE; } - if (strlen(parameters[0]) > MAXGECOS) + if (parameters[0].size() > MAXGECOS) { user->WriteServ("NOTICE %s :*** SETNAME: GECOS too long", user->nick); return CMD_FAILURE; } - if (user->ChangeName(parameters[0])) + if (user->ChangeName(parameters[0].c_str())) { - ServerInstance->SNO->WriteToSnoMask('A', "%s used SETNAME to change their GECOS to %s", user->nick, parameters[0]); + ServerInstance->SNO->WriteToSnoMask('A', "%s used SETNAME to change their GECOS to %s", user->nick, parameters[0].c_str()); return CMD_SUCCESS; } -- cgit v1.2.3