Shadowless
Пользователь
- Регистрация
- 24 Фев 2019
- Сообщения
- 237
- Симпатии
- 4
- Пол
- Мужской
mSoft BlackList Players by MaSTeR is IP class blocker plugin... -> [AMX] mSoft AntiSpam & AutoBan on class IP - AlliedModders
its blocking IP CLASS (only 3 digits in IP needed) for example
192.168.1
79.116.17
i want to block full IP address(4 digits) please help me...
its blocking IP CLASS (only 3 digits in IP needed) for example
192.168.1
79.116.17
i want to block full IP address(4 digits) please help me...
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","1.0" }
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 Clasa de IP a lui %s este verificata automat de sistem.",user)
server_cmd("amx_chat Daca va primi BAN, inseamna ca IP-ul se afla in lista neagra!")
}
public mSoftVerificaClasaDeIp(id)
{
if(is_user_connected(id) == 1)
{
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/msoft_blacklist.ini","r")
new data[128]
while( !feof(f) )
{
fgets(f, data, 127)
if(data[0] != ';')
{
counterIpuri++;
}
}
fclose(f)
new fisierBlackList[128],clasaIpB[10];
format(fisierBlackList, 127, "/addons/amxmodx/configs/msoft_blacklist.ini")
for (new i=0; i<counterIpuri; i++)
{
read_file(fisierBlackList, i, clasaIpB, 9, t)
//replace_all(clasaIpA, 9, ".", "")
//replace_all(clasaIpB, 9, ".", "")
if (equal(clasaIpB, clasaIpA))
{
set_task(5.0,"mSoftAdaugaBanPermanent",id)
client_print(id,print_chat,"[info] Ops.. %s se pare ca ai fost pedepsit de catre conducerea acestui server. BAN PERMANENT pe CLASA de IP!",user)
client_print(id,print_chat,"[info] In cazul in care consideri ca aceasta pedeapsa este un abuz, asteptam reclamatia pe forum: http://counterstrike.master-software.ro")
}
}
}
}
public mSoftAdaugaBanPermanent(id)
{
if(is_user_connected(id) == 1)
{
new user[32],ip[32];
get_user_name(id,user,31)
get_user_ip(id,ip,31,1)
server_cmd("amx_addban %s 0 ^"Ops.. BAN pe clasa de IP!^"",ip)
client_print(0,print_chat,"[info] %s a fost pedepsit de catre conducerea acestui server. BAN PERMANENT pe CLASA de IP!",user)
}
}