aconf->addrbits = addrbits;
else
aconf->addrbits = -1;
- MyFree(host);
}
/** Copies a completed DNS query into its ConfItem.
else if (!ipmask_check(&cli_ip(cptr), &tmp->address.addr, tmp->addrbits))
continue;
if ((tmp->status & CONF_OPERATOR)
+ && (MaxLinks(tmp->conn_class) > 0)
&& (tmp->clients >= MaxLinks(tmp->conn_class)))
continue;
return tmp;
static int conf_error;
/** When non-zero, indicates that the configuration file was loaded at least once. */
static int conf_already_read;
-extern FILE *yyin;
extern void yyparse(void);
-extern void init_lexer(void);
+extern int init_lexer(void);
+extern void deinit_lexer(void);
/** Read configuration file.
* @return Zero on failure, non-zero on success. */
{
conf_error = 0;
feature_unmark(); /* unmark all features for resetting later */
- /* Now just open an fd. The buffering isn't really needed... */
- init_lexer();
+ clear_nameservers(); /* clear previous list of DNS servers */
+ if (!init_lexer())
+ return 0;
yyparse();
- fclose(yyin);
- yyin = NULL;
+ deinit_lexer();
feature_mark(); /* reset unmarked features */
conf_already_read = 1;
return 1;
clear_quarantines();
- if (sig != 2)
- restart_resolver();
-
class_mark_delete();
mark_listeners_closing();
auth_mark_closing();
read_configuration_file();
+ if (sig != 2)
+ restart_resolver();
+
log_reopen(); /* reopen log files */
auth_close_unused();
return -1;
}
- if ((agline = gline_lookup(cptr, 0))) {
+ if (!feature_bool(FEAT_DISABLE_GLINES) && (agline = gline_lookup(cptr, 0))) {
/*
* find active glines
* added a check against the user's IP address to find_gline() -Kev