diff options
author | Adam <Adam@anope.org> | 2011-08-09 17:57:35 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2011-08-09 17:57:35 -0400 |
commit | eb7c9d0a863089ed9dc5c428c1d1214c8f0b85ba (patch) | |
tree | 592e052c719bf420a8f2e067f15b658c9fb73b13 /src | |
parent | 8007cc8a3a162dbda0c0ad783b0ede001491e178 (diff) |
Bug #1287 - Fixed chan_set_correct_modes to not deop the first user from syncing servers
Diffstat (limited to 'src')
-rw-r--r-- | src/channels.c | 2 | ||||
-rw-r--r-- | src/protocol/inspircd12.c | 6 | ||||
-rw-r--r-- | src/protocol/inspircd20.c | 6 |
3 files changed, 11 insertions, 3 deletions
diff --git a/src/channels.c b/src/channels.c index 59efc7d92..13a0b7c81 100644 --- a/src/channels.c +++ b/src/channels.c @@ -1478,7 +1478,7 @@ void chan_set_correct_modes(User * user, Channel * c, int give_modes) * Unless the channel has just been created. -heinz * Or the user matches CA_AUTODEOP... -GD */ - if (((ci->flags & CI_SECUREOPS) || (c->usercount == 1) + if (((ci->flags & CI_SECUREOPS) || (c->usercount == 1 && is_sync(user->server)) || check_access(user, ci, CA_AUTODEOP)) && !is_ulined(user->server->name)) { if (ircd->owner && (status & CUS_OWNER) && !is_founder(user, ci)) diff --git a/src/protocol/inspircd12.c b/src/protocol/inspircd12.c index 01703baed..3dbc1768b 100644 --- a/src/protocol/inspircd12.c +++ b/src/protocol/inspircd12.c @@ -127,7 +127,7 @@ IRCDVar myIrcd[] = { 1, /* support helper umode */ 0, /* p10 */ NULL, /* character set */ - 0, /* reports sync state */ + 1, /* reports sync state */ 1, /* CIDR channelbans */ 0, /* +j */ CMODE_j, /* +j Mode */ @@ -1803,6 +1803,7 @@ int anope_event_burst(char *source, int ac, char **av) int anope_event_eob(char *source, int ac, char **av) { + Server *s = findserver_uid(servlist, source); User *u = u_intro_regged; u_intro_regged = NULL; @@ -1814,6 +1815,9 @@ int anope_event_eob(char *source, int ac, char **av) validate_user(u); } + if (s != NULL) + finish_sync(s, 1); + /* End of burst.. */ burst = 0; diff --git a/src/protocol/inspircd20.c b/src/protocol/inspircd20.c index 969ad4a94..63f7ba558 100644 --- a/src/protocol/inspircd20.c +++ b/src/protocol/inspircd20.c @@ -158,7 +158,7 @@ IRCDVar myIrcd[] = { 1, /* support helper umode */ 0, /* p10 */ NULL, /* character set */ - 0, /* reports sync state */ + 1, /* reports sync state */ 1, /* CIDR channelbans */ 0, /* +j */ CMODE_j, /* +j Mode */ @@ -1809,6 +1809,7 @@ int anope_event_burst(char *source, int ac, char **av) int anope_event_eob(char *source, int ac, char **av) { + Server *s = findserver_uid(servlist, source); User *u = u_intro_regged; u_intro_regged = NULL; @@ -1820,6 +1821,9 @@ int anope_event_eob(char *source, int ac, char **av) validate_user(u); } + if (s != NULL) + finish_sync(s, 1); + /* End of burst.. */ burst = 0; |