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

[ANY] Steam Group Restrict


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Impact123
Veteran Member
Join Date: Oct 2011
Location: Germany
Plugin ID:
6882
Plugin Version:
0.1.5
Plugin Category:
General Purpose
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Kicks players based on whether they are a member of a group
    Old 01-05-2020 , 05:41   [ANY] Steam Group Restrict
    Reply With Quote #1

    A plugin that kicks players based on whether they are a member of a group.
    Please take note of potential false detection problems of this plugin in the post below

    Installation
    1. Install The SteamWorks extension
    2. Put steamgrouprestrict.smx in the sourcemod/plugins folder
    3. Load the plugin
    4. Configure it

    ConVars
    The plugin creates a plugin.steamgrouprestrict.cfg in the cfg/sourcemod folder when it's loaded where you can configure these variables.


    sm_steamgrouprestrict_groupids (default: "")
    List of group ids separated by a comma. Spaces between the value and the comma are trimmed off so feel free to use them for better visibility.

    The expected input is the result of
    Code:
    groupID64 % 4294967296
    You can get a group's groupID64 by visiting
    Code:
    https://steamcommunity.com/groups/ADDYOURGROUPSNAMEHERE/memberslistxml/?xml=1
    To convert the groupID64 i used the python console.
    I wrote a little web tool where you can convert your group64 ids

    This isn't too user friendly so if you have a better idea on how to do this, please let me know!

    sm_steamgrouprestrict_notify (default: 1)
    Whether or not admins should be notified about kicks.
    By default, admins with the BAN flag are considered admins but you can override this with sm_steamgrouprestrict_admin

    sm_steamgrouprestrict_reason (default: You are a member of a restricted group)
    Kick reason displayed to client

    Github source
    Attached Files
    File Type: sp Get Plugin or Get Source (steamgrouprestrict.sp - 310 views - 3.7 KB)
    File Type: smx steamgrouprestrict.smx (9.4 KB, 267 views)
    __________________

    Last edited by Impact123; 09-06-2020 at 14:10. Reason: New version 0.1.6
    Impact123 is offline
    RumbleFrog
    Great Tester of Whatever
    Join Date: Dec 2016
    Location: Fish Tank
    Old 01-05-2020 , 14:49   Re: [ANY] Steam Group Restrict
    Reply With Quote #2

    You can also find the ID by inspecting the discussion page, you will find multiple references to the short id such as `General_29292279`
    __________________
    RumbleFrog is offline
    DarkDeviL
    SourceMod Moderator
    Join Date: Apr 2012
    Old 01-05-2020 , 16:29   Re: [ANY] Steam Group Restrict
    Reply With Quote #3

    SteamWorks (including SteamTools) will respond that people are a member of your group as soon as they have been invited to that group.

    People clicking "ignore" on your invitation will also count as members.

    So if I invite you into a restricted group, and you simply click "ignore" on my group invitation; you will unfortunately still be thrown away by this plugin.
    __________________
    Mostly known as "DarkDeviL".

    Dropbox FastDL: Public folder will no longer work after March 15, 2017!
    For more info, see the [SRCDS Thread], or the [HLDS Thread].

    Last edited by DarkDeviL; 01-05-2020 at 16:30.
    DarkDeviL is offline
    Impact123
    Veteran Member
    Join Date: Oct 2011
    Location: Germany
    Old 01-05-2020 , 17:56   Re: [ANY] Steam Group Restrict
    Reply With Quote #4

    Didn't know that. Thanks! I guess there isn't much that i can do about that besides using another method like parsing the memberslistxml?
    __________________

    Last edited by Impact123; 01-05-2020 at 17:57.
    Impact123 is offline
    DarkDeviL
    SourceMod Moderator
    Join Date: Apr 2012
    Old 01-05-2020 , 20:09   Re: [ANY] Steam Group Restrict
    Reply With Quote #5

    Quote:
    Originally Posted by Impact123 View Post
    Didn't know that. Thanks! I guess there isn't much that i can do about that besides using another method like parsing the memberslistxml?
    It is the way that the Steam (<-> SteamWorks/SteamTools) works that does it, unfortunately.

    As I mentioned over on (Post #4) [L4D2] Block black-listed groups members join, you can do the memberslistxml one - however, if you got a multi thousand user group with several pages, it appears to become unreliable.

    E.g. memberCount column does not match amount of steamID64's retrieved via e.g. a for each loop on the members data group.
    __________________
    Mostly known as "DarkDeviL".

    Dropbox FastDL: Public folder will no longer work after March 15, 2017!
    For more info, see the [SRCDS Thread], or the [HLDS Thread].

    Last edited by DarkDeviL; 01-05-2020 at 20:09.
    DarkDeviL is offline
    GoGetSomeSleep
    Senior Member
    Join Date: Dec 2018
    Location: Miami/Florida
    Old 09-06-2020 , 06:55   Re: [ANY] Steam Group Restrict
    Reply With Quote #6

    wanna modify kick reason but i can't compile and there is no cvar for this.
    GoGetSomeSleep is offline
    Impact123
    Veteran Member
    Join Date: Oct 2011
    Location: Germany
    Old 09-06-2020 , 14:10   Re: [ANY] Steam Group Restrict
    Reply With Quote #7

    I've added a new ConVar for it
    __________________
    Impact123 is offline
    GoGetSomeSleep
    Senior Member
    Join Date: Dec 2018
    Location: Miami/Florida
    Old 09-08-2020 , 06:10   Re: [ANY] Steam Group Restrict
    Reply With Quote #8

    is that correct usage?
    sm_steamgrouprestrict_groupids "4294967296"
    GoGetSomeSleep is offline
    Impact123
    Veteran Member
    Join Date: Oct 2011
    Location: Germany
    Old 09-08-2020 , 06:12   Re: [ANY] Steam Group Restrict
    Reply With Quote #9

    No. Put your group id(s) here and use the result(s) of it as value(s)
    __________________

    Last edited by Impact123; 09-08-2020 at 06:13.
    Impact123 is offline
    GoGetSomeSleep
    Senior Member
    Join Date: Dec 2018
    Location: Miami/Florida
    Old 09-08-2020 , 06:16   Re: [ANY] Steam Group Restrict
    Reply With Quote #10

    like this?
    sm_steamgrouprestrict_groupids "32814240"

    and why is that

    Code:
      147 <Bad Load> steamgrouprestrict.smx
    Errors:
    steamgrouprestrict.smx: Unable to load plugin (no debug string table)
    -
    sm exts list
    [SM] Displaying 17 extensions:
    [01] EQ Ladder Rambos (0.1.1): Enables guns on ladders
    [02] Left 4 Downtown 2 (0.6.3): Competitive framework support extension for L4D2
    [03] BinTools (1.9.0.6282): Low-level C/C++ Calling API
    [04] SDK Tools (1.9.0.6282): Source SDK Tools
    [05] SDK Hooks (1.9.0.6282): Source SDK Hooks
    [06] Client Preferences (1.9.0.6282): Saves client preference settings
    [07] SQLite (1.9.0.6282): SQLite Driver
    [08] Top Menus (1.9.0.6282): Creates sorted nested menus
    [09] GameRules Tools (1.0): GameRules Tools
    [10] GeoIP (1.9.0.6282): Geographical IP information
    [11] GeoIPCity (1.1.2): Geographical IP information
    [12] Regex (1.9.0.6282): Provides regex natives for plugins
    [13] Socket (3.0.1): Socket extension for SourceMod
    [14] SteamWorks Extension (1.2.3): Exposes SteamWorks functions to Developers
    [15] DHooks (1.0.12-alpha): Allows basic dynamic hooks
    [16] cURL Extension (1.3.0.0): cURL Extension
    [17] MySQL-DBI (1.9.0.6282): MySQL driver implementation for DBI
    -
     SourceMod Version Information:
        SourceMod Version: 1.9.0.6282
        SourcePawn Engine: 1.9.0.6282, jit-x86 (build 1.9.0.6282)
        SourcePawn API: v1 = 4, v2 = 12
        Compiled on: Sep  2 2019 13:53:57
        Built from: https://github.com/alliedmodders/sourcemod/commit/b2b29cb
        Build ID: 6282:b2b29cb
        http://www.sourcemod.net/

    Last edited by GoGetSomeSleep; 09-08-2020 at 06:57.
    GoGetSomeSleep is offline
    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 21:26.


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