X-Git-Url: https://jfr.im/git/irc/rqf/shadowircd.git/blobdiff_plain/c98390004f4f14cd8215302d77313f81e2546e22..f0a889b602a9de1ae15a6acb50dcb94008df3494:/modules/m_xline.c diff --git a/modules/m_xline.c b/modules/m_xline.c index 37f4353..0f11a86 100644 --- a/modules/m_xline.c +++ b/modules/m_xline.c @@ -31,7 +31,6 @@ */ #include "stdinc.h" -#include "tools.h" #include "send.h" #include "channel.h" #include "client.h" @@ -40,7 +39,6 @@ #include "class.h" #include "ircd.h" #include "numeric.h" -#include "memory.h" #include "s_log.h" #include "s_serv.h" #include "whowas.h" @@ -52,6 +50,7 @@ #include "modules.h" #include "s_conf.h" #include "s_newconf.h" +#include "reject.h" static int mo_xline(struct Client *client_p, struct Client *source_p, int parc, const char *parv[]); static int ms_xline(struct Client *client_p, struct Client *source_p, int parc, const char *parv[]); @@ -153,7 +152,7 @@ mo_xline(struct Client *client_p, struct Client *source_p, int parc, const char if(!match(target_server, me.name)) return 0; } - else if(dlink_list_length(&cluster_conf_list) > 0) + else if(rb_dlink_list_length(&cluster_conf_list) > 0) cluster_xline(source_p, temp_time, name, reason); if((aconf = find_xline_mask(name)) != NULL) @@ -372,7 +371,7 @@ write_xline(struct Client *source_p, struct ConfItem *aconf) return; } - ircsprintf(buffer, "\"%s\",\"0\",\"%s\",\"%s\",%ld\n", + rb_sprintf(buffer, "\"%s\",\"0\",\"%s\",\"%s\",%ld\n", aconf->name, aconf->passwd, get_oper_name(source_p), CurrentTime); @@ -417,9 +416,9 @@ cluster_xline(struct Client *source_p, int temp_time, const char *name, const char *reason) { struct remote_conf *shared_p; - dlink_node *ptr; + rb_dlink_node *ptr; - DLINK_FOREACH(ptr, cluster_conf_list.head) + RB_DLINK_FOREACH(ptr, cluster_conf_list.head) { shared_p = ptr->data; @@ -474,7 +473,7 @@ mo_unxline(struct Client *client_p, struct Client *source_p, int parc, const cha if(match(parv[3], me.name) == 0) return 0; } - else if(dlink_list_length(&cluster_conf_list)) + else if(rb_dlink_list_length(&cluster_conf_list)) cluster_generic(source_p, "UNXLINE", SHARED_UNXLINE, CAP_CLUSTER, "%s", parv[1]); @@ -533,9 +532,9 @@ static void remove_xline(struct Client *source_p, const char *name) { struct ConfItem *aconf; - dlink_node *ptr; + rb_dlink_node *ptr; - DLINK_FOREACH(ptr, xline_conf_list.head) + RB_DLINK_FOREACH(ptr, xline_conf_list.head) { aconf = ptr->data; @@ -558,8 +557,9 @@ remove_xline(struct Client *source_p, const char *name) get_oper_name(source_p), name); } + remove_reject_mask(aconf->name, NULL); free_conf(aconf); - dlinkDestroy(ptr, &xline_conf_list); + rb_dlinkDestroy(ptr, &xline_conf_list); return; } } @@ -591,7 +591,7 @@ remove_xline_from_file(struct Client *source_p, const char *huntgecos) int found_xline = 0; filename = ConfigFileEntry.xlinefile; - ircsnprintf(temppath, sizeof(temppath), + rb_snprintf(temppath, sizeof(temppath), "%s.tmp", ConfigFileEntry.xlinefile); if((in = fopen(filename, "r")) == NULL)