]> jfr.im git - solanum.git/blobdiff - src/match.c
strip_tabs() is related to s_conf.c ONLY - moved it there
[solanum.git] / src / match.c
index 7a9ad94aabb8f0804524c3ad29ec90cdf3aede44..f764c64aebaa502dd68794e6fac4c15395722747 100644 (file)
@@ -307,7 +307,7 @@ int comp_with_mask_sock(struct sockaddr *addr, struct sockaddr *dest, u_int mask
                iaddr = &((struct sockaddr_in *)addr)->sin_addr;
                idest = &((struct sockaddr_in *)dest)->sin_addr;
        }
-#ifdef IPV6
+#ifdef RB_IPV6
        else
        {
                iaddr = &((struct sockaddr_in6 *)addr)->sin6_addr;
@@ -326,7 +326,7 @@ int comp_with_mask_sock(struct sockaddr *addr, struct sockaddr *dest, u_int mask
  */
 int match_ips(const char *s1, const char *s2)
 {
-       struct irc_sockaddr_storage ipaddr, maskaddr;
+       struct rb_sockaddr_storage ipaddr, maskaddr;
        char mask[BUFSIZE];
        char address[HOSTLEN + 1];
        char *len;
@@ -346,7 +346,7 @@ int match_ips(const char *s1, const char *s2)
        if (cidrlen == 0)
                return 0;
 
-#ifdef IPV6
+#ifdef RB_IPV6
        if (strchr(mask, ':') && strchr(address, ':'))
        {
                aftype = AF_INET6;
@@ -364,8 +364,8 @@ int match_ips(const char *s1, const char *s2)
        else
                return 0;
 
-       inetpton(aftype, address, ipptr);
-       inetpton(aftype, mask, maskptr);
+       rb_inet_pton(aftype, address, ipptr);
+       rb_inet_pton(aftype, mask, maskptr);
        if (comp_with_mask(ipptr, maskptr, cidrlen))
                return 1;
        else
@@ -380,7 +380,7 @@ int match_ips(const char *s1, const char *s2)
 
 int match_cidr(const char *s1, const char *s2)
 {
-       struct irc_sockaddr_storage ipaddr, maskaddr;
+       struct rb_sockaddr_storage ipaddr, maskaddr;
        char mask[BUFSIZE];
        char address[NICKLEN + USERLEN + HOSTLEN + 6];
        char *ipmask;
@@ -414,7 +414,7 @@ int match_cidr(const char *s1, const char *s2)
        if (cidrlen == 0)
                return 0;
 
-#ifdef IPV6
+#ifdef RB_IPV6
        if (strchr(ip, ':') && strchr(ipmask, ':'))
        {
                aftype = AF_INET6;
@@ -432,8 +432,8 @@ int match_cidr(const char *s1, const char *s2)
        else
                return 0;
 
-       inetpton(aftype, ip, ipptr);
-       inetpton(aftype, ipmask, maskptr);
+       rb_inet_pton(aftype, ip, ipptr);
+       rb_inet_pton(aftype, ipmask, maskptr);
        if (comp_with_mask(ipptr, maskptr, cidrlen) && match(mask, address))
                return 1;
        else