]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - modules/m_kline.c
MyMalloc -> rb_malloc
[irc/rqf/shadowircd.git] / modules / m_kline.c
index 68fe587b8b065dce3698e73dd67a8503b2ddfa42..66a3b7f1bf84d4ff1a5d64eddb9ef07f44beb44a 100644 (file)
@@ -25,7 +25,6 @@
  */
 
 #include "stdinc.h"
-#include "tools.h"
 #include "channel.h"
 #include "class.h"
 #include "client.h"
@@ -35,7 +34,6 @@
 #include "ircd.h"
 #include "hostmask.h"
 #include "numeric.h"
-#include "commio.h"
 #include "s_conf.h"
 #include "s_newconf.h"
 #include "s_log.h"
@@ -45,7 +43,6 @@
 #include "msg.h"
 #include "parse.h"
 #include "modules.h"
-#include "event.h"
 #include "reject.h"
 
 static int mo_kline(struct Client *, struct Client *, int, const char **);
@@ -163,7 +160,7 @@ mo_kline(struct Client *client_p, struct Client *source_p,
                        return 0;
        }
        /* if we have cluster servers, send it to them.. */
-       else if(dlink_list_length(&cluster_conf_list) > 0)
+       else if(rb_dlink_list_length(&cluster_conf_list) > 0)
                cluster_generic(source_p, "KLINE", 
                                (tkline_time > 0) ? SHARED_TKLINE : SHARED_PKLINE, CAP_KLN,
                                "%lu %s %s :%s",
@@ -197,7 +194,7 @@ mo_kline(struct Client *client_p, struct Client *source_p,
 
        if(tkline_time > 0)
        {
-               ircsnprintf(buffer, sizeof(buffer),
+               rb_snprintf(buffer, sizeof(buffer),
                           "Temporary K-line %d min. - %s (%s)",
                           (int) (tkline_time / 60), reason, current_date);
                DupString(aconf->passwd, buffer);
@@ -205,7 +202,7 @@ mo_kline(struct Client *client_p, struct Client *source_p,
        }
        else
        {
-               ircsnprintf(buffer, sizeof(buffer), "%s (%s)", reason, current_date);
+               rb_snprintf(buffer, sizeof(buffer), "%s (%s)", reason, current_date);
                DupString(aconf->passwd, buffer);
                apply_kline(source_p, aconf, reason, oper_reason, current_date);
        }
@@ -214,7 +211,7 @@ mo_kline(struct Client *client_p, struct Client *source_p,
        {
                if(kline_queued == 0)
                {
-                       eventAddOnce("check_klines", check_klines_event, NULL,
+                       rb_event_addonce("check_klines", check_klines_event, NULL,
                                     ConfigFileEntry.kline_delay);
                        kline_queued = 1;
                }
@@ -313,7 +310,7 @@ handle_remote_kline(struct Client *source_p, int tkline_time,
 
        if(tkline_time > 0)
        {
-               ircsnprintf(buffer, sizeof(buffer),
+               rb_snprintf(buffer, sizeof(buffer),
                           "Temporary K-line %d min. - %s (%s)",
                           (int) (tkline_time / 60), reason, current_date);
                DupString(aconf->passwd, buffer);
@@ -321,7 +318,7 @@ handle_remote_kline(struct Client *source_p, int tkline_time,
        }
        else
        {
-               ircsnprintf(buffer, sizeof(buffer), "%s (%s)", reason, current_date);
+               rb_snprintf(buffer, sizeof(buffer), "%s (%s)", reason, current_date);
                DupString(aconf->passwd, buffer);
                apply_kline(source_p, aconf, reason, oper_reason, current_date);
        }
@@ -330,7 +327,7 @@ handle_remote_kline(struct Client *source_p, int tkline_time,
        {
                if(kline_queued == 0)
                {
-                       eventAddOnce("check_klines", check_klines_event, NULL,
+                       rb_event_addonce("check_klines", check_klines_event, NULL,
                                     ConfigFileEntry.kline_delay);
                        kline_queued = 1;
                }
@@ -409,7 +406,7 @@ mo_unkline(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) > 0)
+       else if(rb_dlink_list_length(&cluster_conf_list) > 0)
                cluster_generic(source_p, "UNKLINE", SHARED_UNKLINE, CAP_UNKLN,
                                "%s %s", user, host);
 
@@ -768,7 +765,7 @@ remove_permkline_match(struct Client *source_p, struct ConfItem *aconf)
        host = aconf->host;
        user = aconf->user;
 
-       ircsnprintf(temppath, sizeof(temppath),
+       rb_snprintf(temppath, sizeof(temppath),
                 "%s.tmp", ConfigFileEntry.klinefile);
 
        filename = get_conf_name(KLINE_TYPE);
@@ -912,12 +909,12 @@ flush_write(struct Client *source_p, FILE * out, const char *buf, const char *te
 static int
 remove_temp_kline(struct Client *source_p, struct ConfItem *aconf)
 {
-       dlink_node *ptr;
+       rb_dlink_node *ptr;
        int i;
 
        for (i = 0; i < LAST_TEMP_TYPE; i++)
        {
-               DLINK_FOREACH(ptr, temp_klines[i].head)
+               RB_DLINK_FOREACH(ptr, temp_klines[i].head)
                {
                        if (aconf == ptr->data)
                        {
@@ -931,7 +928,7 @@ remove_temp_kline(struct Client *source_p, struct ConfItem *aconf)
                                ilog(L_KLINE, "UK %s %s %s",
                                        get_oper_name(source_p),
                                        aconf->user, aconf->host);
-                               dlinkDestroy(ptr, &temp_klines[i]);
+                               rb_dlinkDestroy(ptr, &temp_klines[i]);
                                remove_reject_mask(aconf->user, aconf->host);
                                delete_one_address_conf(aconf->host, aconf);
                                return YES;