Shadowless
Пользователь
- Регистрация
- 24 Фев 2019
- Сообщения
- 237
- Симпатии
- 4
- Пол
- Мужской
hello again...
few days ago i updated amxx to 1.9.0...
and now this plugin does not work
there is no erros in logs and its runing with out problem but does not ban
compiled with 1.9.0
few days ago i updated amxx to 1.9.0...
and now this plugin does not work
there is no erros in logs and its runing with out problem but does not ban
compiled with 1.9.0
C++:
// *************************************************************************************//
// Master Software Romania CS 1.6 Dedicated Server - PLUGINS
// Plugin Name: mSoft BlackList Players (ban pe clasa de IP)
// Author: Master Sorynel - [c] 2011 FOR CS.MASTER-SOFTWARE.RO
// *************************************************************************************//
#include <amxmodx>
#include <amxmisc>
#include <file>
new t;
enum INFO { NAME, AUTHOR, VERSION }
new const PLUGIN[INFO:3][] = { "mSoft BlackList Players","MaSTeR + georgeml","1.1" }
public plugin_init()
{
register_plugin(PLUGIN[NAME],PLUGIN[VERSION],PLUGIN[AUTHOR])
}
public client_putinserver(id)
{
new user[32];
get_user_name(id,user,31)
set_task(15.0,"mSoftVerificaClasaDeIp",id)
/* server_cmd("amx_chat [AP] Checking IP of %s on blacklist.",user) */
/* server_cmd("amx_chat [AP] IP of %s is checked automatically by the system.",user) */
/* server_cmd("amx_chat [AP] If you get BAN, it means that the IP is blacklisted!") */
}
public mSoftVerificaClasaDeIp(id)
{
if(is_user_connected(id))
{
new user[32],ip[32], clasaIpA[10];
get_user_name(id,user,31)
get_user_ip(id,ip,31,1)
get_user_ip(id,clasaIpA,9,1)
new counterIpuri;
counterIpuri = 0
new f = fopen("/addons/amxmodx/configs/blacklist.ini","r")
new data[128]
while( !feof(f) )
{
fgets(f, data, 127)
if(data[0] != ';')
{
counterIpuri++;
}
}
fclose(f)
new fisierBlackList[128],clasaIpB[24];
format(fisierBlackList, 127, "/addons/amxmodx/configs/blacklist.ini")
for (new i=0; i<counterIpuri; i++)
{
read_file(fisierBlackList, i, clasaIpB, charsmax(clasaIpB), t)
/* replace_all(clasaIpA, 9, ".", "") */
/* replace_all(clasaIpB, 9, ".", "") */
if (equal(clasaIpB, clasaIpA))
{
set_task(5.0,"mSoftAdaugaBanPermanent",id)
/* client_print(id,print_chat,"[AP] Ops.. %s it seems that you have been punished by this server. PERMANENT BAN on IP!",user) */
client_print(id,print_chat,"[AP] If you think that this BAN is wrong, contact us on FB")
}
}
}
}
public mSoftAdaugaBanPermanent(id)
{
if(is_user_connected(id))
{
new user[32],ip[32];
get_user_name(id,user,31)
get_user_ip(id,ip,31,1)
client_print(0,print_chat,"[AP] %s was punished by this server. PERMANENT BAN on IP!",user)
server_cmd("amx_chat [AP] %s was punished by this server. PERMANENT BAN - Blacklisted IP!",user)
server_cmd("amx_addban %s 0 ^"Blacklisted IP^"",ip)
server_cmd("amx_ban %s 0 ^"Blacklisted IP^"",ip)
server_cmd("addip 0.0 %s ^"Blacklisted IP^"",ip)
}
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1049\\ f0\\ fs16 \n\\ par }
*/
Последнее редактирование: