1
0
mirror of https://github.com/anope/anope.git synced 2026-06-27 00:56:38 +02:00

Don't unset modes which have no privilege associated with them

This commit is contained in:
Adam
2015-09-06 16:00:32 -04:00
parent 3b647b0740
commit c007b829f7
2 changed files with 2 additions and 10 deletions
+2 -1
View File
@@ -858,7 +858,8 @@ void Channel::SetCorrectModes(User *user, bool give_modes)
given = true;
}
}
else if (take_modes && !has_priv && !u_access.HasPriv(cm->name + "ME"))
/* modes that have no privileges assigned shouldn't be removed (like operprefix, ojoin) */
else if (take_modes && !has_priv && ci->GetLevel(cm->name + "ME") != ACCESS_INVALID && !u_access.HasPriv(cm->name + "ME"))
{
/* Only remove modes if they are > voice */
if (cm->name == "VOICE")