Allow multiple host entries in Operator and Motd blocks.
[ircu2.10.12-pk.git] / ircd / s_conf.c
index bd1704ddcb8f3afb4c61f3a67ff2bdfb6ab482d4..18f4b00744275eb0935cd3c7cae3cc1cf85a4f61 100644 (file)
@@ -34,7 +34,6 @@
 #include "hash.h"
 #include "ircd.h"
 #include "ircd_alloc.h"
-#include "ircd_auth.h"
 #include "ircd_chattr.h"
 #include "ircd_log.h"
 #include "ircd_reply.h"
@@ -49,6 +48,7 @@
 #include "opercmds.h"
 #include "parse.h"
 #include "res.h"
+#include "s_auth.h"
 #include "s_bsd.h"
 #include "s_debug.h"
 #include "s_misc.h"
@@ -221,7 +221,6 @@ void conf_parse_userhost(struct ConfItem *aconf, char *host)
     aconf->addrbits = addrbits;
   else
     aconf->addrbits = -1;
-  MyFree(host);
 }
 
 /** Copies a completed DNS query into its ConfItem.
@@ -482,7 +481,8 @@ struct ConfItem *conf_debug_iline(const char *client)
             (aconf->username ? aconf->username : "(null)"),
             (aconf->host ? aconf->host : "(null)"),
             (aconf->name ? aconf->name : "(null)"),
-            ConfClass(aconf), aconf->maximum,  aconf->passwd);
+            ConfClass(aconf), aconf->maximum,
+            (aconf->passwd ? aconf->passwd : "(null)"));
     break;
   }
 
@@ -655,6 +655,7 @@ struct ConfItem* find_conf_exact(const char* name, struct Client *cptr, int stat
     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;
@@ -825,6 +826,7 @@ int read_configuration_file(void)
 {
   conf_error = 0;
   feature_unmark(); /* unmark all features for resetting later */
+  clear_nameservers(); /* clear previous list of DNS servers */
   /* Now just open an fd. The buffering isn't really needed... */
   init_lexer();
   yyparse();
@@ -948,14 +950,14 @@ int rehash(struct Client *cptr, int sig)
 
   class_mark_delete();
   mark_listeners_closing();
-  iauth_mark_closing();
+  auth_mark_closing();
   close_mappings();
 
   read_configuration_file();
 
   log_reopen(); /* reopen log files */
 
-  iauth_close_unused();
+  auth_close_unused();
   close_listeners();
   class_delete_marked();         /* unless it fails */
 
@@ -1083,7 +1085,7 @@ int find_kill(struct Client *cptr)
     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