On Thu, 2 Feb 2006, Erik Hollensbe wrote:

>
> On Feb 2, 2006, at 1:25 AM, Matthew Cheale wrote:
>
> > As our system runs several servers from one install they're sharing
> > ban files
> > when on the same machine.  As servercfgfile and motdfile are there
> > for the
> > purpose of this setup, either I'm missing something or is there no
> > banfile cvar?
> >  If not, is it on the or can we get it added to the wanted list?
>
> Well, in the meantime you can always use a symbolic link.

The problem with that way is that the banfile will be inconsistance. It
will not work properly

Scenario:
You ban someone on server1
> banid 0 steam_0:1:2 kick; writeid
server1 will write all bans from memory to banned_user.cfg (banned.cfg on
hlds)

until server2 changes map it will not know about the ban.

You then ban someone on server2
> banid 0 steam_1:2:3 kick; writeid
server2 will write down everything it has in its memory. ie: it overwrite
what server1 just have banned.

I have written a script to work around it.

(This is a summary of the script that does the global ban thing. The
actual script is a little more complex than this)

---- snip ----
#!/usr/local/bin/bash
DIRS="css1 css2 css3 css4"
OUTPUTFILE=pvp_banned.cfg
cd /games/common

# Go through all the dirs
for i in $DIRS
do
        cat /games/${i}/cstrike/cfg/banned_user.cfg >> /tmp/tempbans
done

# sort out a make the entries unique
cat /tmp/tempbans | sed 's/^M//g' | sort -u > /games/common/$OUTPUTFILE

# remove the tempfile
rm /tmp/tempbans
---- snap ----

in each instance of the directory you have a link to the pvp_banned.cfg

cd /games/css1/cstrike/cfg
ln -s /games/common/pvp_banned.cfg

in the bottom of server.cfg I have:
exec pvp_banned.cfg
writeid

This will work, but you need to be careful when you unban. If its not done
properly the ban can reapear again.

/Bjorn

_______________________________________________
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