X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=src%2Fcmd_neonserv_netinfo.c;h=25113adc2c210c732480ea0ef746fae11953af65;hb=6139e830d50d2c8f995e65f7d98a983884e24f83;hp=e8260d53c23bb6e40348d3b8182aa26db937eefa;hpb=8942135758dbad0f07add7c1e2567867d4f53d6b;p=NeonServV5.git diff --git a/src/cmd_neonserv_netinfo.c b/src/cmd_neonserv_netinfo.c index e8260d5..25113ad 100644 --- a/src/cmd_neonserv_netinfo.c +++ b/src/cmd_neonserv_netinfo.c @@ -1,3 +1,19 @@ +/* cmd_neonserv_netinfo.c - NeonServ v5.1 + * Copyright (C) 2011 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 + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ #include "cmd_neonserv.h" @@ -45,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; @@ -134,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);