X-Git-Url: https://jfr.im/git/irc/rqf/shadowircd.git/blobdiff_plain/cc200171d7c40be3b204460f9c14d5d37e771866..d9f98c7a596106a4de02a8c3dcc1918e78670516:/modules/m_dline.c diff --git a/modules/m_dline.c b/modules/m_dline.c index 9bc7def..42c134e 100644 --- a/modules/m_dline.c +++ b/modules/m_dline.c @@ -36,7 +36,7 @@ #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" @@ -76,7 +76,7 @@ mo_dline(struct Client *client_p, struct Client *source_p, const char *dlhost; char *oper_reason; char *reason = def; - struct irc_sockaddr_storage daddr; + struct rb_sockaddr_storage daddr; char cidr_form_host[HOSTLEN + 1]; struct ConfItem *aconf; int bits; @@ -154,7 +154,7 @@ mo_dline(struct Client *client_p, struct Client *source_p, const char *creason; int t = AF_INET, ty, b; ty = parse_netmask(dlhost, (struct sockaddr *)&daddr, &b); -#ifdef IPV6 +#ifdef RB_IPV6 if(ty == HM_IPV6) t = AF_INET6; else @@ -181,12 +181,12 @@ mo_dline(struct Client *client_p, struct Client *source_p, } } - set_time(); + rb_set_time(); current_date = smalldate(); aconf = make_conf(); aconf->status = CONF_DLINE; - DupString(aconf->host, dlhost); + aconf->host = rb_strdup(dlhost); /* Look for an oper reason */ if((oper_reason = strchr(reason, '|')) != NULL) @@ -195,7 +195,7 @@ mo_dline(struct Client *client_p, struct Client *source_p, oper_reason++; if(!EmptyString(oper_reason)) - DupString(aconf->spasswd, oper_reason); + aconf->spasswd = rb_strdup(oper_reason); } if(tdline_time > 0) @@ -203,8 +203,8 @@ mo_dline(struct Client *client_p, struct Client *source_p, rb_snprintf(dlbuffer, sizeof(dlbuffer), "Temporary D-line %d min. - %s (%s)", (int) (tdline_time / 60), reason, current_date); - DupString(aconf->passwd, dlbuffer); - aconf->hold = CurrentTime + tdline_time; + aconf->passwd = rb_strdup(dlbuffer); + aconf->hold = rb_current_time() + tdline_time; add_temp_dline(aconf); if(EmptyString(oper_reason)) @@ -234,7 +234,7 @@ mo_dline(struct Client *client_p, struct Client *source_p, else { rb_snprintf(dlbuffer, sizeof(dlbuffer), "%s (%s)", reason, current_date); - DupString(aconf->passwd, dlbuffer); + aconf->passwd = rb_strdup(dlbuffer); add_conf_by_address(aconf->host, CONF_DLINE, NULL, aconf); write_confitem(DLINE_TYPE, source_p, NULL, aconf->host, reason, oper_reason, current_date, 0);