diff options
author | Adam <Adam@anope.org> | 2015-09-06 16:00:32 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2015-09-06 16:01:43 -0400 |
commit | c007b829f7767b5b836ea32ffe7d6bf8afe5d704 (patch) | |
tree | 1aa5cd896eca0694259137d8dc5f71484cd9987b /src | |
parent | 3b647b07407472abd4aca513a30f67f36969bd8f (diff) |
Don't unset modes which have no privilege associated with them
Diffstat (limited to 'src')
-rw-r--r-- | src/channels.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/channels.cpp b/src/channels.cpp index 5a578b300..18a85ab49 100644 --- a/src/channels.cpp +++ b/src/channels.cpp @@ -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") |