summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/m_stats.c8
1 files changed, 5 insertions, 3 deletions
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