summaryrefslogtreecommitdiff
path: root/src/modules/m_devoice.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_devoice.cpp')
-rw-r--r--src/modules/m_devoice.cpp26
1 files changed, 8 insertions, 18 deletions
diff --git a/src/modules/m_devoice.cpp b/src/modules/m_devoice.cpp
index 2b5de2bd6..64604e90c 100644
--- a/src/modules/m_devoice.cpp
+++ b/src/modules/m_devoice.cpp
@@ -41,19 +41,13 @@ class CommandDevoice : public Command
CmdResult Handle (const std::vector<std::string> &parameters, User *user)
{
- Channel* c = ServerInstance->FindChan(parameters[0]);
- if (c && c->HasUser(user))
- {
- std::vector<std::string> modes;
- modes.push_back(parameters[0]);
- modes.push_back("-v");
- modes.push_back(user->nick);
+ std::vector<std::string> modes;
+ modes.push_back(parameters[0]);
+ modes.push_back("-v");
+ modes.push_back(user->nick);
- ServerInstance->SendGlobalMode(modes, ServerInstance->FakeClient);
- return CMD_SUCCESS;
- }
-
- return CMD_FAILURE;
+ ServerInstance->SendGlobalMode(modes, ServerInstance->FakeClient);
+ return CMD_SUCCESS;
}
};
@@ -65,16 +59,12 @@ class ModuleDeVoice : public Module
{
}
- void init()
+ void init() CXX11_OVERRIDE
{
ServerInstance->Modules->AddService(cmd);
}
- virtual ~ModuleDeVoice()
- {
- }
-
- virtual Version GetVersion()
+ Version GetVersion() CXX11_OVERRIDE
{
return Version("Provides voiced users with the ability to devoice themselves.", VF_VENDOR);
}