X-Git-Url: https://jfr.im/git/irc/rqf/shadowircd.git/blobdiff_plain/bfccb2c0e1d2a84dd7a3e9ed98dc742752e3f1e2..90a3c35b295b07ebe3793bf5d3b882c3c1a5dc7c:/modules/m_list.c diff --git a/modules/m_list.c b/modules/m_list.c index cbc5e9a..1b93f43 100644 --- a/modules/m_list.c +++ b/modules/m_list.c @@ -34,7 +34,6 @@ */ #include "stdinc.h" -#include "tools.h" #include "channel.h" #include "client.h" #include "hash.h" @@ -47,7 +46,6 @@ #include "msg.h" #include "parse.h" #include "modules.h" -#include "event.h" static rb_dlink_list safelisting_clients = { NULL, NULL, 0 }; @@ -79,16 +77,18 @@ mapi_hfn_list_av1 list_hfnlist[] = { DECLARE_MODULE_AV1(list, _modinit, _moddeinit, list_clist, NULL, list_hfnlist, "$Revision: 3372 $"); +static struct ev_entry *iterate_clients_ev = NULL; + static int _modinit(void) { - rb_event_add("safelist_iterate_clients", safelist_iterate_clients, NULL, 3); + iterate_clients_ev = rb_event_add("safelist_iterate_clients", safelist_iterate_clients, NULL, 3); return 0; } static void _moddeinit(void) { - rb_event_delete(safelist_iterate_clients, NULL); + rb_event_delete(iterate_clients_ev); } static void safelist_check_cliexit(hook_data_client_exit * hdata) @@ -224,7 +224,7 @@ static int mo_list(struct Client *client_p, struct Client *source_p, int parc, c */ static int safelist_sendq_exceeded(struct Client *client_p) { - if (linebuf_len(&client_p->localClient->buf_sendq) > (get_sendq(client_p) / 2)) + if (rb_linebuf_len(&client_p->localClient->buf_sendq) > (get_sendq(client_p) / 2)) return YES; else return NO; @@ -260,7 +260,7 @@ static void safelist_client_instantiate(struct Client *client_p, struct ListClie sendto_one(client_p, form_str(RPL_LISTSTART), me.name, client_p->name); /* pop the client onto the queue for processing */ - dlinkAddAlloc(client_p, &safelisting_clients); + rb_dlinkAddAlloc(client_p, &safelisting_clients); /* give the user some initial data to work with */ safelist_iterate_client(client_p); @@ -283,7 +283,7 @@ static void safelist_client_release(struct Client *client_p) rb_dlinkFindDestroy(client_p, &safelisting_clients); - MyFree(client_p->localClient->safelist_data); + rb_free(client_p->localClient->safelist_data); client_p->localClient->safelist_data = NULL;