From 26facdb79628f7ebd7ec449cd5de9923ad2de4ba Mon Sep 17 00:00:00 2001 From: michael Date: Sun, 11 May 2014 17:55:40 +0000 Subject: - Fixed bug where "STATS p" would show an invalid amount of irc-operators in case there are +H opers git-svn-id: svn://svn.ircd-hybrid.org/svnroot/ircd-hybrid/branches/8.1.x@3510 82007160-df01-0410-b94d-b575c5fd34c7 --- NEWS | 2 ++ modules/m_stats.c | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index b8bba0c..4e8c3c3 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,7 @@ -- Noteworthy changes in version 8.1.18 (????-??-??) o) Fixed CAP issue for certain clients +o) Fixed bug where "STATS p" would show an invalid amount of irc-operators + in case there are +H opers -- Noteworthy changes in version 8.1.17 (2014-05-01) diff --git a/modules/m_stats.c b/modules/m_stats.c index 023251c..1be798e 100644 --- a/modules/m_stats.c +++ b/modules/m_stats.c @@ -1109,7 +1109,8 @@ stats_oper(struct Client *source_p, int parc, char *parv[]) static void stats_operedup(struct Client *source_p, int parc, char *parv[]) { - dlink_node *ptr; + dlink_node *ptr = NULL; + unsigned int opercount = 0; DLINK_FOREACH(ptr, oper_list.head) { @@ -1129,12 +1130,13 @@ stats_operedup(struct Client *source_p, int parc, char *parv[]) sendto_one(source_p, ":%s %d %s p :[%c] %s (%s@%s) Idle: %u", from, RPL_STATSDEBUG, to, HasUMode(target_p, UMODE_ADMIN) ? 'A' : 'O', - target_p->name, target_p->username, target_p->host, + target_p->name, target_p->username, target_p->host, idle_time_get(source_p, target_p)); + ++opercount; } sendto_one(source_p, ":%s %d %s p :%u OPER(s)", - from, RPL_STATSDEBUG, to, dlink_list_length(&oper_list)); + from, RPL_STATSDEBUG, to, opercount); } static void -- cgit