summaryrefslogtreecommitdiff
path: root/src/modules/m_remove.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_remove.cpp')
-rw-r--r--src/modules/m_remove.cpp21
1 files changed, 7 insertions, 14 deletions
diff --git a/src/modules/m_remove.cpp b/src/modules/m_remove.cpp
index 86f50ad62..d4b7ca42f 100644
--- a/src/modules/m_remove.cpp
+++ b/src/modules/m_remove.cpp
@@ -36,7 +36,6 @@
*/
class RemoveBase : public Command
{
- private:
bool& supportnokicks;
public:
@@ -118,7 +117,7 @@ class RemoveBase : public Command
reason = "Removed by " + user->nick + ": " + reasonparam;
channel->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s removed %s from the channel", channel->name.c_str(), user->nick.c_str(), target->nick.c_str());
- target->WriteServ("NOTICE %s :*** %s removed you from %s with the message: %s", target->nick.c_str(), user->nick.c_str(), channel->name.c_str(), reasonparam.c_str());
+ target->WriteNotice("*** " + user->nick + " removed you from " + channel->name + " with the message: " + reasonparam);
channel->PartUser(target, reason);
}
@@ -137,7 +136,7 @@ class RemoveBase : public Command
return CMD_SUCCESS;
}
- virtual RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters) = 0;
+ RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters) = 0;
};
/** Handle /REMOVE
@@ -198,13 +197,12 @@ class ModuleRemove : public Module
CommandFpart cmd2;
bool supportnokicks;
-
public:
ModuleRemove() : cmd1(this, supportnokicks), cmd2(this, supportnokicks)
{
}
- void init()
+ void init() CXX11_OVERRIDE
{
ServerInstance->Modules->AddService(cmd1);
ServerInstance->Modules->AddService(cmd2);
@@ -213,25 +211,20 @@ class ModuleRemove : public Module
ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
- virtual void On005Numeric(std::string &output)
+ void On005Numeric(std::map<std::string, std::string>& tokens) CXX11_OVERRIDE
{
- output.append(" REMOVE");
+ tokens["REMOVE"];
}
- virtual void OnRehash(User* user)
+ void OnRehash(User* user) CXX11_OVERRIDE
{
supportnokicks = ServerInstance->Config->ConfValue("remove")->getBool("supportnokicks");
}
- virtual ~ModuleRemove()
- {
- }
-
- virtual Version GetVersion()
+ Version GetVersion() CXX11_OVERRIDE
{
return Version("Provides a /remove command, this is mostly an alternative to /kick, except makes users appear to have parted the channel", VF_OPTCOMMON | VF_VENDOR);
}
-
};
MODULE_INIT(ModuleRemove)