[cod] COD2 / Blocking sv_maxclients ?

Walker walkertje at gmail.com
Fri May 5 18:50:51 EDT 2006


Check out kkrcon ... maybe you can use it...

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


More information about the Cod mailing list