Raised This Month: $51 Target: $400
 12% 

Deny connections based off steam groups


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
xomp
BANNED
Join Date: Jul 2008
Old 04-20-2012 , 12:18   Deny connections based off steam groups
Reply With Quote #1

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");
	}
	
}
xomp is offline
Send a message via Skype™ to xomp
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:06.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode