From f45a8e2a14329860ad07b903797cef00a925e8cb Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Mon, 9 Jun 2014 17:43:50 +0200 Subject: m_remove Recognize /REMOVE The old syntax is now deprecated Fixes issue #860 reported by @Shawn-Smith --- src/modules/m_remove.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/modules/m_remove.cpp') 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& parameters, User *user, bool neworder) + CmdResult HandleRMB(const std::vector& 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 [reason ...] @@ -156,7 +159,7 @@ class CommandRemove : public RemoveBase CommandRemove(Module* Creator, bool& snk, ChanModeReference& nkm) : RemoveBase(Creator, snk, nkm, "REMOVE") { - syntax = " []"; + syntax = " []"; TRANSLATE3(TR_NICK, TR_TEXT, TR_TEXT); } -- cgit v1.3.1-10-gc9f91