summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorattilamolnar <attilamolnar@hush.com>2013-06-02 00:16:01 +0200
committerattilamolnar <attilamolnar@hush.com>2013-06-02 00:16:01 +0200
commit3e704abc5af27cc6d8d3e5e720d2fe497b423417 (patch)
treeddc32d10ba415d269d4d15cbf1446fefeb1ce48f
parentd16a4554002e915f4512dc8b72e4a49073931e63 (diff)
m_devoice Remove FindChan() and HasUser() checks, these are done when parsing the mode change
-rw-r--r--src/modules/m_devoice.cpp18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/modules/m_devoice.cpp b/src/modules/m_devoice.cpp
index 340579466..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;
}
};