diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-10-25 14:02:11 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-10-25 14:02:11 +0000 |
commit | 648c95b10bc1c3afb23183e5d355286ef5f18f6f (patch) | |
tree | bedb523b36fb2a63f18102e47c9800a07b5c7f64 | |
parent | 07689436008f79e3aebe32fb660680e5830568ce (diff) |
Fix <disabled:umodes> interfering with /unloadmodule m_implementing_a_umode, aquanight, you didn't look quite far enough into this - the problem was m_cloaking (e.g.) returning MODEACTION_DENY if src != dest, which was very very oooold behaviour. Seems to work fine now.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10713 e03df62e-2008-0410-955e-edbf42e46eb7
-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; |