Raised This Month: $32 Target: $400
 8% 

Steam Group Admins (HTTP Prefetch)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Mister_Magotchi
SourceMod Donor
Join Date: Dec 2006
Location: Nampa, Idaho
Plugin ID:
2133
Plugin Version:
0.9.9b
Plugin Category:
Server Management
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    2 
    Plugin Description:
    Allows admin rights to be given based on Steam group membership.
    Old 12-19-2010 , 22:42   Steam Group Admins (HTTP Prefetch)
    Reply With Quote #1

    Steam Group Admins (HTTP Prefetch)

    This plugin reads all players from Steam Community group XML member lists (via HTTP), based on a config file, and adds them to the admin cache whenever the admin cache is refreshed (manually or at map start).

    It should work in any game that SourceMod supports.

    I've currently used it on a Windows CS:S server, a Linux CS:S server, a Windows TF2 server, and a Windows CS:GO server.

    Setup:
    1. Install the cURL extension.
    2. Extract the attached ZIP archive to your game mod folder.
    3. Edit addons\sourcemod\configs\steam-group-admins-http.txt to you liking. All entries are commented out by default.
      • Steam group ID (the key name for each entry)
        • This may be found most easily by going to "Admin options" --> "Edit group profile" when viewing a group you are an admin for in the Steam Community. It can also be found by subtracting 103582791429521408 from the groupid64 if you know that. You can see the groupid64 for all the groups a player is in by tacking "?xml=1" onto the end of their Steam Community profile URL (eg http://steamcommunity.com/id/ChetFaliszek?xml=1) and viewing the XML source.
      • admin_group_name - Required
        • The name you want SourceMod to use as its admin group name. If you have already created the group with another admin config. system, this plugin will use that group. If not, this plugin will create it.
      • flags - Optional
        • Flags to add to the group. If you are using a pre-existing group name from another admin config. system, these flags will be added to all members of that group. If you already have the flags set for the group with the other system, you don't need to set them here.
      • immunity - Optional
        • If set, the group's immunity level will be set to this. If you already have the immunity set for the group via another admin config. system, setting it here may overwrite the other value, depending on the order in which the plugins work with the admin cache.
    4. Change the map or restart your server. You can alternatively manually load the plugin and then run sm_reloadadmins.
    Version History:
    • 0.9.0 - 2010-12-19 - Initial release
    • 0.9.5 - 2012-02-25 - Nearly complete rewrite. Switched from Socket to cURL. Fixed intermittent crash on map change. Fixed invalid memory access errors.
    • 0.9.6 - 2012-04-23 - Added caching: XML files are now written to the SM data folder before being read, so for later admin cache reloads, if cURL can't get fresh data from Steam's servers, it still has old data to work with.
    • 0.9.7 - 2012-04-28 - Fixed minor corruption of XML cache data, and players potentially not being properly removed as admins, when users were removed from a Steam group.
    • 0.9.8 - 2013-12-28 - Changed the way API data caching works to hopefully do away with file-locking issues experienced by some. Also, no response from the API will be cached unless it contains valid group member data; this should prevent people from losing their admin rights when Steam's API is providing abnormal data.
    • 0.9.9 - 2013-12-30 - Made SteamID64 to Steam ID conversion more future-proof, fixed calculation error which may have affected a small percentage of Steam IDs, cleaned up and better-documented code.
    • 0.9.9b - 2014-08-26 - Hotfix to support new Steam ID format ("[U:1:########]").
    Known Issues:

    When manually reloading the admin cache via sm_reloadadmins, players currently authenticated as admins via this plugin will lose their admin authentication until they reconnect to the server or the map changes.

    Steam Community group XML member lists are paginated after 1,000 members, so in order to prevent excessive server load and hammering of the Steam Community XML API, only the first page, and therefore only the first 1,000 listed members, are processed.

    Special Thanks:

    psychonic - He made the original Steam Group Admins plugin. As there is a slight delay after a user connects to the server before they are authenticated by their Steam groups, it doesn't work properly for reserved slots, and that's why I made this plugin. His plugin, however, supports groups of any size, while mine only handles groups with 1,000 members or less.

    Compiling:

    This plugin requires the include files for the cURL extension to compile correctly.

    Download Options:
    • steam-group-admins-http-new-steamid-format.zip
      • Adds admins using the new Steam ID format ("[U:1:########]").
      • Only works in 1.7 branch of SourceMod.
      • Requires a game which uses the new format, like TF2.
    • steam-group-admins-http-old-steamid-format.zip
      • Adds admins using the old Steam ID format ("STEAM_0:#:########").
      • Only works in 1.6 branch of SourceMod.
      • Works with games that use either the new or old Steam ID formats, thanks to the 1.6 branch backward compatibility "hack" on 2014-08-21.
    Attached Files
    File Type: zip steam-group-admins-http-old-steamid-format.zip (11.2 KB, 1168 views)
    File Type: zip steam-group-admins-http-new-steamid-format.zip (11.2 KB, 2264 views)

    Last edited by Mister_Magotchi; 09-08-2014 at 22:30.
    Mister_Magotchi is offline
    psychonic

    BAFFLED
    Join Date: May 2008
    Old 12-19-2010 , 22:56   Re: Steam Group Admins (HTTP Prefetch)
    Reply With Quote #2

    You need to account for groups that have >1000 people. Even the xml version gets paginated.

    The nextPageLink node has the link to the next page if applicable.

    Plus, you're only mapping admin to users when the admin cache is refreshed. Users late-joining won't get admin until map change.

    Last edited by psychonic; 12-19-2010 at 22:59.
    psychonic is offline
    Mister_Magotchi
    SourceMod Donor
    Join Date: Dec 2006
    Location: Nampa, Idaho
    Old 12-19-2010 , 23:10   Re: Steam Group Admins (HTTP Prefetch)
    Reply With Quote #3

    I don't want to account for groups that have > 1000 people. A non-threaded approach really shouldn't be handling that many anyway.

    If a player joins the server any time after this plugin has been loaded and the admin cache has been refreshed (the map has changed or sm_reloadadmins has been run), they will get admin.

    Last edited by Mister_Magotchi; 12-19-2010 at 23:13.
    Mister_Magotchi is offline
    psychonic

    BAFFLED
    Join Date: May 2008
    Old 12-19-2010 , 23:12   Re: Steam Group Admins (HTTP Prefetch)
    Reply With Quote #4

    Quote:
    Originally Posted by Mister_Magotchi View Post
    I don't want to account for groups that have > 1000 people. A non-threaded approach really shouldn't handling that many anyway.
    Then it should be mentioned as a limitation or 'known bug'.

    Quote:
    Originally Posted by Mister_Magotchi View Post
    If a player joins the server any time after this plugin has been loaded and the admin cache has been refreshed (the map has changed or sm_reloadadmins has been run), they will get admin.
    Right. I should have also said " or administrative action" (pending that they had admin without having to wait )
    psychonic is offline
    Mister_Magotchi
    SourceMod Donor
    Join Date: Dec 2006
    Location: Nampa, Idaho
    Old 12-19-2010 , 23:17   Re: Steam Group Admins (HTTP Prefetch)
    Reply With Quote #5

    Thanks for the pointers. I had already done all that in the description I was writing. The reason I posted the thread before finishing the description was that I wanted to put the thread's URL in the "url" thing in the plugin source. Sorry for the confusion. I didn't expect anyone to see that since I was finished in a few more minutes from the initial post.

    By the way (and I was going to ask you in IRC or something, but I didn't want to bug you), if you have any idea what I'm missing on that first "Known Issue" I list, let me know.

    Last edited by Mister_Magotchi; 12-19-2010 at 23:36.
    Mister_Magotchi is offline
    xX Marc Xx
    Junior Member
    Join Date: Mar 2010
    Old 12-30-2010 , 21:36   Re: Steam Group Admins (HTTP Prefetch)
    Reply With Quote #6

    Nice Nice But it is not walk...


    If I want compielen the sp file itself does this error
    fatal error 120: cannot read from file: "socket"


    Plz Can you give me a ready made package for this group

    http://steamcommunity.com/groups/dreist-reserver-slot
    Group ID: 103582791431649758

    end this frags
    Quote:
    "steam_groups"
    {
    "31649758"
    {
    "admin_group_name" "VIPs"
    "flags" "ab"
    "immunity" "0"
    }
    }
    __________________
    =====================================
    >>> SORRY FOR MY BAD BAD ENGLISH <<<


    Last edited by xX Marc Xx; 12-30-2010 at 22:04.
    xX Marc Xx is offline
    Mister_Magotchi
    SourceMod Donor
    Join Date: Dec 2006
    Location: Nampa, Idaho
    Old 12-31-2010 , 02:06   Re: Steam Group Admins (HTTP Prefetch)
    Reply With Quote #7

    Quote:
    Originally Posted by xX Marc Xx View Post
    If I want compielen the sp file itself does this error
    fatal error 120: cannot read from file: "socket"
    Quote:
    Originally Posted by Mister_Magotchi View Post
    This plugin requires the include file for the Socket extension to compile correctly and therefore won't compile in the forums.
    That config file you have looks fine, but the group ID should be 2128350 instead of 31649758. If not, then there's something I don't know about the group numbers. Just use the precompiled binary in the ZIP file, or get the Socket include file and compile it yourself.

    Last edited by Mister_Magotchi; 12-31-2010 at 02:09.
    Mister_Magotchi is offline
    xX Marc Xx
    Junior Member
    Join Date: Mar 2010
    Old 12-31-2010 , 09:35   Re: Steam Group Admins (HTTP Prefetch)
    Reply With Quote #8

    Oh ok the neu

    steam-group-admins-http.txt is

    PHP Code:
    "steam_groups"
    {
      
    "2128350"
      
    {
        
    "admin_group_name" "VIPs"
        "flags" "ab"
        "immunity" "0"
      
    }

    Its ok????
    __________________
    =====================================
    >>> SORRY FOR MY BAD BAD ENGLISH <<<

    xX Marc Xx is offline
    Mister_Magotchi
    SourceMod Donor
    Join Date: Dec 2006
    Location: Nampa, Idaho
    Old 12-31-2010 , 13:48   Re: Steam Group Admins (HTTP Prefetch)
    Reply With Quote #9

    It seems to be fine, but if you're only trying to give the members of that groups reserved slots, you only need the "a" flag.
    Mister_Magotchi is offline
    xX Marc Xx
    Junior Member
    Join Date: Mar 2010
    Old 01-01-2011 , 12:17   Re: Steam Group Admins (HTTP Prefetch)
    Reply With Quote #10

    Englisch

    Oh very nice everything is going perfectly ...

    But please tell me how do you still have the number 2128350 ?????

    Germany

    Oh sehr schön es geht alles perfekt...

    Aber bitte sag mir noch woher hast du die nummer 2128350 ?????

    __________________
    =====================================
    >>> SORRY FOR MY BAD BAD ENGLISH <<<


    Last edited by xX Marc Xx; 01-01-2011 at 16:29.
    xX Marc Xx 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 11:09.


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