]> jfr.im git - solanum.git/blobdiff - modules/m_stats.c
whois: Fix UID leak.
[solanum.git] / modules / m_stats.c
index 83046d4760e29a7d3c9c4de8a75b982c4fda1d09..667b8fbcf1d8ac904830ef7b47645e5a0e1cad5a 100644 (file)
@@ -1478,6 +1478,15 @@ 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;
+
+       return 1;
+}
+
 static void
 stats_ltrace(struct Client *source_p, int parc, const char *parv[])
 {
@@ -1547,7 +1556,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 +1574,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))