if (IsDigit(*aconf->host)) {
/*
* rfc 1035 sez host names may not start with a digit
+ * XXX - this has changed code needs to be updated
*/
aconf->ipnum.s_addr = inet_addr(aconf->host);
if (INADDR_NONE == aconf->ipnum.s_addr) {
mark_listeners_closing();
- if (initconf(0) == -1) /* This calls check_class(), */
- check_class(); /* unless it fails */
+ if (!conf_init()) /* This calls check_class(), */
+ check_class(); /* unless it fails */
/*
* make sure that the server listener is re-added so it doesn't get
}
/*
- * initconf
+ * conf_init
*
* Read configuration file.
*
- * returns -1, if file cannot be opened
- * 0, if file opened
+ * returns 0, if file cannot be opened
+ * 1, if file read
*/
#define MAXCONFLINKS 150
-int initconf(int opt)
+int conf_init(void)
{
static char quotes[9][2] = {
{'b', '\b'},
int ccount = 0;
struct ConfItem *aconf = 0;
- Debug((DEBUG_DEBUG, "initconf(): ircd.conf = %s", configfile));
+ Debug((DEBUG_DEBUG, "conf_init: ircd.conf = %s", configfile));
if (0 == (file = fbopen(configfile, "r"))) {
- return -1;
+ return 0;
}
while (fbgets(line, sizeof(line) - 1, file)) {
if ((tmp = strchr(line, '\n')))
if (aconf->status & CONF_SERVER) {
if (EmptyString(aconf->passwd))
continue;
- else if (!(opt & BOOT_QUICK))
- lookup_confhost(aconf);
+ lookup_confhost(aconf);
}
/* Create expression tree from connect rule...
fbclose(file);
check_class();
nextping = nextconnect = CurrentTime;
- return 0;
+ return 1;
}
/* read_tlines
/* find active glines */
/* added a check against the user's IP address to find_gline() -Kev */
- else if ((agline = find_gline(cptr, NULL)) && GlineIsActive(agline))
+ else if ((agline = gline_find(cptr, 0)) && GlineIsActive(agline))
sendto_one(cptr, ":%s %d %s :%s.", me.name, ERR_YOUREBANNEDCREEP,
- cptr->name, agline->reason);
+ cptr->name, GlineReason(agline));
else
agline = NULL; /* if a gline was found, it was inactive */