X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=src%2Fcmd_neonserv_netinfo.c;h=7f60d643a7f8e0fd29594d3189f81d9d1cdaf3dd;hb=95fed4deda0319bee515e44ceec0c77061a2c04e;hp=c8fd1b643d87ecaa4fea62678e2e0ca9912c8765;hpb=0f1dc61921eef1db8e404a5a82372e2d1cd55daa;p=NeonServV5.git diff --git a/src/cmd_neonserv_netinfo.c b/src/cmd_neonserv_netinfo.c index c8fd1b6..7f60d64 100644 --- a/src/cmd_neonserv_netinfo.c +++ b/src/cmd_neonserv_netinfo.c @@ -1,3 +1,19 @@ +/* cmd_neonserv_netinfo.c - NeonServ v5.0 + * 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" @@ -52,22 +68,22 @@ CMD_BIND(neonserv_cmd_netinfo) { table_add(table, content); content[0] = get_language_string(user, "NS_NETINFO_CHANNEL"); - sprintf(tmp, "%d %.2f kB (%d * %lu B = %.2f kB)", channel_count, channel_memory / 1024, channel_count, sizeof(struct ChanNode), channel_memory / 1024); + 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 * %lu B = %.2f kB)", channel_ban_count, channel_ban_memory / 1024, channel_ban_count, sizeof(struct BanNode), channel_ban_memory / 1024); + 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 * %lu B = %.2f kB)", user_count, user_memory / 1024, user_count, sizeof(struct UserNode), user_memory / 1024); + 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 * %lu B = %.2f kB)", chanuser_count, chanuser_memory / 1024, chanuser_count, sizeof(struct ChanUser), chanuser_memory / 1024); + 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; table_add(table, content);