fixed WIN32 support
[NeonServV5.git] / src / cmd_global_netinfo.c
index c6803777d57ae555e8d0ae108c36374c389839da..3d01c989f0da3089f78e614233636fc63f9f7170 100644 (file)
@@ -1,5 +1,5 @@
 /* cmd_global_netinfo.c - NeonServ v5.3
- * Copyright (C) 2011  Philipp Kreil (pk910)
+ * Copyright (C) 2011-2012  Philipp Kreil (pk910)
  * 
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@ CMD_BIND(global_cmd_netinfo) {
     reply(getTextBot(), user, "NS_NETINFO_HEADER");
     char tmp[MAXLEN];
     struct Table *table;
-    table = table_init(2, 18, 0);
+    table = table_init(2, 19, 0);
     char *content[2];
     
     content[0] = get_language_string(user, "NS_NETINFO_UPTIME");
@@ -144,6 +144,13 @@ CMD_BIND(global_cmd_netinfo) {
     content[1] = tmp;
     table_add(table, content);
     
+    #ifdef HAVE_THREADS
+    content[0] = get_language_string(user, "NS_NETINFO_THREADS");
+    sprintf(tmp, "%d (current thread: %i)", running_threads, getCurrentThreadID());
+    content[1] = tmp;
+    table_add(table, content);
+    #endif
+    
     if(strcmp(revision, ""))
         sprintf(tmp, "%s.%d  (%s)", NEONSERV_VERSION, patchlevel, revision);
     else