View Single Post
KorDen
Member
Join Date: Sep 2012
Old 11-28-2013 , 10:50   Re: [ANY] SteamWorks
Reply With Quote #18

Quote:
Originally Posted by KyleS View Post
I believe this was the case with really old games. Newer games are independent, as far as I'm aware; I'm not very aware.
Tested: copied server to the PC without Steam - see random garbage. Installed Steam, updated it and close - see real ID. Uninstalled Steam - grabage. Downloaded and updated SteamCMD - garbage. Copied files from SDK - real ID

Attached MSVC10 project files. Using environment variables HL2SDK and STEAMWORKS_SDK, other paths are relative to sourcemod/extensions folder. It's enough for compile.

Also, here is simple fix for SB plugin (add this to the end of sourcebans.sp) that will just check if the user using Family sharing and if the owner banned.
PHP Code:
#include <SteamWorks>
public SW_OnValidateClient(OwnerSteamIDClientSteamID)
{
    if(
OwnerSteamID && OwnerSteamID!=ClientSteamID)
    {
        new 
tmp;
        for(new 
1<= MaxClientsi++)
        {
            if(
IsClientConnected(i))
            {
                
tmp GetSteamAccountID(i);
                if(
tmp && tmp == ClientSteamID)
                {
                    
decl String:steamid[32];
                    
Format(steamidsizeof(steamid),"STEAM_0:%d:%d", (OwnerSteamID 1), (OwnerSteamID >> 1));
                    
LogMessage("[SB] Checking FamilySharing user %L Owner: %s (OSID: %d, CSID: %d)",i,steamid,OwnerSteamID,ClientSteamID);
                    
OnClientAuthorized(i,steamid);
                    break;
                }
            }
        }
    }

The only problem with this fix is that if OwnerID banned, than query in VerifyBan function that insert info into banlogs table will fail, because this ID will not be in banlist. I think that I need to modify VerifyBan query to select not only bid, but authid too.. I will try to realize it later.
Also, later I will try to modify banning system to ban only owner SteamID.
Attached Files
File Type: zip msvc10.zip (3.4 KB, 532 views)

Last edited by KorDen; 11-30-2013 at 15:53.
KorDen is offline