]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - src/hostmask.c
use an rpath to avoid LD_LIBRARY_PATH stuff
[irc/rqf/shadowircd.git] / src / hostmask.c
index 772b020eba778ac458ce37f1e2bfc8970732f614..273f1169d2c3f94473e4be9c80fae1a026e29f82 100644 (file)
@@ -416,6 +416,21 @@ find_address_conf(const char *host, const char *sockhost, const char *user,
        return iconf;
 }
 
+/* struct ConfItem* find_dline(struct rb_sockaddr_storage*, int)
+ * Input: An address, an address family.
+ * Output: The best matching D-line or exempt line.
+ * Side effects: None.
+ */
+struct ConfItem *
+find_dline(struct sockaddr *addr, int aftype)
+{
+       struct ConfItem *eline;
+       eline = find_conf_by_address(NULL, NULL, NULL, addr, CONF_EXEMPTDLINE | 1, aftype, NULL);
+       if(eline)
+               return eline;
+       return find_conf_by_address(NULL, NULL, NULL, addr, CONF_DLINE | 1, aftype, NULL);
+}
+
 /* void find_exact_conf_by_address(const char*, int, const char *)
  * Input: 
  * Output: ConfItem if found