]> jfr.im git - solanum.git/blobdiff - modules/m_stats.c
Reverting some changed related not to moving on libratbox3 but using ratbox3 source!
[solanum.git] / modules / m_stats.c
index d3b8690f19d4d8bff2f79d4298a7a9fc13cf7569..f264e35fdd1f47f10290651252f1001127c8f1e1 100644 (file)
@@ -47,7 +47,6 @@
 #include "hook.h"
 #include "s_newconf.h"
 #include "hash.h"
-#include "reject.h"
 
 static int m_stats (struct Client *, struct Client *, int, const char **);
 
@@ -925,73 +924,10 @@ stats_usage (struct Client *source_p)
                           (int) rus.ru_nivcsw);
 }
 
-static void\r
-stats_tstats(struct Client *source_p)\r
-{\r
-       struct Client *target_p;\r
-       struct ServerStatistics sp;\r
-       rb_dlink_node *ptr;\r
-\r
-       memcpy(&sp, &ServerStats, sizeof(struct ServerStatistics));\r
-\r
-       RB_DLINK_FOREACH(ptr, serv_list.head)\r
-       {\r
-               target_p = ptr->data;\r
-\r
-               sp.is_sbs += target_p->localClient->sendB;\r
-               sp.is_sbr += target_p->localClient->receiveB;\r
-               sp.is_sti += rb_current_time() - target_p->localClient->firsttime;\r
-               sp.is_sv++;\r
-       }\r
-\r
-       RB_DLINK_FOREACH(ptr, lclient_list.head)\r
-       {\r
-               target_p = ptr->data;\r
-\r
-               sp.is_cbs += target_p->localClient->sendB;\r
-               sp.is_cbr += target_p->localClient->receiveB;\r
-               sp.is_cti += rb_current_time() - target_p->localClient->firsttime;\r
-               sp.is_cl++;\r
-       }\r
-\r
-       sendto_one_numeric(source_p, RPL_STATSDEBUG,\r
-                               "T :accepts %u refused %u", \r
-                               sp.is_ac, sp.is_ref);\r
-       sendto_one_numeric(source_p, RPL_STATSDEBUG,\r
-                               "T :rejected %u delaying %lu", \r
-                               sp.is_rej, delay_exit_length());\r
-       sendto_one_numeric(source_p, RPL_STATSDEBUG,\r
-                               "T :nicks being delayed %lu", get_nd_count());\r
-       sendto_one_numeric(source_p, RPL_STATSDEBUG,\r
-                               "T :unknown commands %u prefixes %u",\r
-                               sp.is_unco, sp.is_unpf);\r
-       sendto_one_numeric(source_p, RPL_STATSDEBUG,\r
-                               "T :nick collisions %u saves %u unknown closes %u",\r
-                               sp.is_kill, sp.is_save, sp.is_ni);\r
-       sendto_one_numeric(source_p, RPL_STATSDEBUG,\r
-                               "T :wrong direction %u empty %u", \r
-                               sp.is_wrdi, sp.is_empt);\r
-       sendto_one_numeric(source_p, RPL_STATSDEBUG,\r
-                               "T :numerics seen %u", \r
-                               sp.is_num);\r
-       sendto_one_numeric(source_p, RPL_STATSDEBUG,\r
-                               "T :auth successes %u fails %u",\r
-                               sp.is_asuc, sp.is_abad);\r
-       sendto_one_numeric(source_p, RPL_STATSDEBUG, "T :Client Server");\r
-       sendto_one_numeric(source_p, RPL_STATSDEBUG,\r
-                               "T :connected %u %u",\r
-                               sp.is_cl, sp.is_sv);\r
-       sendto_one_numeric(source_p, RPL_STATSDEBUG,\r
-                               "T :bytes sent %lluK %lluK",\r
-                               sp.is_cbs / 1024, \r
-                               sp.is_sbs / 1024);\r
-       sendto_one_numeric(source_p, RPL_STATSDEBUG,\r
-                               "T :bytes recv %lluK %lluK",\r
-                               sp.is_cbr / 1024, \r
-                               sp.is_sbr / 1024);\r
-       sendto_one_numeric(source_p, RPL_STATSDEBUG,\r
-                               "T :time connected %lu %lu",\r
-                               (long) sp.is_cti, (long) sp.is_sti);\r
+static void
+stats_tstats (struct Client *source_p)
+{
+       tstats (source_p);
 }
 
 static void