]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - modules/m_stats.c
extern void send_pop_queue(struct Client *); in header, will implement this some...
[irc/rqf/shadowircd.git] / modules / m_stats.c
index f5a41f01dac07a2d4bbfc03d1f3ea6d25b191148..dd82e417e83715125c3e131976c56f143389c937 100644 (file)
@@ -25,7 +25,6 @@
  */
 
 #include "stdinc.h"
-#include "tools.h"             /* rb_dlink_node/rb_dlink_list */
 #include "class.h"             /* report_classes */
 #include "client.h"            /* Client */
 #include "common.h"            /* TRUE/FALSE */
 #include "numeric.h"           /* ERR_xxx */
 #include "scache.h"            /* list_scache */
 #include "send.h"              /* sendto_one */
-#include "commio.h"            /* highest_fd */
 #include "s_conf.h"            /* ConfItem */
 #include "s_serv.h"            /* hunt_server */
 #include "s_stats.h"           /* tstats */
 #include "s_user.h"            /* show_opers */
-#include "event.h"             /* events */
 #include "blacklist.h"         /* dnsbl stuff */
-#include "linebuf.h"
 #include "parse.h"
 #include "modules.h"
 #include "hook.h"
@@ -122,7 +118,7 @@ static void stats_memory(struct Client *);
 static void stats_servlinks(struct Client *);
 static void stats_ltrace(struct Client *, int, const char **);
 static void stats_ziplinks(struct Client *);
-
+static void stats_comm(struct Client *);
 /* This table contains the possible stats items, in order:
  * stats letter,  function to call, operonly? adminonly?
  * case only matters in the stats letter column.. -- fl_
@@ -139,8 +135,8 @@ static struct StatsStruct stats_cmd_table[] = {
        {'D', stats_deny,               1, 0, },
        {'e', stats_exempt,             1, 0, },
        {'E', stats_events,             1, 1, },
-       {'f', comm_dump,                1, 1, },
-       {'F', comm_dump,                1, 1, },
+       {'f', stats_comm,               1, 1, },
+       {'F', stats_comm,               1, 1, },
        {'g', stats_pending_glines,     1, 0, },
        {'G', stats_glines,             1, 0, },
        {'h', stats_hubleaf,            0, 0, },
@@ -1370,6 +1366,20 @@ stats_l_client(struct Client *source_p, struct Client *target_p,
        }
 }
 
+static void\r
+rb_dump_fd_callback(int fd, const char *desc, void *data)\r
+{\r
+       struct Client *source_p = data;\r
+       sendto_one_numeric(source_p, RPL_STATSDEBUG, "F :fd %-3d desc '%s'", fd, desc);\r
+}\r
+\r
+static void\r
+stats_comm(struct Client *source_p)\r
+{\r
+       rb_dump_fd(rb_dump_fd_callback, source_p);\r
+       send_pop_queue(source_p);\r
+}
+
 /*
  * stats_spy
  *