Check out kkrcon ... maybe you can use it...<br><br><div><span class="gmail_quote">On 5/5/06, <b class="gmail_sendername">Suptek</b> <<a href="mailto:suptek@apiserv.com">suptek@apiserv.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Thx Rüdiger for the commands.<br><br>But I'm using pipes for standart input and ouput, and my servers are<br>controled by softwares written in C.<br>I'm just going to create threads, using pipes to put the "sv_maxclients"
<br>command and read the output pipe to view the value.<br>Then with C I can do all I want ^^<br><br>Thx all<br><br>Cob<br><br>Rüdiger Meier a écrit :<br>> On Thursday 04 May 2006 12:55, Apiserv SupTek wrote:<br>><br>
>> Thx all for your answers.<br>>><br>>> I'm going to create a thread in order to check the cvar of the server<br>>> every minutes, and if cvar is not good, stop it.<br>>><br>><br>> use qstat - console server browser!
<br>><br>> example:<br>> $ qstat -raw '§' -q3s <a href="http://85.14.217.160:28960">85.14.217.160:28960</a><br>> Q3S§85.14.217.160:28960§SkyL!nE War$erver!§mp_toujane§16§0§33§0<br>><br>> The 5th field of output (value 16) shows the current slot count (if the
<br>> server is not down!)<br>> Note: "§" is the field separator (you need for "cut") - choose a char<br>> which is not available in a cod2 server name!)<br>><br>> so use something like this one liner (1) as cron job or endless loop
<br>> and he is not allowed to have more that 16 slots:<br>><br>> test ! "`qstat -raw "§" -q3s <a href="http://85.14.217.160:28960">85.14.217.160:28960</a> |head -n 1|\<br>> head -n 1|cut -f5 -d§`" -le "16" 2>/dev/null && KILL_SERVER
<br>><br>> where KILL_SERVER is your command to kill (restart) the server.<br>> I suggest you to grep all his *.cfg files for "sv_maxclient" lines and<br>> removing them automatically before restarting his server!
<br>> (maybe also writing him a warning email (using "nail" ;)<br>><br>> cu,<br>> rudi<br>><br>> (1) my line is not very well tested but should work even if the server<br>> doesnt responds at the moment!
<br>><br>><br>><br><br></blockquote></div><br>