summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>2013-05-26 11:44:16 +0000
committermichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>2013-05-26 11:44:16 +0000
commita266128c3b1c155a3ef0f8679dcb01669bcd9946 (patch)
tree82236b36461eb66d0ab2418d3fc4a9a552cf76d2
parent2db645597aea28ea064819f25f460c4c7b0cb5e6 (diff)
- Got rid of CONF_CLASS enum type
git-svn-id: svn://svn.ircd-hybrid.org/svnroot/ircd-hybrid/branches/8.1.x@2117 82007160-df01-0410-b94d-b575c5fd34c7
-rw-r--r--include/conf.h1
-rw-r--r--modules/m_stats.c36
2 files changed, 17 insertions, 20 deletions
diff --git a/include/conf.h b/include/conf.h
index 81bb497..fe1cf88 100644
--- a/include/conf.h
+++ b/include/conf.h
@@ -124,7 +124,6 @@ enum maskitem_type
CONF_SERVICE = 1 << 12,
CONF_OPER = 1 << 13,
CONF_HUB = 1 << 14, /* XXX There are no separate hub/leaf configs anymore. This is just for /stats h */
- CONF_CLASS = 1 << 15 /* XXX Same here; just for /stats Y|y */
};
struct conf_parser_context
diff --git a/modules/m_stats.c b/modules/m_stats.c
index 6126d76..92afc02 100644
--- a/modules/m_stats.c
+++ b/modules/m_stats.c
@@ -80,7 +80,6 @@ report_confitem_types(struct Client *source_p, enum maskitem_type type)
{
dlink_node *ptr = NULL, *dptr = NULL;
struct MaskItem *conf = NULL;
- const struct ClassItem *class = NULL;
const struct shared_flags *shared = NULL;
char buf[12];
char *p = NULL;
@@ -160,23 +159,6 @@ report_confitem_types(struct Client *source_p, enum maskitem_type type)
}
break;
- case CONF_CLASS:
- DLINK_FOREACH(ptr, class_get_list()->head)
- {
- class = ptr->data;
- sendto_one(source_p, form_str(RPL_STATSYLINE),
- me.name, source_p->name, 'Y',
- class->name, class->ping_freq,
- class->con_freq,
- class->max_total, class->max_sendq,
- class->max_recvq,
- class->ref_count,
- class->number_per_cidr, class->cidr_bitlen_ipv4,
- class->number_per_cidr, class->cidr_bitlen_ipv6,
- class->active ? "active" : "disabled");
- }
- break;
-
case CONF_SERVICE:
DLINK_FOREACH(ptr, service_items.head)
{
@@ -1305,7 +1287,23 @@ stats_gecos(struct Client *source_p, int parc, char *parv[])
static void
stats_class(struct Client *source_p, int parc, char *parv[])
{
- report_confitem_types(source_p, CONF_CLASS);
+ const dlink_node *ptr = NULL;
+
+ DLINK_FOREACH(ptr, class_get_list()->head)
+ {
+ const struct ClassItem *class = ptr->data;
+
+ sendto_one(source_p, form_str(RPL_STATSYLINE),
+ me.name, source_p->name, 'Y',
+ class->name, class->ping_freq,
+ class->con_freq,
+ class->max_total, class->max_sendq,
+ class->max_recvq,
+ class->ref_count,
+ class->number_per_cidr, class->cidr_bitlen_ipv4,
+ class->number_per_cidr, class->cidr_bitlen_ipv6,
+ class->active ? "active" : "disabled");
+ }
}
static void