Remove obsolete tools/crypter script. Allow Client blocks to
[ircu2.10.12-pk.git] / ircd / s_conf.c
index c4516b3c9e13e561222e65e2e901121a1840efd2..4fac7b83aaf8bda1caa85f64cb07ffa8f7ef6d47 100644 (file)
@@ -56,7 +56,7 @@
 #include "struct.h"
 #include "sys.h"
 
-#include <assert.h>
+/* #include <assert.h> -- Now using assert in ircd_log.h */
 #include <arpa/inet.h>
 #include <errno.h>
 #include <fcntl.h>
@@ -382,7 +382,7 @@ enum AuthorizationCheckResult attach_iline(struct Client* cptr)
 
   hp = cli_dns_reply(cptr);
   for (aconf = GlobalConfList; aconf; aconf = aconf->next) {
-    if (aconf->status != CONF_CLIENT || !aconf->host)
+    if (aconf->status != CONF_CLIENT)
       continue;
     if (aconf->address.port && aconf->address.port != cli_listener(cptr)->addr.port)
       continue;
@@ -391,14 +391,12 @@ enum AuthorizationCheckResult attach_iline(struct Client* cptr)
       if (match(aconf->username, cli_username(cptr)))
         continue;
     }
-    if (hp) {
-      Debug((DEBUG_DNS, "a_il: %s->%s", cli_sockhost(cptr), hp->h_name));
-      if (!match(aconf->name, hp->h_name))
-        return check_limit_and_attach(cptr, aconf);
-    }
+    if (aconf->host && (!hp || match(aconf->host, hp->h_name)))
+      continue;
     if ((aconf->addrbits >= 0)
-        && ipmask_check(&cli_ip(cptr), &aconf->address.addr, aconf->addrbits))
-      return check_limit_and_attach(cptr, aconf);
+        && !ipmask_check(&cli_ip(cptr), &aconf->address.addr, aconf->addrbits))
+      continue;
+    return check_limit_and_attach(cptr, aconf);
   }
   return ACR_NO_AUTHORIZATION;
 }