From 5d3491e72f9a88128a36ec47779e710b11525e94 Mon Sep 17 00:00:00 2001 From: Adam- Date: Sun, 11 Apr 2010 07:29:46 +0000 Subject: [PATCH] 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 --- src/channels.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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);