summaryrefslogtreecommitdiff
path: root/src/modules/m_remove.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_remove.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_remove.cpp')
-rw-r--r--src/modules/m_remove.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/modules/m_remove.cpp b/src/modules/m_remove.cpp
index b87b5d2c1..008b4c82d 100644
--- a/src/modules/m_remove.cpp
+++ b/src/modules/m_remove.cpp
@@ -69,7 +69,7 @@ class RemoveBase
}
}
- CmdResult Handle (const char* const* parameters, int pcnt, User *user, bool neworder)
+ CmdResult Handle (const std::vector<std::string>& parameters, User *user, bool neworder)
{
const char* channame;
const char* username;
@@ -87,8 +87,8 @@ class RemoveBase
* /remove <nick> <channel> [reason ...]
* /fpart <channel> <nick> [reason ...]
*/
- channame = parameters[ neworder ? 0 : 1];
- username = parameters[ neworder ? 1 : 0];
+ channame = parameters[ neworder ? 0 : 1].c_str();
+ username = parameters[ neworder ? 1 : 0].c_str();
/* Look up the user we're meant to be removing from the channel */
target = ServerInstance->FindNick(username);
@@ -167,10 +167,10 @@ class RemoveBase
std::string reasonparam("No reason given");
/* If a reason is given, use it */
- if(pcnt > 2)
+ if(parameters.size() > 2)
{
/* Join params 2 ... pcnt - 1 (inclusive) into one */
- irc::stringjoiner reason_join(" ", parameters, 2, pcnt - 1);
+ irc::stringjoiner reason_join(" ", parameters, 2, parameters.size() - 1);
reasonparam = reason_join.GetJoined();
}
@@ -213,9 +213,9 @@ class CommandRemove : public Command, public RemoveBase
TRANSLATE4(TR_NICK, TR_TEXT, TR_TEXT, TR_END);
}
- CmdResult Handle (const char* const* parameters, int pcnt, User *user)
+ CmdResult Handle (const std::vector<std::string>& parameters, User *user)
{
- return RemoveBase::Handle(parameters, pcnt, user, false);
+ return RemoveBase::Handle(parameters, user, false);
}
};
@@ -230,9 +230,9 @@ class CommandFpart : public Command, public RemoveBase
syntax = "<channel> <nick> [<reason>]";
}
- CmdResult Handle (const char* const* parameters, int pcnt, User *user)
+ CmdResult Handle (const std::vector<std::string>& parameters, User *user)
{
- return RemoveBase::Handle(parameters, pcnt, user, true);
+ return RemoveBase::Handle(parameters, user, true);
}
};