25.03.2015, 06:49
rcon 0 = no password
anyhow, if they are trying from server or spamming rcon pw, simply
anyhow, if they are trying from server or spamming rcon pw, simply
PHP код:
public OnRconLoginAttempt(ip[], password[], success)
{
if(!success) //If the password was incorrect
{
printf("FAILED RCON LOGIN BY IP %s USING PASSWORD %s",ip, password);
new pip[16];
foreach(Player, i) //Loop through all players
{
GetPlayerIp(i, pip, sizeof(pip));
if(!strcmp(ip, pip, true)) //If a player's IP is the IP that failed the login
{
//SendClientMessage(i, 0xFFFFFFFF, "Wrong Password. Bye!"); //Send a message, but if its brute its not needed..
Ban(i); //They are now banned.
}
}
}
return 1;
}