diff options
author | attilamolnar <attilamolnar@hush.com> | 2013-06-02 00:16:01 +0200 |
---|---|---|
committer | attilamolnar <attilamolnar@hush.com> | 2013-06-02 00:16:01 +0200 |
commit | 3e704abc5af27cc6d8d3e5e720d2fe497b423417 (patch) | |
tree | ddc32d10ba415d269d4d15cbf1446fefeb1ce48f /src/modules | |
parent | d16a4554002e915f4512dc8b72e4a49073931e63 (diff) |
m_devoice Remove FindChan() and HasUser() checks, these are done when parsing the mode change
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_devoice.cpp | 18 |
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> ¶meters, 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; } }; |