#include "class.h"
#include "client.h"
#include "common.h"
-#include "irc_string.h"
-#include "sprintf_irc.h"
+#include "match.h"
#include "ircd.h"
#include "hostmask.h"
#include "numeric.h"
#include "s_conf.h"
#include "s_newconf.h"
-#include "s_log.h"
+#include "logger.h"
#include "send.h"
#include "hash.h"
#include "s_serv.h"
#include "msg.h"
#include "parse.h"
#include "modules.h"
-#include "reject.h"
static int mo_dline(struct Client *, struct Client *, int, const char **);
static int mo_undline(struct Client *, struct Client *, int, const char **);
}
dlhost = parv[loc];
- strlcpy(cidr_form_host, dlhost, sizeof(cidr_form_host));
+ rb_strlcpy(cidr_form_host, dlhost, sizeof(cidr_form_host));
if(!parse_netmask(dlhost, NULL, &bits))
{
}
}
- if(ConfigFileEntry.non_redundant_klines)\r
- {\r
- struct rb_sockaddr_storage daddr;\r
- const char *creason;\r
- int t = AF_INET, ty, b;\r
- ty = parse_netmask(dlhost, (struct sockaddr *)&daddr, &b);\r
-#ifdef IPV6\r
- if(ty == HM_IPV6)\r
- t = AF_INET6;\r
- else\r
-#endif\r
- t = AF_INET;\r
- \r
- if((aconf = find_dline((struct sockaddr *)&daddr)) != NULL)\r
- {\r
- int bx;\r
- parse_netmask(aconf->host, NULL, &bx);\r
- if(b >= bx)\r
- {\r
- creason = aconf->passwd ? aconf->passwd : "<No Reason>";\r
- if(IsConfExemptKline(aconf))\r
- sendto_one_notice(source_p, \r
- ":[%s] is (E)d-lined by [%s] - %s",\r
- dlhost, aconf->host, creason);\r
- else\r
- sendto_one_notice(source_p, \r
- ":[%s] already D-lined by [%s] - %s",\r
- dlhost, aconf->host, creason);\r
- return 0;\r
- }\r
- }\r
+ if(ConfigFileEntry.non_redundant_klines)
+ {
+ const char *creason;
+ int t = AF_INET, ty, b;
+ ty = parse_netmask(dlhost, (struct sockaddr *)&daddr, &b);
+#ifdef RB_IPV6
+ if(ty == HM_IPV6)
+ t = AF_INET6;
+ else
+#endif
+ t = AF_INET;
+
+ if((aconf = find_dline((struct sockaddr *)&daddr, t)) != NULL)
+ {
+ int bx;
+ parse_netmask(aconf->host, NULL, &bx);
+ if(b >= bx)
+ {
+ creason = aconf->passwd ? aconf->passwd : "<No Reason>";
+ if(IsConfExemptKline(aconf))
+ sendto_one(source_p,
+ ":%s NOTICE %s :[%s] is (E)d-lined by [%s] - %s",
+ me.name, parv[0], dlhost, aconf->host, creason);
+ else
+ sendto_one(source_p,
+ ":%s NOTICE %s :[%s] already D-lined by [%s] - %s",
+ me.name, parv[0], dlhost, aconf->host, creason);
+ return 0;
+ }
+ }
}
- set_time();
+ rb_set_time();
current_date = smalldate();
aconf = make_conf();
return 0;
}
- strlcpy(buf, aconf->host, sizeof buf);
+ rb_strlcpy(buf, aconf->host, sizeof buf);
if(remove_temp_dline(aconf))
{
sendto_one(source_p,
while (fgets(buf, sizeof(buf), in))
{
- strlcpy(buff, buf, sizeof(buff));
+ rb_strlcpy(buff, buf, sizeof(buff));
if((p = strchr(buff, '\n')) != NULL)
*p = '\0';