summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>2014-05-11 17:55:40 +0000
committermichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>2014-05-11 17:55:40 +0000
commit26facdb79628f7ebd7ec449cd5de9923ad2de4ba (patch)
tree8fb345909de6cf2e9aae6cf7f695fb9b4bfcaa74
parent4e2e63fcbf45aa62155657254ec8b1ef8eca5b7b (diff)
- 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
-rw-r--r--NEWS2
-rw-r--r--modules/m_stats.c8
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