#include "hostmask.h"
#include "numeric.h"
#include "send.h"
-#include "irc_string.h"
+#include "match.h"
-#ifdef IPV6
+#ifdef RB_IPV6
static unsigned long hash_ipv6(struct sockaddr *, int);
#endif
static unsigned long hash_ipv4(struct sockaddr *, int);
else
addr = (struct rb_sockaddr_storage *)naddr;
-#ifdef IPV6
+#ifdef RB_IPV6
if(strchr(ip, ':'))
{
if((ptr = strchr(ip, '/')))
*b = 128;
} else
*b = 128;
- if(inetpton_sock(ip, (struct sockaddr *)addr) > 0)
+ if(rb_inet_pton_sock(ip, (struct sockaddr *)addr) > 0)
return HM_IPV6;
else
return HM_HOST;
*b = 32;
} else
*b = 32;
- if(inetpton_sock(ip, (struct sockaddr *)addr) > 0)
+ if(rb_inet_pton_sock(ip, (struct sockaddr *)addr) > 0)
return HM_IPV4;
else
return HM_HOST;
* Output: A hash value of the IP address.
* Side effects: None
*/
-#ifdef IPV6
+#ifdef RB_IPV6
static unsigned long
hash_ipv6(struct sockaddr *saddr, int bits)
{
if(addr)
{
/* Check for IPV6 matches... */
-#ifdef IPV6
+#ifdef RB_IPV6
if(fam == AF_INET6)
{
return kconf;
}
- /* hunt for a gline */
- if(ConfigFileEntry.glines)
- {
- kconf = find_conf_by_address(host, sockhost, NULL, ip, CONF_GLINE, aftype, user);
-
- if((kconf != NULL) && !IsConfExemptGline(iconf))
- return kconf;
- }
-
return iconf;
}
address = "/NOMATCH!/";
arec = rb_malloc(sizeof(struct AddressRec));
masktype = parse_netmask(address, (struct sockaddr *)&addr, &bits);
-#ifdef IPV6
+#ifdef RB_IPV6
if(masktype == HM_IPV6)
{
/* We have to do this, since we do not re-hash for every bit -A1kmm. */
masktype = parse_netmask(address, (struct sockaddr *)&arec->Mask.ipa.addr, &bits);
arec->Mask.ipa.bits = bits;
arec->masktype = masktype;
-#ifdef IPV6
+#ifdef RB_IPV6
if(masktype == HM_IPV6)
{
/* We have to do this, since we do not re-hash for every bit -A1kmm. */
struct AddressRec *arec, *arecl = NULL;
struct rb_sockaddr_storage addr;
masktype = parse_netmask(address, (struct sockaddr *)&addr, &bits);
-#ifdef IPV6
+#ifdef RB_IPV6
if(masktype == HM_IPV6)
{
/* We have to do this, since we do not re-hash for every bit -A1kmm. */
*prefix_ptr++ = '=';
if(IsOper(sptr) && IsConfExemptFlood(aconf))
*prefix_ptr++ = '|';
- if(IsOper(sptr) && IsConfExemptGline(aconf) && !IsConfExemptKline(aconf))
- *prefix_ptr++ = '_';
if(IsOper(sptr) && IsConfExemptDNSBL(aconf) && !IsConfExemptKline(aconf))
*prefix_ptr++ = '$';
if(IsOper(sptr) && IsConfExemptKline(aconf))