Author: Kev <klmitch@mit.edu>
[ircu2.10.12-pk.git] / ircd / s_conf.c
index 53baa8e8ba99f7bc6f753678a59ca219b0ce931c..a7013ebec184160cde56adee8f35a1c40eb5f555 100644 (file)
@@ -301,6 +301,7 @@ static void lookup_confhost(struct ConfItem *aconf)
   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) {
@@ -941,8 +942,8 @@ int rehash(struct Client *cptr, int sig)
 
   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
@@ -1004,18 +1005,18 @@ int rehash(struct Client *cptr, int sig)
 }
 
 /*
- * 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'},
@@ -1034,9 +1035,9 @@ int initconf(int opt)
   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')))
@@ -1258,8 +1259,7 @@ int initconf(int opt)
     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...
@@ -1315,7 +1315,7 @@ int initconf(int opt)
   fbclose(file);
   check_class();
   nextping = nextconnect = CurrentTime;
-  return 0;
+  return 1;
 }
 
 /* read_tlines 
@@ -1445,9 +1445,9 @@ int find_kill(struct Client *cptr)
 
   /* 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 */