diff options
-rw-r--r-- | src/mode.cpp | 4 | ||||
-rw-r--r-- | src/modes/umode_s.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_cloaking.cpp | 3 | ||||
-rw-r--r-- | src/modules/m_invisible.cpp | 3 |
4 files changed, 2 insertions, 12 deletions
diff --git a/src/mode.cpp b/src/mode.cpp index 65ec7e614..14b465c6e 100644 --- a/src/mode.cpp +++ b/src/mode.cpp @@ -486,7 +486,7 @@ void ModeParser::Process(const std::vector<std::string>& parameters, User *user, { type = MODETYPE_USER; mask = MASK_USER; - if ((user != targetuser) && (!ServerInstance->ULine(user->server))) + if (user != targetuser && IS_LOCAL(user) && !ServerInstance->ULine(user->server)) { user->WriteNumeric(ERR_USERSDONTMATCH, "%s :Can't change mode for other users", user->nick.c_str()); return; @@ -1165,7 +1165,7 @@ void ModeHandler::RemoveMode(User* user, irc::modestacker* stack) sprintf(moderemove,"-%c",this->GetModeChar()); parameters.push_back(user->nick); parameters.push_back(moderemove); - ServerInstance->Parser->CallHandler("MODE", parameters, user); + ServerInstance->Modes->Process(parameters, ServerInstance->FakeClient, false); } } } diff --git a/src/modes/umode_s.cpp b/src/modes/umode_s.cpp index d7f508066..93bc60cac 100644 --- a/src/modes/umode_s.cpp +++ b/src/modes/umode_s.cpp @@ -23,10 +23,6 @@ ModeUserServerNoticeMask::ModeUserServerNoticeMask(InspIRCd* Instance) : ModeHan ModeAction ModeUserServerNoticeMask::OnModeChange(User* source, User* dest, Channel*, std::string ¶meter, bool adding, bool servermode) { - /* Only opers can change other users modes */ - if ((source != dest) && (!IS_OPER(source))) - return MODEACTION_DENY; - /* Set the array fields */ if (adding) { diff --git a/src/modules/m_cloaking.cpp b/src/modules/m_cloaking.cpp index 278b74541..761f37c18 100644 --- a/src/modules/m_cloaking.cpp +++ b/src/modules/m_cloaking.cpp @@ -69,9 +69,6 @@ class CloakUser : public ModeHandler ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, bool) { - if (source != dest) - return MODEACTION_DENY; - /* For remote clients, we dont take any action, we just allow it. * The local server where they are will set their cloak instead. * This is fine, as we will recieve it later. diff --git a/src/modules/m_invisible.cpp b/src/modules/m_invisible.cpp index 36257818e..aa69d1b85 100644 --- a/src/modules/m_invisible.cpp +++ b/src/modules/m_invisible.cpp @@ -55,9 +55,6 @@ class InvisibleMode : public ModeHandler ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, bool) { - if (source != dest) - return MODEACTION_DENY; - if (dest->IsModeSet('Q') != adding) { bool ok = false; |