diff options
| author | 2018-07-26 19:43:54 +0100 | |
|---|---|---|
| committer | 2018-07-26 20:12:14 +0100 | |
| commit | 384ef31bc01e4a1a2e59d082c9066002410ba54a (patch) | |
| tree | 06bd81f9e0e48183c1ada07cf7a8757a5028cad1 /src/modules/m_remove.cpp | |
| parent | Add a module which implements the HAProxy PROXY v2 protocol. (diff) | |
| download | inspircd++-384ef31bc01e4a1a2e59d082c9066002410ba54a.tar.gz inspircd++-384ef31bc01e4a1a2e59d082c9066002410ba54a.tar.bz2 inspircd++-384ef31bc01e4a1a2e59d082c9066002410ba54a.zip | |
Use CommandBase::Params instead of std::vector<std::string>.
This is presently a typedef but will soon be replaced with a class
that encapsulates both tags and parameters.
Diffstat (limited to 'src/modules/m_remove.cpp')
| -rw-r--r-- | src/modules/m_remove.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/modules/m_remove.cpp b/src/modules/m_remove.cpp index 35b7fbf03..d68a70503 100644 --- a/src/modules/m_remove.cpp +++ b/src/modules/m_remove.cpp @@ -47,7 +47,7 @@ class RemoveBase : public Command { } - CmdResult HandleRMB(const std::vector<std::string>& parameters, User *user, bool fpart) + CmdResult HandleRMB(User* user, const CommandBase::Params& parameters, bool fpart) { User* target; Channel* channel; @@ -102,7 +102,7 @@ class RemoveBase : public Command { /* We'll let everyone remove their level and below, eg: * ops can remove ops, halfops, voices, and those with no mode (no moders actually are set to 1) - * a ulined target will get a higher level than it's possible for a /remover to get..so they're safe. + a ulined target will get a higher level than it's possible for a /remover to get..so they're safe. * Nobody may remove people with >= protectedrank rank. */ unsigned int ulevel = channel->GetPrefixValue(user); @@ -114,7 +114,7 @@ class RemoveBase : public Command { // Send an ENCAP REMOVE with parameters being in the old <user> <chan> order which is // compatible with both 2.0 and 3.0. This also turns FPART into REMOVE. - std::vector<std::string> p; + CommandBase::Params p; p.push_back(target->uuid); p.push_back(channel->name); if (parameters.size() > 2) @@ -169,9 +169,9 @@ class CommandRemove : public RemoveBase TRANSLATE3(TR_NICK, TR_TEXT, TR_TEXT); } - CmdResult Handle(const std::vector<std::string>& parameters, User* user) CXX11_OVERRIDE + CmdResult Handle(User* user, const Params& parameters) CXX11_OVERRIDE { - return HandleRMB(parameters, user, false); + return HandleRMB(user, parameters, false); } }; @@ -187,9 +187,9 @@ class CommandFpart : public RemoveBase TRANSLATE3(TR_TEXT, TR_NICK, TR_TEXT); } - CmdResult Handle(const std::vector<std::string>& parameters, User* user) CXX11_OVERRIDE + CmdResult Handle(User* user, const Params& parameters) CXX11_OVERRIDE { - return HandleRMB(parameters, user, true); + return HandleRMB(user, parameters, true); } }; |
