#include "../nick/nick.h"
#include "../lib/irc_string.h"
#include "../control/control.h"
+#include "../lib/version.h"
+
+MODULE_VERSION("")
/* control's nick */
extern nick *mynick;
}
void _fini() {
- if (cfext >= 0) {
- releasechanext(cfext);
- }
-
- if (cfnext >= 0) {
- releasenickext(cfnext);
- }
-
if (cffailedinit == 0) {
deleteschedule(NULL, &cfsched_dosample, NULL);
deleteschedule(NULL, &cfsched_doexpire, NULL);
deregisterhook(HOOK_CORE_STATSREQUEST, &cfhook_statsreport);
deregisterhook(HOOK_NICK_ACCOUNT, &cfhook_auth);
}
+
+ if (cfext >= 0) {
+ releasechanext(cfext);
+ }
+
+ if (cfnext >= 0) {
+ releasenickext(cfnext);
+ }
}
int cfcmd_debug(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;
}
}
- 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.");
channel *cp;
chanindex *cip;
nick *np;
- chanfix *cf;
regop *ro, *roh;
struct timeval start;
struct timeval end;
cfuhost = cfscore = cfnewro = 0;
- if (sp_countsplitservers() > CFMAXSPLITSERVERS)
+ if (sp_countsplitservers(SERVERTYPEFLAG_USER_STATE) > CFMAXSPLITSERVERS)
return;
gettimeofday(&start, NULL);
for (i=0; i<CHANNELHASHSIZE; i++) {
for (cip=chantable[i]; cip; cip=cip->next) {
- cf = (chanfix*)cip->exts[cfext];
cp = cip->channel;
if (!cp || cp->users->totalusers < CFMINUSERS)
if ((cp->users->content[a] != nouser) && (cp->users->content[a] & CUMODE_OP)) {
np = getnickbynumeric(cp->users->content[a]);
+ if (np)
+ continue;
+
#if !CFDEBUG
if (IsService(np))
continue;
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;a<cp->users->hashsize;a++) {