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

Deny connections based off steam groups


Post New Thread Reply   
 
Thread Tools Display Modes
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
Despirator
Senior Member
Join Date: Jun 2011
Location: Kazakhstan ->Shymkent
Old 04-20-2012 , 13:58   Re: Deny connections based off steam groups
Reply With Quote #2

put sga_manager.txt to "translations" folder
put sgam_groups.txt to "data" folder and edit it
put steamgroup_access.smx to "plugins" folder
Attached Files
File Type: txt sga_manager.txt (1.8 KB, 313 views)
File Type: txt sgam_groups.txt (388 Bytes, 277 views)
File Type: smx steamgroup_access.smx (10.2 KB, 282 views)
File Type: sp Get Plugin or Get Source (steamgroup_access.sp - 291 views - 14.4 KB)
Despirator is offline
xomp
BANNED
Join Date: Jul 2008
Old 04-20-2012 , 17:05   Re: Deny connections based off steam groups
Reply With Quote #3

Works perfectly bro! Failure to read the .sp for the cvars so I'm all set now. Thanks again!

Last edited by xomp; 04-21-2012 at 16:01.
xomp is offline
Send a message via Skype™ to xomp
Old 04-21-2012, 13:31
xomp
This message has been deleted by xomp. Reason: thick as a brick I am!
xomp
BANNED
Join Date: Jul 2008
Old 04-22-2012 , 10:06   Re: Deny connections based off steam groups
Reply With Quote #5

Welp, I'm not sure where the problem is. I was sure it was working since I saw a denial message but for some reason I am not getting banned when I join a group I've blacklisted (yes, admin immunity is turned off) so I'm not sure where the problem is, the plugin or steamtools.
xomp is offline
Send a message via Skype™ to xomp
xomp
BANNED
Join Date: Jul 2008
Old 04-26-2012 , 16:46   Re: Deny connections based off steam groups
Reply With Quote #6

Still hoping this can be done. Anybody?
xomp is offline
Send a message via Skype™ to xomp
Despirator
Senior Member
Join Date: Jun 2011
Location: Kazakhstan ->Shymkent
Old 04-27-2012 , 09:05   Re: Deny connections based off steam groups
Reply With Quote #7

any logs?
Despirator is offline
xomp
BANNED
Join Date: Jul 2008
Old 04-28-2012 , 13:06   Re: Deny connections based off steam groups
Reply With Quote #8

Quote:
Originally Posted by Despirator View Post
any logs?
I have an sga_manager.log in my sourcemod/logs directory. But there aren't any errors in that .log or any other error logs.

Here is what's printed in my sga_manager.log which appears to just be verbosely recording the settings I'm using.

Quote:
L 04/28/2012 - 08:556: [steamgroup_access.smx] Admins: Disallowed
L 04/28/2012 - 08:556: [steamgroup_access.smx] Ban Time: forever
L 04/28/2012 - 08:556: [steamgroup_access.smx] Function type: Reject groupslist's memberships
L 04/28/2012 - 08:556: [steamgroup_access.smx] Reject type: Ban by SteamID
L 04/28/2012 - 08:557: [steamgroup_access.smx] Group loaded - ID: 3000157, Name: Baddie1
L 04/28/2012 - 08:557: [steamgroup_access.smx] Group loaded - ID: 2850702, Name: Baddie2
L 04/28/2012 - 08:557: [steamgroup_access.smx] Group loaded - ID: 1978066, Name: Baddie2
L 04/28/2012 - 08:557: [steamgroup_access.smx] Group loaded - ID: 2691255, Name: Baddie3
L 04/28/2012 - 08:557: [steamgroup_access.smx] Group loaded - ID: 1978066, Name: Baddie4
L 04/28/2012 - 08:557: [steamgroup_access.smx] Group loaded - ID: 2265276, Name: Baddie5
L 04/28/2012 - 08:557: [steamgroup_access.smx] Group loaded - ID: 1739672, Name: Baddie6
L 04/28/2012 - 08:557: [steamgroup_access.smx] Group loaded - ID: 1835502, Name: Baddie7
L 04/28/2012 - 08:557: [steamgroup_access.smx] Steam Group Access Manager: Enabled
L 04/28/2012 - 08:557: [steamgroup_access.smx] Function type: Reject groupslist's memberships
L 04/28/2012 - 08:557: [steamgroup_access.smx] Announcement a player's restricted group name: On
L 04/28/2012 - 08:557: [steamgroup_access.smx] Reject type: Ban by SteamID
L 04/28/2012 - 08:557: [steamgroup_access.smx] Admins: Disallowed
L 04/28/2012 - 08:557: [steamgroup_access.smx] Ban Time: forever
Quote:
The following errors occurred with your submission:
You have included 18 images in your message. You are limited to using 10 images so please go back and correct the problem and then continue again.

