diff options
author | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-04-11 07:29:46 +0000 |
---|---|---|
committer | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-04-11 07:29:46 +0000 |
commit | 5d3491e72f9a88128a36ec47779e710b11525e94 (patch) | |
tree | 5b9bc95497749ec25e5a484fb9b16f7917d39de8 /src | |
parent | 1e9de0c7f146ec00d2dd6ee4cb9d86860a03ea9f (diff) |
Dont allow the first user in registered syncing channel to retain their access if they arent allowed to have it
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2886 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
-rw-r--r-- | src/channels.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/channels.c b/src/channels.c index e5c1fac32..c5e35a473 100644 --- a/src/channels.c +++ b/src/channels.c @@ -1503,7 +1503,8 @@ void chan_set_correct_modes(User * user, Channel * c, int give_modes) else if (voice && check_access(user, ci, CA_AUTOVOICE)) c->SetMode(NULL, CMODE_VOICE, user->nick); } - if ((ci->HasFlag(CI_SECUREOPS) || check_access(user, ci, CA_AUTODEOP)) && !is_ulined(user->server->name)) + /* If this channel has secureops or the user matches autodeop or the channel is syncing and this is the first user and they are not ulined, check to remove modes */ + if ((ci->HasFlag(CI_SECUREOPS) || check_access(user, ci, CA_AUTODEOP) || (c->HasFlag(CH_SYNCING) && c->users.size() == 1)) && !is_ulined(user->server->name)) { if (owner && c->HasUserStatus(user, CMODE_OWNER) && !IsFounder(user, ci)) c->RemoveMode(NULL, CMODE_OWNER, user->nick); |