diff options
author | Attila Molnar <attilamolnar@hush.com> | 2014-06-09 17:43:50 +0200 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2014-06-09 17:43:50 +0200 |
commit | f45a8e2a14329860ad07b903797cef00a925e8cb (patch) | |
tree | e95629a950190ff15f9f52c32168b029e9d7e127 /src/modules | |
parent | f5079e6b2ab7551517132978185191154b92dacb (diff) |
m_remove Recognize /REMOVE <chan> <nick>
The old syntax is now deprecated
Fixes issue #860 reported by @Shawn-Smith
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_remove.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/modules/m_remove.cpp b/src/modules/m_remove.cpp index 2530f3ef1..1b7d84de2 100644 --- a/src/modules/m_remove.cpp +++ b/src/modules/m_remove.cpp @@ -45,12 +45,15 @@ class RemoveBase : public Command { } - CmdResult HandleRMB(const std::vector<std::string>& parameters, User *user, bool neworder) + CmdResult HandleRMB(const std::vector<std::string>& parameters, User *user, bool fpart) { User* target; Channel* channel; std::string reason; + // If the command is a /REMOVE then detect the parameter order + bool neworder = ((fpart) || (parameters[0][0] == '#')); + /* Set these to the parameters needed, the new version of this module switches it's parameters around * supplying a new command with the new order while keeping the old /remove with the older order. * /remove <nick> <channel> [reason ...] @@ -156,7 +159,7 @@ class CommandRemove : public RemoveBase CommandRemove(Module* Creator, bool& snk, ChanModeReference& nkm) : RemoveBase(Creator, snk, nkm, "REMOVE") { - syntax = "<nick> <channel> [<reason>]"; + syntax = "<channel> <nick> [<reason>]"; TRANSLATE3(TR_NICK, TR_TEXT, TR_TEXT); } |