]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - modules/m_trace.c
It'd take the world's longest tape measure to gauge the length of my fail.
[irc/rqf/shadowircd.git] / modules / m_trace.c
index e173d21168903180419837b109c4482e50325f81..603922e6fe781111ccbbfae83cd898a30af5fa47 100644 (file)
@@ -63,9 +63,10 @@ DECLARE_MODULE_AV1(trace, NULL, NULL, trace_clist, trace_hlist, NULL, "$Revision
 static void count_downlinks(struct Client *server_p, int *pservcount, int *pusercount);
 static int report_this_status(struct Client *source_p, struct Client *target_p);
 
+static const char *empty_sockhost = "255.255.255.255";
+
 /*
  * m_trace
- *      parv[0] = sender prefix
  *      parv[1] = servername
  */
 static int
@@ -378,26 +379,19 @@ report_this_status(struct Client *source_p, struct Client *target_p)
                break;
 
        case STAT_CLIENT:
-                /* Only opers see users if there is a wildcard
-                 * but anyone can see all the opers.
-                 */
-                if((IsOper(source_p) &&
-                    (MyClient(source_p) || !(dow && IsInvisible(target_p))))
-                   || !dow || IsOper(target_p) || (source_p == target_p))
-                {
-                        int tnumeric = RPL_TRACEUSER;
-                        if(IsOper(target_p))
-                                tnumeric = RPL_TRACEOPERATOR;
-                        
-                        sendto_one_numeric(source_p, tnumeric, form_str(tnumeric),
-                                        class_name, name,
-                                        show_ip(source_p, target_p) ? ip : empty_sockhost,
-                                        rb_current_time() - target_p->localClient->lasttime,
-                                        rb_current_time() - target_p->localClient->last);
-                        cnt++;
-                }
-                break;
+               {
+                       int tnumeric;
+
+                       tnumeric = IsOper(target_p) ? RPL_TRACEOPERATOR : RPL_TRACEUSER;
+                       sendto_one_numeric(source_p, tnumeric, form_str(tnumeric),
+                                       class_name, name,
+                                       show_ip(source_p, target_p) ? ip : empty_sockhost,
+                                       rb_current_time() - target_p->localClient->lasttime,
+                                       rb_current_time() - target_p->localClient->last);
 
+                       cnt++;
+               }
+               break;
 
        case STAT_SERVER:
                {