Images include use of smilies, the BB code [img] tag and HTML <img> tags. The use of these is all subject to them being enabled by the administrator.
^ seriously vbulletin?

Last edited by xomp; 04-28-2012 at 13:06.
xomp is offline
Send a message via Skype™ to xomp
Despirator
Senior Member
Join Date: Jun 2011
Location: Kazakhstan ->Shymkent
Old 04-29-2012 , 06:51   Re: Deny connections based off steam groups
Reply With Quote #9

post logs which appears on player connect
Despirator is offline
xomp
BANNED
Join Date: Jul 2008
Old 04-29-2012 , 09:16   Re: Deny connections based off steam groups
Reply With Quote #10

Quote:
Originally Posted by Despirator View Post
post logs which appears on player connect
Code:
L 04/29/2012 - 11:13:09: server_cvar: "tfh_halloween" "2"
L 04/29/2012 - 11:13:10: server_cvar: "sm_nextmap" "ctf_mach4"
L 04/29/2012 - 11:13:10: server_cvar: "sv_tags" "TF2Stats,alltalk,ctf,gravity"
L 04/29/2012 - 11:13:10: server_cvar: "sv_tags" "TF2Stats,alltalk,ctf,gravity"
L 04/29/2012 - 11:13:10: server_cvar: "mp_autoteambalance" "0"
L 04/29/2012 - 11:13:10: Connection to Steam servers successful.
L 04/29/2012 - 11:13:10:    Public IP is 173.230.140.72.
L 04/29/2012 - 11:13:10: Assigned anonymous gameserver Steam ID [A-1:2676135939(2945)].
L 04/29/2012 - 11:13:11: VAC secure mode is activated.
L 04/29/2012 - 11:13:11: Received auth challenge; signing into gameserver account...
L 04/29/2012 - 11:13:12: Game server authentication: SUCCESS! Standing: Good. Trend: Gordon Freeman
L 04/29/2012 - 11:13:12: server_cvar: "sv_registration_message" ""
L 04/29/2012 - 11:13:12: server_cvar: "sv_registration_successful" "1"
L 04/29/2012 - 11:13:12: server_cvar: "sv_tags" "TF2Stats,_registered,alltalk,ctf,gravity"
L 04/29/2012 - 11:13:12: server_cvar: "sv_tags" "TF2Stats,_registered,alltalk,ctf,gravity"
L 04/29/2012 - 11:14:46: "ƃℲƃ-gooby pls<2><STEAM_0:1:7502955><>" connected, address "76.124.254.59:27005"
L 04/29/2012 - 11:14:47: "ƃℲƃ-gooby pls<2><STEAM_0:1:7502955><>" STEAM USERID validated
L 04/29/2012 - 11:15:50: "ƃℲƃ-gooby pls<2><STEAM_0:1:7502955><>" entered the game
L 04/29/2012 - 11:16:10: "ƃℲƃ-gooby pls<2><STEAM_0:1:7502955><Unassigned>" joined team "Red"
Let me know if that's what you need or not.

Last edited by xomp; 04-29-2012 at 11:19.
xomp is offline
Send a message via Skype™ to xomp
Reply


Thread Tools
Display Modes

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 10:48.


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