summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>2014-04-08 16:53:15 +0000
committermichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>2014-04-08 16:53:15 +0000
commit71c940dabf814ae6bd73b8259445dc8dabf042da (patch)
tree80be948f7a5e7a343b7a871ab21c5428b5dcec81
parent393924eaff285e9b6154126b58470f528bff4f14 (diff)
- Fixed corrupted "STATS U" output
git-svn-id: svn://svn.ircd-hybrid.org/svnroot/ircd-hybrid/branches/8.1.x@3284 82007160-df01-0410-b94d-b575c5fd34c7
-rw-r--r--NEWS1
-rw-r--r--modules/m_stats.c10
2 files changed, 7 insertions, 4 deletions
diff --git a/NEWS b/NEWS
index e4ff7f6..3baa8fd 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,7 @@ o) Fixed undefined behaviour with crypt() returning NULL
since glibc2.17 in certain cases
o) Admins may now see all channel members via "WHO #channel"
regardless of channel mode +s
+o) Fixed corrupted "STATS U" output
-- Noteworthy changes in version 8.1.15 (2014-03-29)
diff --git a/modules/m_stats.c b/modules/m_stats.c
index 9452c10..023251c 100644
--- a/modules/m_stats.c
+++ b/modules/m_stats.c
@@ -102,7 +102,6 @@ report_confitem_types(struct Client *source_p, enum maskitem_type type)
break;
case CONF_ULINE:
- shared = flag_table;
DLINK_FOREACH(ptr, uconf_items.head)
{
conf = ptr->data;
@@ -110,19 +109,20 @@ report_confitem_types(struct Client *source_p, enum maskitem_type type)
p = buf;
*p++ = 'c';
- for (; shared->type; ++shared)
+ for (shared = flag_table; shared->type; ++shared)
if (shared->type & conf->flags)
*p++ = shared->letter;
else
*p++ = ToLower(shared->letter);
+ *p = '\0';
+
sendto_one(source_p, form_str(RPL_STATSULINE),
me.name, source_p->name, conf->name,
conf->user?conf->user: "*",
conf->host?conf->host: "*", buf);
}
- shared = flag_table;
DLINK_FOREACH(ptr, cluster_items.head)
{
conf = ptr->data;
@@ -130,12 +130,14 @@ report_confitem_types(struct Client *source_p, enum maskitem_type type)
p = buf;
*p++ = 'C';
- for (; shared->type; ++shared)
+ for (shared = flag_table; shared->type; ++shared)
if (shared->type & conf->flags)
*p++ = shared->letter;
else
*p++ = ToLower(shared->letter);
+ *p = '\0';
+
sendto_one(source_p, form_str(RPL_STATSULINE),
me.name, source_p->name, conf->name,
"*", "*", buf);