Thank you very much for implementing this. I hope this gets implemented in the other Valve srcds games too.

I've got a host with two IPs and eleven srcds games that could all potentially be running at the same time.

So, I tested by copying one of my TF2 server directories to make a clone of it, started up the first one, then started up the clone.

Here's what the ports in my config file looks like;
CLIENTPORT="27013"
HOSTPORT="27113"
TVPORT="27213"
STEAMPORT="26013"
REPLAYPORT="27413"

The default behavior was that the clone clobbered the next positive incremental available port.

This was on the console;

WARNING: Port 27113 was unavailable - bound to port 27114 instead
WARNING: Port 27013 was unavailable - bound to port 27014 instead
WARNING: Port 27213 was unavailable - bound to port 27214 instead
WARNING: Port 27413 was unavailable - bound to port 27414 instead
Network: IP 66.113.99.100, mode MP, dedicated Yes, ports 27114 SV / 27014 CL

Verified with lsof.



When I added the "-strictportbind" argument to the command, it did indeed bail out and this was on the console;

ERROR: Port 27113 was unavailable - quitting due to "-strictportbind" command-line flag!

"echo $?" returned exit code 100 from srcds_run. As someone else mentioned, exit codes are great for those of us who have written control wrappers.

The command line used was;

sudo -H -u hlds sh -c cd /home/hlds/srcds-servers/server-tf2-JMOMOTEST/orangebox ; /home/hlds/srcds-servers/server-tf2-JMOMOTEST2/orangebox/srcds_run -game tf -ip 10.10.99.100 +clientport 27013 +hostport 27113 +tv_port 27213 -steamport 26013 +replay_port 27413 -strictportbind -norestart -pidfile /home/hlds/srcds-servers/server-tf2-JMOMOTEST/server.pid -maxplayers 24 +map pl_goldrush

One thing to note is that I had to stty sane/reset my terminal after it failed because local echo was messed up. It's not like I normally run it interactively anyway, but that could annoy some noob.



Steven Hartland wrote:
Thanks Jon, just what the doctor ordered :)

----- Original Message ----- From: "Jon Lippincott"
<[email protected]>


Good idea.

I added a check for "-strictportbind." Without this, the engine will
print a warning, otherwise it will print an error and quit.


================================================
This e.mail is private and confidential between Multiplay (UK) Ltd. and
the person or entity to whom it is addressed. In the event of
misdirection, the recipient is prohibited from using, copying, printing
or otherwise disseminating it or any information contained in it.
In the event of misdirection, illegible or incomplete transmission
please telephone +44 845 868 1337
or return the E.mail to [email protected].


_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives,
please visit:
http://list.valvesoftware.com/mailman/listinfo/hlds_linux

--
# Jesse Molina
# Mail = [email protected]
# Page = [email protected]
# Cell = 1.602.323.7608
# Web  = http://www.opendreams.net/jesse/



_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlds_linux

Reply via email to