*** VERSION 5.2.0 ***
[NeonServV5.git] / src / cmd_neonserv_netinfo.c
index 7f60d643a7f8e0fd29594d3189f81d9d1cdaf3dd..5f2d306885ecf5c94480950fcc3164729cf7c4f0 100644 (file)
@@ -1,4 +1,4 @@
-/* cmd_neonserv_netinfo.c - NeonServ v5.0
+/* cmd_neonserv_netinfo.c - NeonServ v5.2
  * Copyright (C) 2011  Philipp Kreil (pk910)
  * 
  * This program is free software: you can redistribute it and/or modify
@@ -61,27 +61,22 @@ CMD_BIND(neonserv_cmd_netinfo) {
     int chanuser_count = getChanUserCount();
     float chanuser_memory = chanuser_count * sizeof(struct ChanUser);
     float total_memory = channel_memory + channel_ban_memory + user_memory + chanuser_memory;
-    
     content[0] = get_language_string(user, "NS_NETINFO_CACHE");
     sprintf(tmp, "%.2f kB (%.2f MB)", total_memory / 1024, total_memory / 1024 / 1024);
     content[1] = tmp;
     table_add(table, content);
-    
     content[0] = get_language_string(user, "NS_NETINFO_CHANNEL");
     sprintf(tmp, "%d    %.2f kB (%d * %u B = %.2f kB)", channel_count, channel_memory / 1024, channel_count, (unsigned int) sizeof(struct ChanNode), channel_memory / 1024);
     content[1] = tmp;
     table_add(table, content);
-    
     content[0] = get_language_string(user, "NS_NETINFO_CHANNEL_BAN");
     sprintf(tmp, "%d    %.2f kB (%d * %u B = %.2f kB)", channel_ban_count, channel_ban_memory / 1024, channel_ban_count, (unsigned int) sizeof(struct BanNode), channel_ban_memory / 1024);
     content[1] = tmp;
     table_add(table, content);
-    
     content[0] = get_language_string(user, "NS_NETINFO_USER");
     sprintf(tmp, "%d    %.2f kB (%d * %u B = %.2f kB)", user_count, user_memory / 1024, user_count, (unsigned int) sizeof(struct UserNode), user_memory / 1024);
     content[1] = tmp;
     table_add(table, content);
-    
     content[0] = get_language_string(user, "NS_NETINFO_CHANUSER");
     sprintf(tmp, "%d    %.2f kB (%d * %u B = %.2f kB)", chanuser_count, chanuser_memory / 1024, chanuser_count, (unsigned int) sizeof(struct ChanUser), chanuser_memory / 1024);
     content[1] = tmp;
@@ -150,9 +145,9 @@ CMD_BIND(neonserv_cmd_netinfo) {
     table_add(table, content);
     
     if(strcmp(revision, ""))
-        sprintf(tmp, "%s  (%s)", NEONSERV_VERSION, revision);
+        sprintf(tmp, "%s.%d  (%s)", NEONSERV_VERSION, patchlevel, revision);
     else 
-        strcpy(tmp, NEONSERV_VERSION);
+        sprintf(tmp, "%s.%d", NEONSERV_VERSION, patchlevel);
     content[0] = get_language_string(user, "NS_NETINFO_VERSION");
     content[1] = tmp;
     table_add(table, content);