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

HLTV - Need method to detect when client connected to hltv gets disconnected


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
heliumdream
Senior Member
Join Date: Aug 2006
Old 01-02-2022 , 09:13   HLTV - Need method to detect when client connected to hltv gets disconnected
Reply With Quote #1

Server Running HLDS / Counter Strike 1.6: 184.88.194.160:27015
Respective HLTV Server: 184.88.194.160:27020

Trying to get my cs1.6 superhero bot server up on Twitch 24/7.

Using a service manager, the server can restart itself on crash. The amxmodx superhero package we run is less than stable, and prone to crash occasionally.

Respectively, we need a method to detect when the client connected to the hltv server gets disconnected.



We can use some python to query the server, but it cannot query the hltv server...so there is no way to discern when the client connected to the hltv disconnects; only the hltv server is shown as a connected user on the server - the hltv proxy connection hides the client username.
ref: https://github.com/serverstf/python-valve

We found a reconnect script, but it's a method for cs:go reliant on console.log messages that aren't present in 1.6...so we're looking for alternate methods of disconnect detection.
ref: https://github.com/LemuelKL/CSGO-Auto-Reconnect

We might end up throwing in the towel, and just detect map changes, and make the client connect to the server on every map change...but that's not a very dynamic solution.

Another option might be to use a debugger, and catch the disco functions being thrown by the executable. Not super familiar with how to go about doing that tho, would have to learn some things...
__________________
heliumdream is offline
WaLkMaN
Senior Member
Join Date: Oct 2010
Location: Varna, Bulgaria
Old 01-03-2022 , 12:16   Re: HLTV - Need method to detect when client connected to hltv gets disconnected
Reply With Quote #2

The source code of HLTV may help you (not sure).
https://github.com/dreamstalker/rehl...er/rehlds/HLTV
__________________
WaLkMaN is offline
Reply


Thread Tools
Display Modes

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


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