I need a suggestion how to block an ip on class? We initially blocked: STEAM_ID_LAN and VALVE_ID_LAN, but I also want to be able to block an IP on the class (exe: 96.55.x.x).
I don't want to ban IP by class, I want those who have at least slot to enter the server
Thanks!
I don't want to ban IP by class, I want those who have at least slot to enter the server
Thanks!
Код:
public client_authorized(id)
{
if(get_pcvar_num(ValveEnabled) == 0)
{
return PLUGIN_CONTINUE
}
if (get_user_flags(id) & ADMIN_USER)
{
new Name[32],IP[40], Authid[35]
get_user_authid(id,Authid,34)
get_user_name(id,Name,31)
get_user_ip(id,IP,39, 1)
if(equal(Authid,"STEAM_ID_LAN") || equal(Authid, "VALVE_ID_LAN"))
{
log_amx("%s (IP: %s) was kicked for having %s",Name,IP,Authid)
server_cmd("kick #%d",get_user_userid(id))
}
}
return PLUGIN_HANDLED
}