summaryrefslogtreecommitdiff
path: root/src/modules/m_setident.cpp
diff options
context:
space:
mode:
authoraquanight <aquanight@e03df62e-2008-0410-955e-edbf42e46eb7>2008-05-05 02:06:59 +0000
committeraquanight <aquanight@e03df62e-2008-0410-955e-edbf42e46eb7>2008-05-05 02:06:59 +0000
commitb817341e2149af163011cce47605ae17b4f67eeb (patch)
treea347cf649563bf5f1f5de40f7514a5ded48c7c32 /src/modules/m_setident.cpp
parentdfaa7b4e52e2cfbff79ab9ecad9904a07512b370 (diff)
Conversions
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9628 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_setident.cpp')
-rw-r--r--src/modules/m_setident.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/modules/m_setident.cpp b/src/modules/m_setident.cpp
index 5abdcb433..0456a8539 100644
--- a/src/modules/m_setident.cpp
+++ b/src/modules/m_setident.cpp
@@ -27,27 +27,27 @@ class CommandSetident : public Command
TRANSLATE2(TR_TEXT, TR_END);
}
- CmdResult Handle(const char* const* parameters, int pcnt, User *user)
+ CmdResult Handle(const std::vector<std::string>& parameters, User *user)
{
- if (!*parameters[0])
+ if (parameters.size() == 0)
{
user->WriteServ("NOTICE %s :*** SETIDENT: Ident must be specified", user->nick);
return CMD_FAILURE;
}
- if (strlen(parameters[0]) > IDENTMAX)
+ if (parameters[0].size() > IDENTMAX)
{
user->WriteServ("NOTICE %s :*** SETIDENT: Ident is too long", user->nick);
return CMD_FAILURE;
}
- if (!ServerInstance->IsIdent(parameters[0]))
+ if (!ServerInstance->IsIdent(parameters[0].c_str()))
{
user->WriteServ("NOTICE %s :*** SETIDENT: Invalid characters in ident", user->nick);
return CMD_FAILURE;
}
- user->ChangeIdent(parameters[0]);
+ user->ChangeIdent(parameters[0].c_str());
ServerInstance->SNO->WriteToSnoMask('A', "%s used SETIDENT to change their ident to '%s'", user->nick, user->ident);
return CMD_SUCCESS;