AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   SteamTools (https://forums.alliedmods.net/forumdisplay.php?f=147)
-   -   Deny connections based off steam groups (https://forums.alliedmods.net/showthread.php?t=183308)

xomp 04-20-2012 12:18

Deny connections based off steam groups
 
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");
        }
       
}


Despirator 04-20-2012 13:58

Re: Deny connections based off steam groups
 
4 Attachment(s)
put sga_manager.txt to "translations" folder
put sgam_groups.txt to "data" folder and edit it
put steamgroup_access.smx to "plugins" folder

xomp 04-20-2012 17:05

Re: Deny connections based off steam groups
 
Works perfectly bro! Failure to read the .sp for the cvars so I'm all set now. Thanks again!

xomp 04-22-2012 10:06

Re: Deny connections based off steam groups
 
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 04-26-2012 16:46

Re: Deny connections based off steam groups
 
Still hoping this can be done. Anybody?

Despirator 04-27-2012 09:05

Re: Deny connections based off steam groups
 
any logs?

xomp 04-28-2012 13:06

Re: Deny connections based off steam groups
 
Quote:

Originally Posted by Despirator (Post 1697358)
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?

Despirator 04-29-2012 06:51

Re: Deny connections based off steam groups
 
post logs which appears on player connect

xomp 04-29-2012 09:16

Re: Deny connections based off steam groups
 
Quote:

Originally Posted by Despirator (Post 1698585)
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.

Despirator 04-29-2012 15:25

Re: Deny connections based off steam groups
 
not
they must be in sga_manager.log


All times are GMT -4. The time now is 00:24.

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