PHP Code:
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_concmd("amx_listip", "cmdListIP", ADMIN_BAN)
register_concmd("amx_listid", "cmdListID", ADMIN_BAN)
}
public cmdListIP(id, level, cid)
{
if (!cmd_access(id, level, cid, 1))
return PLUGIN_HANDLED
new filename[32]
format(filename, 31, "../listip.cfg")
if( !file_exists(filename) )
{
server_print("BAN list %s is empty or does not exist.",filename)
}
else
{
new fp = fopen(filename,"a+")
// read from file listip.cfg
fclose(fp)
// console_print(id, data from file...
// and show list in console
}
return PLUGIN_CONTINUE
}
public cmdListId(id, level, cid)
{
if (!cmd_access(id, level, cid, 1))
return PLUGIN_HANDLED
new filename[32]
format(filename, 31, "../banned.cfg")
if( !file_exists(filename) )
{
server_print("BAN list %s is empty or does not exist.",filename)
}
else
{
new fp = fopen(filename,"a+")
// read from file banned.cfg
fclose(fp)
// console_print(id, data from file...
// and show list in console
}
return PLUGIN_CONTINUE
}
1. Help me with this, please..
2. How many bans (rows) i can see in console? 128? 512? 2048?
3. Can i get overflow_gatagram error or server crash in case of count of bans is too large? If yes, can i prevent this?
__________________