]> jfr.im git - solanum.git/blobdiff - modules/m_trace.c
m_info: Correct description of general::client_exit like in example confs.
[solanum.git] / modules / m_trace.c
index 2f6e6c5b40f87d828073c7a5ebb338b7bc77cac8..c3a3891c987e1863251ab6b260a4e03910ae3404 100644 (file)
@@ -67,7 +67,6 @@ static const char *empty_sockhost = "255.255.255.255";
 
 /*
  * m_trace
- *      parv[0] = sender prefix
  *      parv[1] = servername
  */
 static int
@@ -112,7 +111,7 @@ m_trace(struct Client *client_p, struct Client *source_p, int parc, const char *
 
                        if(ac2ptr == NULL)
                        {
-                               RB_DLINK_FOREACH(ptr, global_client_list.head)
+                               RB_DLINK_FOREACH(ptr, global_serv_list.head)
                                {
                                        ac2ptr = ptr->data;
 
@@ -380,18 +379,17 @@ report_this_status(struct Client *source_p, struct Client *target_p)
                break;
 
        case STAT_CLIENT:
-               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);
+               {
+                       sendto_one_numeric(source_p,
+                                       IsOper(target_p) ? RPL_TRACEOPERATOR : RPL_TRACEUSER,
+                                       IsOper(target_p) ? form_str(RPL_TRACEOPERATOR) : form_str(RPL_TRACEUSER),
+                                       class_name, name,
+                                       show_ip(source_p, target_p) ? ip : empty_sockhost,
+                                       (unsigned long)(rb_current_time() - target_p->localClient->lasttime),
+                                       (unsigned long)(rb_current_time() - target_p->localClient->last));
 
-               cnt++;
+                       cnt++;
+               }
                break;
 
        case STAT_SERVER:
@@ -404,7 +402,8 @@ report_this_status(struct Client *source_p, struct Client *target_p)
                        sendto_one_numeric(source_p, RPL_TRACESERVER, form_str(RPL_TRACESERVER),
                                   class_name, servcount, usercount, name,
                                   *(target_p->serv->by) ? target_p->serv->by : "*", "*",
-                                  me.name, rb_current_time() - target_p->localClient->lasttime);
+                                  me.name,
+                                  (unsigned long)(rb_current_time() - target_p->localClient->lasttime));
                        cnt++;
 
                }
@@ -412,8 +411,7 @@ report_this_status(struct Client *source_p, struct Client *target_p)
 
        default:                /* ...we actually shouldn't come here... --msa */
                sendto_one_numeric(source_p, RPL_TRACENEWTYPE, 
-                                  form_str(RPL_TRACENEWTYPE), 
-                                  me.name, source_p->name, name);
+                                  form_str(RPL_TRACENEWTYPE), name);
                cnt++;
                break;
        }