]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - modules/core/m_message.c
Argh, wrong replace caused by MS VS 2005 interface.
[irc/rqf/shadowircd.git] / modules / core / m_message.c
index 8f6e7eb898b1545cef5aa2a68908b7b8be0bfc2d..651f395c1cb5d1bf10838094e5d1034aee07b88e 100644 (file)
@@ -41,8 +41,6 @@
 #include "msg.h"
 #include "packet.h"
 #include "send.h"
-#include "event.h"
-#include "patricia.h"
 #include "s_newconf.h"
 #include "s_stats.h"
 
@@ -51,11 +49,12 @@ static int m_privmsg(struct Client *, struct Client *, int, const char **);
 static int m_notice(struct Client *, struct Client *, int, const char **);
 
 static void expire_tgchange(void *unused);
+static struct ev_entry *expire_tgchange_event;
 
 static int
 modinit(void)
 {
-       eventAddIsh("expire_tgchange", expire_tgchange, NULL, 300);
+       expire_tgchange_event = rb_event_addish("expire_tgchange", expire_tgchange, NULL, 300);
        expire_tgchange(NULL);
        return 0;
 }
@@ -63,7 +62,7 @@ modinit(void)
 static void
 moddeinit(void)
 {
-       eventDelete(expire_tgchange, NULL);
+       rb_event_delete(expire_tgchange_event);
 }
 
 struct Message privmsg_msgtab = {
@@ -546,18 +545,18 @@ static void
 expire_tgchange(void *unused)
 {
        tgchange *target;
-       dlink_node *ptr, *next_ptr;
+       rb_dlink_node *ptr, *next_ptr;
 
-       DLINK_FOREACH_SAFE(ptr, next_ptr, tgchange_list.head)
+       RB_DLINK_FOREACH_SAFE(ptr, next_ptr, tgchange_list.head)
        {
                target = ptr->data;
 
                if(target->expiry < CurrentTime)
                {
-                       dlinkDelete(ptr, &tgchange_list);
-                       patricia_remove(tgchange_tree, target->pnode);
-                       MyFree(target->ip);
-                       MyFree(target);
+                       rb_dlinkDelete(ptr, &tgchange_list);
+                       rb_patricia_remove(tgchange_tree, target->pnode);
+                       rb_free(target->ip);
+                       rb_free(target);
                }
        }
 }
@@ -580,7 +579,7 @@ add_target(struct Client *source_p, struct Client *target_p)
        if(source_p->localClient->target_last > CurrentTime && IsOper(target_p))
                return 1;
 
-       hashv = fnv_hash_upper(use_id(target_p), 32);
+       hashv = fnv_hash_upper((const unsigned char *)use_id(target_p), 32);
 
        if(USED_TARGETS(source_p))
        {
@@ -1024,11 +1023,11 @@ find_userhost(const char *user, const char *host, int *count)
        struct Client *c2ptr;
        struct Client *res = NULL;
        char *u = LOCAL_COPY(user);
-       dlink_node *ptr;
+       rb_dlink_node *ptr;
        *count = 0;
        if(collapse(u) != NULL)
        {
-               DLINK_FOREACH(ptr, global_client_list.head)
+               RB_DLINK_FOREACH(ptr, global_client_list.head)
                {
                        c2ptr = ptr->data;
                        if(!MyClient(c2ptr))    /* implies mine and an user */