diff options
author | Adam <Adam@anope.org> | 2014-02-27 04:23:57 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2014-02-27 04:48:48 -0500 |
commit | 5adc8bfefc126aff32a88219409ec9131229d86a (patch) | |
tree | 70afe0b8c6b692cdc049ce3f8c988098b8a5fd08 /src/channels.cpp | |
parent | abcf0cde5a6a28acf492cf158185861632d4ac44 (diff) |
Do not take modes from users in channels with secureops off if we are always lowering channels timestamps to their creations
Diffstat (limited to 'src/channels.cpp')
-rw-r--r-- | src/channels.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/channels.cpp b/src/channels.cpp index 27e186b83..a9ad68b93 100644 --- a/src/channels.cpp +++ b/src/channels.cpp @@ -788,14 +788,9 @@ void Channel::SetCorrectModes(User *user, bool give_modes) Log(LOG_DEBUG) << "Setting correct user modes for " << user->nick << " on " << this->name << " (" << (give_modes ? "" : "not ") << "giving modes)"; AccessGroup u_access = ci->AccessFor(user); - ChannelMode *registered = ModeManager::FindChannelModeByName("REGISTERED"); - /* If this channel has secureops, or the registered channel mode exists and the channel does not have +r set (aka the channel - * was created just now or while we were off), or the registered channel mode does not exist and channel is syncing (aka just - * created *to us*) and the user's server is synced (aka this isn't us doing our initial uplink - without this we would be deopping all - * users with no access on a non-secureops channel on startup), and the user's server isn't ulined, then set negative modes. - */ - bool take_modes = (registered && !this->HasMode("REGISTERED")) || (!registered && this->syncing && user->server->IsSynced()); + /* Initially only take modes if the channel is being created by a non netmerge */ + bool take_modes = this->syncing && user->server->IsSynced(); FOREACH_MOD(OnSetCorrectModes, (user, this, u_access, give_modes, take_modes)); |