diff options
author | peavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-05-04 23:48:07 +0000 |
---|---|---|
committer | peavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-05-04 23:48:07 +0000 |
commit | 1eb52771d6a7fe8768baf8bad509de0facafbd2c (patch) | |
tree | a4020bcbaa6ef1a225e2cedca466408b53931790 /src/modules/m_chgident.cpp | |
parent | c2d1f2cdafb0a38446844f6bd3d683e8636e37b4 (diff) |
Convert a few more
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9621 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_chgident.cpp')
-rw-r--r-- | src/modules/m_chgident.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/modules/m_chgident.cpp b/src/modules/m_chgident.cpp index 74ccc49ba..3a39c2f13 100644 --- a/src/modules/m_chgident.cpp +++ b/src/modules/m_chgident.cpp @@ -27,35 +27,35 @@ class CommandChgident : public Command TRANSLATE3(TR_NICK, TR_TEXT, TR_END); } - CmdResult Handle(const char* const* parameters, int pcnt, User *user) + CmdResult Handle(const std::vector<std::string> ¶meters, User *user) { User* dest = ServerInstance->FindNick(parameters[0]); if (!dest) { - user->WriteNumeric(401, "%s %s :No such nick/channel", user->nick, parameters[0]); + user->WriteNumeric(401, "%s %s :No such nick/channel", user->nick, parameters[0].c_str()); return CMD_FAILURE; } - if (!*parameters[1]) + if (parameters[1].empty()) { user->WriteServ("NOTICE %s :*** CHGIDENT: Ident must be specified", user->nick); return CMD_FAILURE; } - if (strlen(parameters[1]) > IDENTMAX - 1) + if (parameters[1].length() > IDENTMAX - 1) { user->WriteServ("NOTICE %s :*** CHGIDENT: Ident is too long", user->nick); return CMD_FAILURE; } - if (!ServerInstance->IsIdent(parameters[1])) + if (!ServerInstance->IsIdent(parameters[1].c_str())) { user->WriteServ("NOTICE %s :*** CHGIDENT: Invalid characters in ident", user->nick); return CMD_FAILURE; } - dest->ChangeIdent(parameters[1]); + dest->ChangeIdent(parameters[1].c_str()); if (!ServerInstance->ULine(user->server)) ServerInstance->SNO->WriteToSnoMask('A', "%s used CHGIDENT to change %s's ident to '%s'", user->nick, dest->nick, dest->ident); |