X-Git-Url: https://jfr.im/git/irc/quakenet/newserv.git/blobdiff_plain/0f06e0cba6f8980945608781a9f4f0bb2c6aa209..28aa186de14dc4fa7488866e70beb6ae933dde79:/chanfix/chanfix.c diff --git a/chanfix/chanfix.c b/chanfix/chanfix.c index cdeb80af..698511b4 100644 --- a/chanfix/chanfix.c +++ b/chanfix/chanfix.c @@ -446,7 +446,7 @@ int cfcmd_chanfix(void *source, int cargc, char **cargv) { return CMD_ERROR; } - if (sp_countsplitservers() > 0) { + if (sp_countsplitservers(SERVERTYPEFLAG_USER_STATE) > 0) { controlreply(np, "Chanfix cannot be used during a netsplit."); return CMD_ERROR; @@ -586,7 +586,7 @@ int cfcmd_requestop(void *source, int cargc, char **cargv) { } } - if (sp_countsplitservers() > 0) { + if (sp_countsplitservers(SERVERTYPEFLAG_USER_STATE) > 0) { controlreply(np, "One or more servers are currently split. Wait until the" " netsplit is over and try again."); @@ -679,7 +679,6 @@ void cfsched_dosample(void *arg) { channel *cp; chanindex *cip; nick *np; - chanfix *cf; regop *ro, *roh; struct timeval start; struct timeval end; @@ -689,14 +688,13 @@ void cfsched_dosample(void *arg) { cfuhost = cfscore = cfnewro = 0; - if (sp_countsplitservers() > CFMAXSPLITSERVERS) + if (sp_countsplitservers(SERVERTYPEFLAG_USER_STATE) > CFMAXSPLITSERVERS) return; gettimeofday(&start, NULL); for (i=0; inext) { - cf = (chanfix*)cip->exts[cfext]; cp = cip->channel; if (!cp || cp->users->totalusers < CFMINUSERS) @@ -860,7 +858,7 @@ void cfhook_autofix(int hook, void *arg) { hook == HOOK_CHANNEL_KICK || hook == HOOK_CHANNEL_JOIN) { cp = args[0]; - if (sp_countsplitservers() > 0) + if (sp_countsplitservers(SERVERTYPEFLAG_USER_STATE) > 0) return; for(a=0;ausers->hashsize;a++) {