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

Help checking if an SteamId has admin rights


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
joao7yt
Senior Member
Join Date: Nov 2014
Location: Brazil
Old 08-23-2017 , 17:33   Help checking if an SteamId has admin rights
Reply With Quote #1

Does someone know if it's possible to check if an SteamId is an admin, not the client, the SteamId, in other words, I need to check if an SteamId is admin with the player offline.

I'm using PTaH extension (which makes possible getting the SteamId2 of the client before he connects) and I need to check if that SteamId has admin rights. The problem is that the client in that point doesn't have an index, so I can't use "CheckCommandAccess".

I mean, the SteamIds in admins_simple.ini should be stored somewhere, how can I access them? Or can I just parse that file and get the SteamIds by myself?
joao7yt is offline
Fyren
FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren
Join Date: Feb 2106
Old 08-23-2017 , 18:01   Re: Help checking if an SteamId has admin rights
Reply With Quote #2

You want FindAdminByIdentity. The auth types have defines somewhere in admin.inc you should use.

Whatever you get from PTaH ahead of time can be faked if a client is malicious.
Fyren is offline
joao7yt
Senior Member
Join Date: Nov 2014
Location: Brazil
Old 08-23-2017 , 18:08   Re: Help checking if an SteamId has admin rights
Reply With Quote #3

Quote:
Originally Posted by Fyren View Post
You want FindAdminByIdentity. The auth types have defines somewhere in admin.inc you should use.

Whatever you get from PTaH ahead of time can be faked if a client is malicious.
cool, tks, but isn't PTaH as safe as this? I found PTaH here, thought it was safe.

Last edited by joao7yt; 08-23-2017 at 18:08.
joao7yt is offline
Fyren
FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren
Join Date: Feb 2106
Old 08-23-2017 , 19:30   Re: Help checking if an SteamId has admin rights
Reply With Quote #4

It doesn't look like PTaH attempts to do any verification, no. Depending on what you're doing, you may not care since the server will probably eventually kick a client trying to fake his Steam ID after it can't be verified with Steam.
Fyren is offline
joao7yt
Senior Member
Join Date: Nov 2014
Location: Brazil
Old 08-23-2017 , 20:05   Re: Help checking if an SteamId has admin rights
Reply With Quote #5

Quote:
Originally Posted by Fyren View Post
It doesn't look like PTaH attempts to do any verification, no. Depending on what you're doing, you may not care since the server will probably eventually kick a client trying to fake his Steam ID after it can't be verified with Steam.
tks. I made 2 verifications on my code, tho, to prevent it, i verified using the extension and also inside "OnClientAuthorized", where I get the true steamid and do:
PHP Code:
if (FindAdminByIdentity("steam"auth) == INVALID_ADMIN_ID)
{
    
KickClient(client"");


Last edited by joao7yt; 08-23-2017 at 20:05.
joao7yt 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 19:25.


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