From b8127271b78e9a53892cd34b977c3dee1741eec8 Mon Sep 17 00:00:00 2001 From: Valery Yatsko Date: Wed, 2 Apr 2008 03:39:08 +0400 Subject: [PATCH] extern void send_pop_queue(struct Client *); in header, will implement this some time later --- include/send.h | 2 ++ modules/m_stats.c | 20 +++++++++++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/include/send.h b/include/send.h index 3741acf..1e5b023 100644 --- a/include/send.h +++ b/include/send.h @@ -38,6 +38,8 @@ struct monitor; /* The nasty global also used in s_serv.c for server bursts */ extern unsigned long current_serial; +extern void send_pop_queue(struct Client *); + extern void send_queued(struct Client *to); extern void send_queued_slink_write(int fd, void *data); diff --git a/modules/m_stats.c b/modules/m_stats.c index a4bd4b1..dd82e41 100644 --- a/modules/m_stats.c +++ b/modules/m_stats.c @@ -118,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_ @@ -135,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', rb_dump, 1, 1, }, - {'F', rb_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, }, @@ -1366,6 +1366,20 @@ stats_l_client(struct Client *source_p, struct Client *target_p, } } +static void +rb_dump_fd_callback(int fd, const char *desc, void *data) +{ + struct Client *source_p = data; + sendto_one_numeric(source_p, RPL_STATSDEBUG, "F :fd %-3d desc '%s'", fd, desc); +} + +static void +stats_comm(struct Client *source_p) +{ + rb_dump_fd(rb_dump_fd_callback, source_p); + send_pop_queue(source_p); +} + /* * stats_spy *