]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - modules/m_list.c
Argh, wrong replace caused by MS VS 2005 interface.
[irc/rqf/shadowircd.git] / modules / m_list.c
index cbc5e9a24bb8ca168b17b3322a99119ef6d3077e..1b93f43da6c6b67a99894caa42b44a788962ba61 100644 (file)
@@ -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;