On Wed, 2 May 2007, Ike Australien wrote:

> could you maybe provide the script that you are using in order to sync the
> bans?

This is written directly from my head and is untested. But I think it
should work.

-- snip --

#!/bin/sh

banfiles="/path/to/server1/cstrike/cfg/banned_user.cfg 
/path/to/server2/cstrike/cfg/banned_user.cfg"
globalfile="/path/to/common/globalban.cfg"

cat $banfiles $globalfile | sed 's/^M//g' | sort -u > /var/tmp/temp
mv /var/tmp/temp $globalfile

-- snap --

NOTE: ^M should be added with ctrl+v+m in vi. If we dont use sed to get
rid of windows new line, we might get duplicates.


cd cstrike/cfg
ln -s /path/to/common/globalban.cfg globalban.cfg

echo "exec globalban.cfg" >> cstrike/cfg/server.cfg
echo "writeid" >> cstrike/cfg/server.cfg

run from cron every 5 minutes.

/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