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> &lt;<a href="mailto:suptek@apiserv.com">suptek@apiserv.com</a>&gt; 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 &quot;sv_maxclients&quot;
<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>&gt; On Thursday 04 May 2006 12:55, Apiserv SupTek wrote:<br>&gt;<br>
&gt;&gt; Thx all for your answers.<br>&gt;&gt;<br>&gt;&gt; I'm going to create a thread in order to check the cvar of the server<br>&gt;&gt; every minutes, and if cvar is not good, stop it.<br>&gt;&gt;<br>&gt;<br>&gt; use qstat - console server browser!
<br>&gt;<br>&gt; example:<br>&gt; $ qstat -raw '§' -q3s <a href="http://85.14.217.160:28960">85.14.217.160:28960</a><br>&gt; Q3S§85.14.217.160:28960§SkyL!nE War$erver!§mp_toujane§16§0§33§0<br>&gt;<br>&gt; The 5th field of output (value 16)&nbsp;&nbsp;shows the current slot count (if the
<br>&gt; server is not down!)<br>&gt; Note: &quot;§&quot; is the field separator (you need for &quot;cut&quot;) - choose a char<br>&gt; which is not available in a cod2 server name!)<br>&gt;<br>&gt; so use something like this one liner (1) as cron job or endless loop
<br>&gt; and he is not allowed to have more that 16 slots:<br>&gt;<br>&gt; test ! &quot;`qstat -raw &quot;§&quot; -q3s <a href="http://85.14.217.160:28960">85.14.217.160:28960</a> |head -n 1|\<br>&gt; head -n 1|cut -f5 -d§`&quot; -le &quot;16&quot; 2&gt;/dev/null &amp;&amp; KILL_SERVER
<br>&gt;<br>&gt; where KILL_SERVER is your command to kill (restart) the server.<br>&gt; I suggest you to grep all his *.cfg files for &quot;sv_maxclient&quot; lines&nbsp;&nbsp;and<br>&gt; removing them automatically before restarting his server!
<br>&gt; (maybe also writing him a warning email (using &quot;nail&quot; ;)<br>&gt;<br>&gt; cu,<br>&gt; rudi<br>&gt;<br>&gt; (1) my line is not very well tested but should work even if the server<br>&gt; doesnt responds at the moment!
<br>&gt;<br>&gt;<br>&gt;<br><br></blockquote></div><br>