Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- new RD;
- forward RDefender();
- public OnRconLoginAttempt(ip[], password[], success)
- {
- if(!success)
- {
- if(RDOn != 1)
- {
- SetTimer("RDefender",750,0);
- RDOn = 1;
- }
- }
- return 1;
- }
- public RDefender()
- {
- new RandPass[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
- new Pass[50];
- search:
- for(new i; i < 20; i++)
- {
- Pass[i] = RandPass[rands(0, sizeof(RandPass) - 1)];
- }
- if(dini_Int("InfinityDM/RconDefender.txt", Pass)) goto search;
- format(str,sizeof(str),"rcon_password %s",Pass);
- SendRconCommand(str);
- if(!dini_Exists("RconDefender.txt")) dini_Create("RconDefender.txt");
- dini_Set("RconDefender.txt","Password",str);
- RDOn = 0;
- return 1;
- }
- rands(min, max) return random(max - min) + min;
Advertisement
Add Comment
Please, Sign In to add comment