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

How to get server steamid?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Naydef
Senior Member
Join Date: Dec 2015
Location: Doom Town, Nevada
Old 03-19-2016 , 09:38   How to get server steamid?
Reply With Quote #1

What I want is this:
HTML Code:
status
hostname: *secret*
version : 3354470/24 3354470 secure
udp/ip  : 192.168.0.101:27015  (public ip: *secret*)
steamid : [A:1:3304713217:6526] (90100024808696833) //This
account : not logged in  (No account specified)
map     : vsh_farm_feud at: 0 x, 0 y, 0 z
tags    : KLog,arena,friendlyfire,increased_maxplayers,replays,stomp
sourcetv:  port 27020, delay 30.0s
replay  :  recording
players : 10 humans, 2 bots (33 max)
edicts  : 219 used of 2048 max
Someone has an idea how to get it?
__________________
My plugins:
*None for now*


Steam:
naydef
Naydef is offline
gubka
Veteran Member
Join Date: Jan 2012
Location: Russia
Old 03-19-2016 , 10:52   Re: How to get server steamid?
Reply With Quote #2

Hi, in sm you get host name by using this
PHP Code:
FindConVar("hostname"
But I think it is impossible to get steamid of the server without special extension
May be using extension you can hook all server messages, and by using this method try to find string with (steamid)
__________________

Last edited by gubka; 03-19-2016 at 10:52.
gubka is offline
Send a message via ICQ to gubka
Naydef
Senior Member
Join Date: Dec 2015
Location: Doom Town, Nevada
Old 03-19-2016 , 10:57   Re: How to get server steamid?
Reply With Quote #3

I know how to get hostname, I want to get the line with This. Maybe Steamworks, is there some native?
__________________
My plugins:
*None for now*


Steam:
naydef
Naydef is offline
Impact123
Veteran Member
Join Date: Oct 2011
Location: Germany
Old 03-19-2016 , 11:11   Re: How to get server steamid?
Reply With Quote #4

You could try ServerCommandEx and extract it from the buffer. What do you need the server's steamid for? Maybe there are better ways to achieve what you're trying to do.
__________________

Last edited by Impact123; 03-19-2016 at 11:14.
Impact123 is offline
Naydef
Senior Member
Join Date: Dec 2015
Location: Doom Town, Nevada
Old 03-19-2016 , 11:26   Re: How to get server steamid?
Reply With Quote #5

Quote:
Originally Posted by Impact123 View Post
You could try ServerCommandEx and extract it from the buffer. What do you need the server's steamid for? Maybe there are better ways to achieve what you're trying to do.
Trying to modify the "status" command. For Admin Stealth REDUX plugin. Will try this way, but I'm aware this is too CPU expensive(even in public OnPluginStart()). If someone has another idea, post it please
__________________
My plugins:
*None for now*


Steam:
naydef

Last edited by Naydef; 03-19-2016 at 12:25.
Naydef is offline
DarkDeviL
SourceMod Moderator
Join Date: Apr 2012
Old 03-19-2016 , 14:49   Re: How to get server steamid?
Reply With Quote #6

Quote:
Originally Posted by Naydef View Post
Trying to modify the "status" command. For Admin Stealth REDUX plugin. Will try this way, but I'm aware this is too CPU expensive(even in public OnPluginStart()).
This one seems to be the only way at the moment, by parsing the output of the status command.

Should however be easy to do using the regex extension.

Quote:
Originally Posted by Naydef View Post
If someone has another idea, post it please
Bump Bug 6404, or submit a patch towards SourceMod.

Above "request" on the bug tracker was added after it was discussed in the SteamWorks thread, where it ended up in that it would be better to add directly to SourceMod if there was a real need for that kind of functionality.
__________________
Mostly known as "DarkDeviL".

Dropbox FastDL: Public folder will no longer work after March 15, 2017!
For more info, see the [SRCDS Thread], or the [HLDS Thread].
DarkDeviL is offline
Naydef
Senior Member
Join Date: Dec 2015
Location: Doom Town, Nevada
Old 03-19-2016 , 16:04   Re: How to get server steamid?
Reply With Quote #7

I don't know how to work with regular expressions. Someone example(or the full code, please)?
__________________
My plugins:
*None for now*


Steam:
naydef
Naydef 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 07:17.


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