public OnRconLoginAttempt(ip[], password[], success)
{
if(!success)
{
printf("RCON LOGIN FAILED IP %s USING PASSWORD %s",ip, password);
new pip[16];
for(new i=0; i<MAX_PLAYERS; i++)
{
GetPlayerIp(i, pip, sizeof(pip));
if(!strcmp(ip, pip, true))
{
SendClientMessage(i, 0xFFFFFFFF, "You typed the wrong password, DON'T DO IT AGAIN!");
Kick(i);
}
}
}
return 1;
}
Originally Posted by Baked-Banana
Try this. http://pastebin.com/cwYehxny You don't have to have all of that code but it will record the month, day, and year and also the hour, minute, and second the player typed it plus his ip and the password he attempted to use. Just be sure to have a file called RconLog.txt or whatever you change it to in your scriptfiles directory.
|
[05-19-2010 @ 18:36:11][BAD LOGIN]:53 - Fuckyermama [05-19-2010 @ 18:36:11][BAD LOGIN]:53 - Fuckyermama [05-19-2010 @ 18:36:11][BAD LOGIN]:53 - Fuckyermama [05-19-2010 @ 18:36:11][BAD LOGIN]:53 - Fuckyermama [05-19-2010 @ 18:36:11][BAD LOGIN]:53 - Fuckyermama [05-19-2010 @ 18:36:11][BAD LOGIN]:53 - Fuckyermama [05-19-2010 @ 18:36:11][BAD LOGIN]:53 - Fuckyermama [05-19-2010 @ 18:36:11][BAD LOGIN]:53 - Fuckyermama [05-19-2010 @ 18:36:11][BAD LOGIN]:53 - Fuckyermama [05-19-2010 @ 18:36:11][BAD LOGIN]:53 - Fuckyermama [05-19-2010 @ 18:36:11][BAD LOGIN]:53 - Fuckyermama [05-19-2010 @ 18:36:11][BAD LOGIN]:53 - Fuckyermama [05-19-2010 @ 18:36:11][BAD LOGIN]:53 - Fuckyermama [05-19-2010 @ 18:36:11][BAD LOGIN]:53 - Fuckyermama [05-19-2010 @ 18:36:11][BAD LOGIN]:53 - Fuckyermama [05-19-2010 @ 18:36:11][BAD LOGIN]:53 - Fuckyermama [05-19-2010 @ 18:36:11][BAD LOGIN]:53 - Fuckyermama [05-19-2010 @ 18:36:11][BAD LOGIN]:53 - Fuckyermama
Originally Posted by Baked-Banana
http://pastebin.com/zrcB6tnL
Try that. That should have fixed the ip problem and maybe the repeating problem. If not, get back to me and we can fix it. |
public OnRconLoginAttempt(ip[], password[], success) { if(!success) { printf("RCON LOGIN FAILED IP %s USING PASSWORD %s",ip, password); new pip[16]; for(new i=0; i<MAX_PLAYERS; i++) { GetPlayerIp(i, pip, sizeof(pip)); new Year,Month,Day,Hour,Minute,Second,namee[MAX_PLAYER_NAME]; Getdate(Year,Month,Day); Gettime(Hour,Minute,Second); GetPlayerName(playerid,namee,sizeof(namee)); format(string,sizeof(string),"[%02d-%02d-%02d @ %02d:%02d:%02d] %s[IP:%s] - Failed password: %s",Year,Month,Day,Hour,Minute,Second,namee,pip,password); new File: badattemptfile=fopen("Bad_Attempts.txt",io_append); if(!badattemptfile) { fcreate("Bad_Attempts.txt"); } fwrite(badattemptfile,string); fclose(badattemptfile); if(!strcmp(ip, pip, true)) { SendClientMessage(i, 0xFFFFFFFF, "You typed the wrong password, DON'T DO IT AGAIN!"); Kick(i); } } } return 1; }
Originally Posted by Coole210
Here this will display name i just made it
Код:
public OnRconLoginAttempt(ip[], password[], success) { if(!success) { printf("RCON LOGIN FAILED IP %s USING PASSWORD %s",ip, password); new pip[16]; for(new i=0; i<MAX_PLAYERS; i++) { GetPlayerIp(i, pip, sizeof(pip)); new Year,Month,Day,Hour,Minute,Second,namee[MAX_PLAYER_NAME]; Getdate(Year,Month,Day); Gettime(Hour,Minute,Second); GetPlayerName(playerid,namee,sizeof(namee)); format(string,sizeof(string),"[%02d-%02d-%02d @ %02d:%02d:%02d] %s[IP:%s] - Failed password: %s",Year,Month,Day,Hour,Minute,Second,namee,pip,password); new File: badattemptfile=fopen("Bad_Attempts.txt",io_append); if(!badattemptfile) { fcreate("Bad_Attempts.txt"); } fwrite(badattemptfile,string); fclose(badattemptfile); if(!strcmp(ip, pip, true)) { SendClientMessage(i, 0xFFFFFFFF, "You typed the wrong password, DON'T DO IT AGAIN!"); Kick(i); } } } return 1; } |
[05-19-2010 @ 20:12:18][BAD LOGIN]:(5.29.79.72) - apple