12.04.2013, 23:52
it spams chat ..why? please help
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];
for(new i=0; i<MAX_PLAYERS; 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
{
new name[24];
new str[128];
new y, m, d;
new h,mi,s;
new sendername[MAX_PLAYER_NAME];
GetPlayerName(i, sendername, sizeof(sendername));
format(str, sizeof(str), "<UnionZone Bot> %s gresit rcon! Ip: %s",name,ip); // this spams!
SendAdminMessage(COLOR_YELLOW, str);
SendClientMessage(i, COLOR_RED, "[Anti-RconHack]: Ai Spart Rcon.Si ai primit Admin 1.");
Kick(i);
getdate(y,m,d);
gettime(h,mi,s);
format(str, sizeof(str), "(%d/%d/%d)[%d:%d:%d] %s a gresit rcon! Ip: %s Password: %s",d,m,y,h,mi,s,name,ip,password);
IntrareLog(str);
}
}
}
return 1;
}