In all the complexity, this plugin invites (by using rcon) HLTV to server, when first player connects. And when last player leaves, disconnects (by using RCON again) HLTV from server.
Useful? Not much, since that is pretty same if you server is idling alone or with HLTV. Only purpose for this plugin comes that one server operator complained that HLTV should not record (he is using HLTV to record all events on server. He has a-lot-of-waste-diskspace to use) when server is empty. And this plugin accomplish it. (Yes, we _do_ know that empty records does not use much space, but it's more about looking pr0fe3ssi0n4l.)
Obiously, plugin needs to know couple of things:
rq_hltv_ip // Defines HLTV ip address
rq_hltv_port // Defines HLTV port
rq_hltv_rcon // Defines HLTV adminpassword (HLTV uses adminpassword as rconpassword replacement)
ip // Should be already set. But tells HLTV your IP so it can connect to right server.
port // Definetly set. Tells HLTV your server port to connect.
rq_hltv_disdelay // Optional. Wait N sec after last player leaves before disconnectin HLTV
Uses code from redmist example code
, which was 99% actually of tackling this.
And it has been tested briefly, but _not_ on production servers yet, so problems may occur.
(Latest version could be found at http://svn.rautakuu.org/repos/hlds/c...ltv_invite.sma