summaryrefslogtreecommitdiff
path: root/src/modules/m_sethost.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_sethost.cpp')
-rw-r--r--src/modules/m_sethost.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/m_sethost.cpp b/src/modules/m_sethost.cpp
index 981efbbd8..cdcbbde9e 100644
--- a/src/modules/m_sethost.cpp
+++ b/src/modules/m_sethost.cpp
@@ -29,12 +29,12 @@ class CommandSethost : 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)
{
size_t len = 0;
- for (const char* x = parameters[0]; *x; x++, len++)
+ for (std::string::const_iterator x = parameters[0].begin(); x != parameters[0].end(); x++, len++)
{
- if (!hostmap[(unsigned char)*x])
+ if (!hostmap[(const unsigned char)*x])
{
user->WriteServ("NOTICE "+std::string(user->nick)+" :*** SETHOST: Invalid characters in hostname");
return CMD_FAILURE;
@@ -50,7 +50,7 @@ class CommandSethost : public Command
user->WriteServ("NOTICE %s :*** SETHOST: Host too long",user->nick);
return CMD_FAILURE;
}
- if (user->ChangeDisplayedHost(parameters[0]))
+ if (user->ChangeDisplayedHost(parameters[0].c_str()))
{
ServerInstance->SNO->WriteToSnoMask('A', std::string(user->nick)+" used SETHOST to change their displayed host to "+user->dhost);
return CMD_SUCCESS;