View Single Post
psychonic

BAFFLED
Join Date: May 2008
Old 12-16-2010 , 06:54   Re: Steam Group Admins
Reply With Quote #30

Quote:
Originally Posted by Mister_Magotchi View Post
Would this type of approach be feasible?:
  1. Get the Steam group's XML member list via HTTP (and the Sockets extension) at the beginning of each map or on sm_reloadadmins.
  2. Convert the steamID64 numbers to normal Steam IDs by reversing the following formula:
    <steamID64> = 76561197960265728 + <3rd_number_of_steam_id> * 2 + <2nd_number_of_steam_id>
    For example, my Steam ID is STEAM_0:1:2081478.
    My steamID64 is therefore 76561197960265728 + 2081478 * 2 + 1, or 76561197964428685
  3. Give them the appropriate permissions based on the the settings for the group and store it in the admin cache like admin-sql-prefetch does.

When I said I was thinking about making this plugin, I was actually planning on going with that route. This would avoid the asynchronous nature of the SteamTools/SteamWorks API and would also allow the plugin to work on any game supported by SourceMod, not just OrangeBox games. I'm not saying you need to develop this, but I'm curious as to your opinion on that plan.
I have no plans to take that approach. It sounds like a mess (not to mention up to 64 non-threads queries in a frame during a map change, and the fact that some groups are huuuuge).

I won't be put off though if you'd like to make your own plugin, based off this or from scratch, attempting to utilize the above method.
psychonic is offline