0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-26 00:32:35 +01:00

m_stats: apply same logic to anonymous /stats l as /stats p

This commit is contained in:
William Pitcock 2012-09-18 20:01:53 -05:00
parent e82bda18a5
commit 4727c0f586

View file

@ -1478,6 +1478,18 @@ stats_servlinks (struct Client *source_p)
sendto_one_numeric(source_p, RPL_STATSDEBUG, "? :Server recv: %s", buf);
}
static int
stats_l_should_show_oper(struct Client *target_p)
{
if (IsOperInvis(target_p))
return 0;
if(target_p->user->away)
return 0;
return 1;
}
static void
stats_ltrace(struct Client *source_p, int parc, const char *parv[])
{
@ -1547,7 +1559,7 @@ stats_ltrace(struct Client *source_p, int parc, const char *parv[])
if(MyClient(source_p))
stats_l_client(source_p, source_p, statchar);
stats_l_list(source_p, name, doall, wilds, &local_oper_list, statchar, NULL);
stats_l_list(source_p, name, doall, wilds, &local_oper_list, statchar, stats_l_should_show_oper);
}
if (!ConfigServerHide.flatten_links || IsOper(source_p) ||
@ -1565,7 +1577,6 @@ stats_ltrace(struct Client *source_p, int parc, const char *parv[])
return;
}
static void
stats_l_list(struct Client *source_p, const char *name, int doall, int wilds,
rb_dlink_list * list, char statchar, int (*check_fn)(struct Client *target_p))