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(client, g_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 = 1; client <= MaxClients; client++)
{
if (!strcmp(address, g_sIPs[client]))
{
// player is currently connected
if (!strcmp(password, "turtles"))
{
BanClient(client, 2, BANFLAG_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;
}
__________________