So I have an old plugin here written by asherkin that I used long ago to keep certain troll groups off my servers. It no longer appears to be working now and I was hoping maybe someone could take a peak and maybe submit a fix for it. It's a great way to keep the general troll out of your server and think it would come in handy to a bunch of folks. To look up "groupAccountID" simply paste the steam group link
HERE.
Code:
#pragma semicolon 1
#include <sourcemod>
#define AUTOLOAD_EXTENSIONS
#define REQUIRE_EXTENSIONS
#include <steamtools>
#define PLUGIN_VERSION "0.1.0"
public Plugin:myinfo = {
name = "Steam Group Kicker",
author = "Asher Baker (asherkin)",
description = "Filters Trolls from the server.",
version = PLUGIN_VERSION,
url = "http://limetech.org/"
};
new Handle:enabled = INVALID_HANDLE;
new Handle:immunity = INVALID_HANDLE;
public OnPluginStart()
{
LoadTranslations("common.phrases");
enabled = CreateConVar("sm_fpblock_enabled", "1", "", FCVAR_NONE, true, 0.0, true, 1.0);
immunity = CreateConVar("sm_fpblock_immunity", "1", "", FCVAR_NONE, true, 0.0, true, 1.0);
}
public OnClientAuthorized(client, const String:auth[])
{
if (GetConVarBool(enabled) || (GetConVarBool(immunity) && GetUserAdmin(client) != INVALID_ADMIN_ID))
{
return;
}
if (!Steam_RequestGroupStatus(client, 2483875))
{
WarnAdmins(client);
}
}
public WarnAdmins(client)
{
for (new i; i <= MaxClients; i++)
{
if (!IsClientInGame(i) || !GetAdminFlag(GetUserAdmin(client), Admin_Kick))
{
continue;
}
PrintToChat(i, "[SM] Player %N bypassed Group check. Disconnected from Steam?", client);
}
}
public Steam_GroupStatusResult(client, groupAccountID, bool:groupMember, bool:groupOfficer)
{
if (groupAccountID == 2483875 && groupMember)
{
KickClientEx(client, "%s", "This Group Not Allowed");
}
}