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_remove.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/modules/m_remove.cpp') 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& parameters, User *user, bool neworder) { const char* channame; const char* username; @@ -87,8 +87,8 @@ class RemoveBase * /remove [reason ...] * /fpart [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& 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 = " []"; } - CmdResult Handle (const char* const* parameters, int pcnt, User *user) + CmdResult Handle (const std::vector& parameters, User *user) { - return RemoveBase::Handle(parameters, pcnt, user, true); + return RemoveBase::Handle(parameters, user, true); } }; -- cgit v1.2.3