]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - modules/m_stats.c
start making this compile
[irc/rqf/shadowircd.git] / modules / m_stats.c
index d639f3e2f20f52559f039c6e8c3e95793a699a83..f5a41f01dac07a2d4bbfc03d1f3ea6d25b191148 100644 (file)
@@ -25,7 +25,7 @@
  */
 
 #include "stdinc.h"
-#include "tools.h"             /* dlink_node/dlink_list */
+#include "tools.h"             /* rb_dlink_node/rb_dlink_list */
 #include "class.h"             /* report_classes */
 #include "client.h"            /* Client */
 #include "common.h"            /* TRUE/FALSE */
@@ -73,7 +73,7 @@ DECLARE_MODULE_AV1(stats, NULL, NULL, stats_clist, stats_hlist, NULL, "$Revision
 
 const char *Lformat = "%s %u %u %u %u %u :%u %u %s";
 
-static void stats_l_list(struct Client *s, const char *, int, int, dlink_list *, char);
+static void stats_l_list(struct Client *s, const char *, int, int, rb_dlink_list *, char);
 static void stats_l_client(struct Client *source_p, struct Client *target_p,
                                char statchar);
 
@@ -285,7 +285,7 @@ stats_connect(struct Client *source_p)
        static char buf[5];
        struct server_conf *server_p;
        char *s;
-       dlink_node *ptr;
+       rb_dlink_node *ptr;
 
        if((ConfigFileEntry.stats_c_oper_only || 
            (ConfigServerHide.flatten_links && !IsExemptShide(source_p))) &&
@@ -296,7 +296,7 @@ stats_connect(struct Client *source_p)
                return;
        }
 
-       DLINK_FOREACH(ptr, server_conf_list.head)
+       RB_DLINK_FOREACH(ptr, server_conf_list.head)
        {
                server_p = ptr->data;
 
@@ -464,12 +464,12 @@ stats_pending_glines (struct Client *source_p)
 {
        if(ConfigFileEntry.glines)
        {
-               dlink_node *pending_node;
+               rb_dlink_node *pending_node;
                struct gline_pending *glp_ptr;
                char timebuffer[MAX_DATE_STRING];
                struct tm *tmptr;
 
-               DLINK_FOREACH (pending_node, pending_glines.head)
+               RB_DLINK_FOREACH (pending_node, pending_glines.head)
                {
                        glp_ptr = pending_node->data;
 
@@ -496,7 +496,7 @@ stats_pending_glines (struct Client *source_p)
                        }
                }
 
-               if(dlink_list_length (&pending_glines) > 0)
+               if(rb_dlink_list_length (&pending_glines) > 0)
                        sendto_one_notice(source_p, ":End of Pending G-lines");
        }
        else
@@ -515,10 +515,10 @@ stats_glines (struct Client *source_p)
 {
        if(ConfigFileEntry.glines)
        {
-               dlink_node *gline_node;
+               rb_dlink_node *gline_node;
                struct ConfItem *kill_ptr;
 
-               DLINK_FOREACH_PREV (gline_node, glines.tail)
+               RB_DLINK_FOREACH_PREV (gline_node, glines.tail)
                {
                        kill_ptr = gline_node->data;
 
@@ -540,7 +540,7 @@ static void
 stats_hubleaf(struct Client *source_p)
 {
        struct remote_conf *hub_p;
-       dlink_node *ptr;
+       rb_dlink_node *ptr;
 
        if((ConfigFileEntry.stats_h_oper_only || 
            (ConfigServerHide.flatten_links && !IsExemptShide(source_p))) &&
@@ -551,7 +551,7 @@ stats_hubleaf(struct Client *source_p)
                return;
        }
 
-       DLINK_FOREACH(ptr, hubleaf_conf_list.head)
+       RB_DLINK_FOREACH(ptr, hubleaf_conf_list.head)
        {
                hub_p = ptr->data;
 
@@ -650,13 +650,13 @@ stats_tklines(struct Client *source_p)
        else
        {
                struct ConfItem *aconf;
-               dlink_node *ptr;
+               rb_dlink_node *ptr;
                int i;
                char *user, *host, *pass, *oper_reason;
 
                for(i = 0; i < LAST_TEMP_TYPE; i++)
                {
-                       DLINK_FOREACH(ptr, temp_klines[i].head)
+                       RB_DLINK_FOREACH(ptr, temp_klines[i].head)
                        {
                                aconf = ptr->data;
 
@@ -722,10 +722,10 @@ stats_messages(struct Client *source_p)
 static void
 stats_dnsbl(struct Client *source_p)
 {
-       dlink_node *ptr;
+       rb_dlink_node *ptr;
        struct Blacklist *blptr;
 
-       DLINK_FOREACH(ptr, blacklist_list.head)
+       RB_DLINK_FOREACH(ptr, blacklist_list.head)
        {
                blptr = ptr->data;
 
@@ -742,7 +742,7 @@ static void
 stats_oper(struct Client *source_p)
 {
        struct oper_conf *oper_p;
-       dlink_node *ptr;
+       rb_dlink_node *ptr;
 
        if(!IsOper(source_p) && ConfigFileEntry.stats_o_oper_only)
        {
@@ -751,7 +751,7 @@ stats_oper(struct Client *source_p)
                return;
        }
 
-       DLINK_FOREACH(ptr, oper_conf_list.head)
+       RB_DLINK_FOREACH(ptr, oper_conf_list.head)
        {
                oper_p = ptr->data;
                
@@ -773,10 +773,10 @@ static void
 stats_operedup (struct Client *source_p)
 {
        struct Client *target_p;
-       dlink_node *oper_ptr;
+       rb_dlink_node *oper_ptr;
        unsigned int count = 0;
 
-       DLINK_FOREACH (oper_ptr, oper_list.head)
+       RB_DLINK_FOREACH (oper_ptr, oper_list.head)
        {
                target_p = oper_ptr->data;
 
@@ -814,10 +814,10 @@ static void
 stats_tresv(struct Client *source_p)
 {
        struct ConfItem *aconf;
-       dlink_node *ptr;
+       rb_dlink_node *ptr;
        int i;
 
-       DLINK_FOREACH(ptr, resv_conf_list.head)
+       RB_DLINK_FOREACH(ptr, resv_conf_list.head)
        {
                aconf = ptr->data;
                if(aconf->hold)
@@ -842,10 +842,10 @@ static void
 stats_resv(struct Client *source_p)
 {
        struct ConfItem *aconf;
-       dlink_node *ptr;
+       rb_dlink_node *ptr;
        int i;
 
-       DLINK_FOREACH(ptr, resv_conf_list.head)
+       RB_DLINK_FOREACH(ptr, resv_conf_list.head)
        {
                aconf = ptr->data;
                if(!aconf->hold)
@@ -969,12 +969,12 @@ static void
 stats_shared (struct Client *source_p)
 {
        struct remote_conf *shared_p;
-       dlink_node *ptr;
+       rb_dlink_node *ptr;
        char buf[15];
        char *p;
        int i;
 
-       DLINK_FOREACH(ptr, shared_conf_list.head)
+       RB_DLINK_FOREACH(ptr, shared_conf_list.head)
        {
                shared_p = ptr->data;
 
@@ -996,7 +996,7 @@ stats_shared (struct Client *source_p)
                                        shared_p->host, buf);
        }
 
-       DLINK_FOREACH(ptr, cluster_conf_list.head)
+       RB_DLINK_FOREACH(ptr, cluster_conf_list.head)
        {
                shared_p = ptr->data;
 
@@ -1028,7 +1028,7 @@ static void
 stats_servers (struct Client *source_p)
 {
        struct Client *target_p;
-       dlink_node *ptr;
+       rb_dlink_node *ptr;
        time_t seconds;
        int days, hours, minutes;
        int j = 0;
@@ -1041,7 +1041,7 @@ stats_servers (struct Client *source_p)
                return;
        }
 
-       DLINK_FOREACH (ptr, serv_list.head)
+       RB_DLINK_FOREACH (ptr, serv_list.head)
        {
                target_p = ptr->data;
 
@@ -1074,9 +1074,9 @@ static void
 stats_tgecos(struct Client *source_p)
 {
        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;
 
@@ -1092,9 +1092,9 @@ static void
 stats_gecos(struct Client *source_p)
 {
        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;
 
@@ -1125,11 +1125,11 @@ stats_memory (struct Client *source_p)
 static void
 stats_ziplinks (struct Client *source_p)
 {
-       dlink_node *ptr;
+       rb_dlink_node *ptr;
        struct Client *target_p;
        int sent_data = 0;
 
-       DLINK_FOREACH (ptr, serv_list.head)
+       RB_DLINK_FOREACH (ptr, serv_list.head)
        {
                target_p = ptr->data;
                if(IsCapable (target_p, CAP_ZIP))
@@ -1162,7 +1162,7 @@ stats_servlinks (struct Client *source_p)
        static char Sformat[] = ":%s %d %s %s %u %u %u %u %u :%u %u %s";
        long uptime, sendK, receiveK;
        struct Client *target_p;
-       dlink_node *ptr;
+       rb_dlink_node *ptr;
        int j = 0;
 
        if(ConfigServerHide.flatten_links && !IsOper (source_p) &&
@@ -1175,7 +1175,7 @@ stats_servlinks (struct Client *source_p)
 
        sendK = receiveK = 0;
 
-       DLINK_FOREACH (ptr, serv_list.head)
+       RB_DLINK_FOREACH (ptr, serv_list.head)
        {
                target_p = ptr->data;
 
@@ -1311,16 +1311,16 @@ stats_ltrace(struct Client *source_p, int parc, const char *parv[])
 
 static void
 stats_l_list(struct Client *source_p, const char *name, int doall, int wilds,
-            dlink_list * list, char statchar)
+            rb_dlink_list * list, char statchar)
 {
-       dlink_node *ptr;
+       rb_dlink_node *ptr;
        struct Client *target_p;
 
        /* send information about connections which match.  note, we
         * dont need tests for IsInvisible(), because non-opers will
         * never get here for normal clients --fl
         */
-       DLINK_FOREACH(ptr, list->head)
+       RB_DLINK_FOREACH(ptr, list->head)
        {
                target_p = ptr->data;