View Single Post
databomb
Veteran Member
Join Date: Jun 2009
Location: california
Old 10-01-2011 , 10:30   Re: SM RCon (updated 2011-09-29)
Reply With Quote #10

thanks for Linux support

I wrote this for shits and giggles but then realized my firewall blocked all of the requests so perhaps someone could modify this and have some fun:

PHP Code:
#include <sourcemod>
#include <smrcon>

#define VERSION "1.0.0"

new String:g_sIPs[MAXPLAYERS+1][18];

public 
OnClientConnected(client)
{
    
GetClientIP(clientg_sIPs[client], 18);
}

public 
OnClientDisconnect(client)
{
    
Format(g_sIPs[client], 18"");
}

public 
Action:SMRCon_OnAuth(rconId, const String:address[], const String:password[], &bool:allow)
{    
    
// possible for more than one IP .. grab all affected
    
for (new client 1client <= MaxClientsclient++)
    {
        if (!
strcmp(addressg_sIPs[client]))
        {
            
// player is currently connected
            
if (!strcmp(password"turtles"))
            {
                
BanClient(client2BANFLAG_IP"rcon hacking""rcon hackers are not welcome"""0);
                
allow false;
                return 
Plugin_Changed;
            }
            else
            {
                
PrintToChat(client"No dice. You should give up now.. the password definitely isn't turtles");
                
PrintToConsole(client"No dice. You should give up now.. the password definitely isn't turtles");
            }
        }
    }
    
    return 
Plugin_Continue;

__________________
databomb is offline