diff options
-rw-r--r-- | include/conf.h | 1 | ||||
-rw-r--r-- | modules/m_stats.c | 41 |
2 files changed, 19 insertions, 23 deletions
diff --git a/include/conf.h b/include/conf.h index fe1cf88..81cfb30 100644 --- a/include/conf.h +++ b/include/conf.h @@ -123,7 +123,6 @@ enum maskitem_type CONF_NRESV = 1 << 11, 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 */ }; struct conf_parser_context diff --git a/modules/m_stats.c b/modules/m_stats.c index 92afc02..a903e92 100644 --- a/modules/m_stats.c +++ b/modules/m_stats.c @@ -201,27 +201,6 @@ report_confitem_types(struct Client *source_p, enum maskitem_type type) } break; - case CONF_HUB: - DLINK_FOREACH(ptr, server_items.head) - { - conf = ptr->data; - - DLINK_FOREACH(dptr, conf->hub_list.head) - sendto_one(source_p, form_str(RPL_STATSHLINE), me.name, - source_p->name, 'H', dptr->data, conf->name, 0, "*"); - } - - DLINK_FOREACH(ptr, server_items.head) - { - conf = ptr->data; - - DLINK_FOREACH(dptr, conf->leaf_list.head) - sendto_one(source_p, form_str(RPL_STATSLLINE), me.name, - source_p->name, 'L', dptr->data, conf->name, 0, "*"); - } - - break; - default: break; } @@ -833,7 +812,25 @@ stats_glines(struct Client *source_p, int parc, char *parv[]) static void stats_hubleaf(struct Client *source_p, int parc, char *parv[]) { - report_confitem_types(source_p, CONF_HUB); + const dlink_node *ptr = NULL, *dptr = NULL; + + DLINK_FOREACH(ptr, server_items.head) + { + const struct MaskItem *conf = ptr->data; + + DLINK_FOREACH(dptr, conf->hub_list.head) + sendto_one(source_p, form_str(RPL_STATSHLINE), me.name, + source_p->name, 'H', dptr->data, conf->name, 0, "*"); + } + + DLINK_FOREACH(ptr, server_items.head) + { + const struct MaskItem *conf = ptr->data; + + DLINK_FOREACH(dptr, conf->leaf_list.head) + sendto_one(source_p, form_str(RPL_STATSLLINE), me.name, + source_p->name, 'L', dptr->data, conf->name, 0, "*"); + } } /* |