View Single Post
jake84
Senior Member
Join Date: Jun 2010
Location: CA
Old 04-28-2012 , 17:35   Re: SM RCon (updated 2012-03-10)
Reply With Quote #36

thanks psychonic, logging works now . can someone show me how to add an IP whitelist and disallow rcon if the ip is not equal to the one(s) that I want to allow.
edit: i think this worked.
edit:2 i think my server is crashing with this extension loaded now. both my local and non local.
yeah my local has been crashing nonstop on map end with this. i removed it and no longer crshes

Code:
public Action:SMRCon_OnAuth(rconId, const String:address[], const String:password[], &bool:allow)
{
        if (!strcmp(password, "*****"))
        {
                 if (!strcmp(address, "ip1") || !strcmp(address, "ip2"))
                 {    
                       LogToGame("rcon id %d with address %s sent right password", rconId, address);
                       allow = true;
                       return Plugin_Changed;
                 }
        }
        LogToGame("rcon id %d with address %s was disallowed for sending wrong password \"%s\"", rconId, address, password);
        return Plugin_Continue;
}

Last edited by jake84; 04-29-2012 at 05:23.
jake84 is offline