Raised This Month: $ Target: $400
 0% 

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 02-27-2012 , 14:05   Re: Steam Group Admins (HTTP Prefetch)
    Reply With Quote #1

    This question has been asked before in this thread, but no, I don't believe it's possible to make the plugin do that.

    Here's an example of an XML member list for a Steam group:
    http://steamcommunity.com/gid/103582...listxml/?xml=1

    In that data, there is no separation between the IDs of officers and the IDs of other group members.

    The officers do seem to be listed first, but there is no automatic way, that I know of, to tell how many of the members are officers and how many are not.
    Mister_Magotchi is offline
    minimoney1
    SourceMod Donor
    Join Date: Dec 2010
    Old 03-24-2012 , 16:57   Re: Steam Group Admins (HTTP Prefetch)
    Reply With Quote #2

    Could you upload the Sockets version as well?
    I would rather use it with Sockets rather than cURL, because I run Sockets anyways.
    minimoney1 is offline
    Mister_Magotchi
    SourceMod Donor
    Join Date: Dec 2006
    Location: Nampa, Idaho
    Old 03-24-2012 , 17:03   Re: Steam Group Admins (HTTP Prefetch)
    Reply With Quote #3

    No. That old version was buggy, it caused intermittent server crashes, and I'm not supporting it. I might even have deleted my source of it.

    Also, there's no reason why you can't safely run both. You shouldn't notice any significant performance hit. They only use resources as they're called upon.

    EDIT:
    I found an old copy of it, and I guess I don't see the harm in at least uploading it, so here is version 0.9.0 (the Socket-based, buggy version):
    Attached Files
    File Type: sp Get Plugin or Get Source (steam-group-admins-http.sp - 97 views - 5.2 KB)

    Last edited by Mister_Magotchi; 04-24-2012 at 22:44.
    Mister_Magotchi is offline
    minimoney1
    SourceMod Donor
    Join Date: Dec 2010
    Old 04-24-2012 , 23:52   Re: Steam Group Admins (HTTP Prefetch)
    Reply With Quote #4

    Quote:
    Originally Posted by Mister_Magotchi View Post
    No. That old version was buggy, it caused intermittent server crashes, and I'm not supporting it. I might even have deleted my source of it.

    Also, there's no reason why you can't safely run both. You shouldn't notice any significant performance hit. They only use resources as they're called upon.

    EDIT:
    I found an old copy of it, and I guess I don't see the harm in at least uploading it, so here is version 0.9.0 (the Socket-based, buggy version):
    Thank you for this.
    I ended up using SteamTools and just coded the auth part for that specific plugin I was working on, but I'm sure this will help other people.
    minimoney1 is offline
    Mister_Magotchi
    SourceMod Donor
    Join Date: Dec 2006
    Location: Nampa, Idaho
    Old 04-23-2012 , 20:49   Re: Steam Group Admins (HTTP Prefetch)
    Reply With Quote #5

    Plugin updated:
    Quote:
    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.
    Mister_Magotchi is offline
    Mister_Magotchi
    SourceMod Donor
    Join Date: Dec 2006
    Location: Nampa, Idaho
    Old 04-28-2012 , 22:20   Re: Steam Group Admins (HTTP Prefetch)
    Reply With Quote #6

    Plugin updated:
    Quote:
    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.

    Last edited by Mister_Magotchi; 05-01-2012 at 19:19. Reason: minor typo/logic error
    Mister_Magotchi is offline
    Jоnny
    Senior Member
    Join Date: Jun 2007
    Old 05-01-2012 , 02:34   Re: Steam Group Admins (HTTP Prefetch)
    Reply With Quote #7

    0.9.7
    Quote:
    L 05/01/2012 - 12:27:53: SourceMod error session started
    L 05/01/2012 - 12:27:53: Info (map "c10m1_caves") (file "errors_20120501.log")
    L 05/01/2012 - 12:27:53: [steam-group-admins-http.smx] Error replacing cache with fresh XML content temp. file. Steam Group ID: 1576325
    L 05/01/2012 - 12:27:53: [steam-group-admins-http.smx] Error reading XML data from local cached file for Steam group ID: 1576325.
    L 05/01/2012 - 12:27:53: [steam-group-admins-http.smx] Error replacing cache with fresh XML content temp. file. Steam Group ID: 1853547
    L 05/01/2012 - 12:27:53: [steam-group-admins-http.smx] Error reading XML data from local cached file for Steam group ID: 1853547.
    L 05/01/2012 - 12:27:54: [steam-group-admins-http.smx] Error replacing cache with fresh XML content temp. file. Steam Group ID: 1853547
    L 05/01/2012 - 12:27:54: [steam-group-admins-http.smx] Error reading XML data from local cached file for Steam group ID: 1853547.
    L 05/01/2012 - 12:27:54: [SM] Native "CloseHandle" reported: Handle 0 is invalid (error 4)
    L 05/01/2012 - 12:27:54: [SM] Displaying call stack trace for plugin "steam-group-admins-http.smx":
    L 05/01/2012 - 12:27:54: [SM] [0] Line 105, steam-group-admins-http.sp:nCacheWritten()
    Jоnny is offline
    Mister_Magotchi
    SourceMod Donor
    Join Date: Dec 2006
    Location: Nampa, Idaho
    Old 05-01-2012 , 02:49   Re: Steam Group Admins (HTTP Prefetch)
    Reply With Quote #8

    What all files are then left in addons/sourcemod/data/steam-group-admins-http after you see those errors? What do they roughly contain?

    It appears to me, based on the CloseHandle error, that SourceMod is unable to write to addons/sourcemod/data/steam-group-admins-http/temp.xml .

    Is there anything strange about your file permissions?

    I have this version working on a Linux CS:S server, a Windows Server 2003 TF2 server, and I had it working on both CS:S and TF2 on my home Windows 7 machine.

    Last edited by Mister_Magotchi; 05-01-2012 at 02:49.
    Mister_Magotchi is offline
    Jоnny
    Senior Member
    Join Date: Jun 2007
    Old 05-01-2012 , 03:15   Re: Steam Group Admins (HTTP Prefetch)
    Reply With Quote #9

    Windows Server 2003
    Left 4 Dead 2
    cURL 1.2.0.0 (1.3 wont work)

    left4dead2/addons/sourcemod/data/steam-group-admins-http/temp.xml
    Code:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?><memberList>
    <groupID64>103582791431374955</groupID64>
    <groupDetails>
            <groupName><![CDATA[L4C.Admins]]></groupName>
            <groupURL><![CDATA[L4CA]]></groupURL>
            <headline><![CDATA[]]></headline>
            <summary><![CDATA[No information given.]]></summary>
            <avatarIcon><![CDATA[http://media.steampowered.com/steamcommunity/public/images/avatars/fe/fef49e7fa7e1997310d705b2a6158ff8dc1cdfeb.jpg]]></avatarIcon>
            <avatarMedium><![CDATA[http://media.steampowered.com/steamcommunity/public/images/avatars/fe/fef49e7fa7e1997310d705b2a6158ff8dc1cdfeb_medium.jpg]]></avatarMedium>
            <avatarFull><![CDATA[http://media.steampowered.com/steamcommunity/public/images/avatars/fe/fef49e7fa7e1997310d705b2a6158ff8dc1cdfeb_full.jpg]]></avatarFull>
            <memberCount>7</memberCount>
            <membersInChat>0</membersInChat>
            <membersInGame>2</membersInGame>
            <membersOnline>1</membersOnline>
    </groupDetails>
    <memberCount>7</memberCount>
    <totalPages>1</totalPages>
    <currentPage>1</currentPage>
    <startingMember>0</startingMember>
    <members>
    <steamID64>76561197993799724</steamID64>
    <steamID64>76561198001361766</steamID64>
    <steamID64>76561198029715727</steamID64>
    <steamID64>76561198016886882</steamID64>
    <steamID64>76561198031498488</steamID64>
    <steamID64>76561198021066932</steamID64>
    <steamID64>76561198037275727</steamID64>
    </members>
    </memberList>
    Quote:
    Is there anything strange about your file permissions
    no, full access

    Last edited by Jоnny; 05-01-2012 at 03:16.
    Jоnny is offline
    Mister_Magotchi
    SourceMod Donor
    Join Date: Dec 2006
    Location: Nampa, Idaho
    Old 05-01-2012 , 15:03   Re: Steam Group Admins (HTTP Prefetch)
    Reply With Quote #10

    Is the temp.xml the only contents, then, of that cache folder?

    The first error you were seeing, "Error replacing cache with fresh XML content temp. file.", as I did two operations at once at that point in the code, could mean either than the permanent cache file (like 1576325.xml) existed but couldn't be deleted, or the temp. cache file (temp.xml) couldn't be renamed to the permanent name (like 1576325.xml).

    Basically, on each iteration (each Steam group), cURL grabs the XML for the group, saving it to temp.xml. If it successfully gets some data, it's supposed to delete the old cache file stored for the group (like 1576325.xml), and then rename the temp.xml to that name.

    In your case, cURL is certainly successful in getting data, but there's a problem in that operation, and my main guess is that something I'm not aware of is keeping the temp.xml file locked. If it were a problem deleting the other cache file (like 1576325.xml), then you wouldn't be seeing the second error you were seeing ("Error reading XML data...").

    If you manually try to rename the temp.xml file while the server is running, does Windows allow you to, or is the file locked?
    Mister_Magotchi is offline
    Reply



    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 05:47.


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