1
0
mirror of https://github.com/anope/anope.git synced 2026-07-10 11:03:13 +02:00

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
This commit is contained in:
Adam-
2010-04-11 07:29:46 +00:00
parent 1e9de0c7f1
commit 5d3491e72f
+2 -1
View File
@@ -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);