The online racing simulator
Life cycle of the ban file
(7 posts, started )
Life cycle of the ban file
When is the ban file read and/or updated by the server? I cannot find any info.

I have written an app to admin the ban files on our servers and want to combine and clean them into one file then redistribute amongst the servers.

Questions:
1. Are the ban files only read upon lfs server restart, or does lfs actively watch the directory for file changes?
2. Does the server update the ban file on the fly as someone is banned or is there some batch processing aka update on shutdown?

My biggest fear is sync'ing and corrupting the ban files and losing them during an update cycle or reading a not fully updated one and therefore not actually banning someone.

[CD] Hex
#2 - SamH
New bans, set in the server, are written to file immediately. The ban file is refreshed in memory at that point. If you edit a ban file externally that is being used by a live server, the server will re-read the file *at some point*. Not sure what the timeframe is now. Previously, the ban file was refreshed from file on every new connection but this caused unacceptable lag on the server and so that routine was changed. The maximum number of bans that could be stored was also increased, at that time, from (IIRC) 88 to 400.

If you add new bans to the bans.ban file externally, the ban will not affect any drivers currently in the server. You will need to kick the player. That's as much info as I can give you. HTH.

Are you running multiple different versions of LFS? It's much easier to run multiple instances of LFS in the same directory. This means that ban files and other files are shared across all your servers. Ban in one, ban in all. No coding necessary.

start LFS.exe /config=configfile1.txt
start LFS.exe /config=configfile2.txt
Quote :Are you running multiple different versions of LFS? It's much easier to run multiple instances of LFS in the same directory. This means that ban files and other files are shared across all your servers. Ban in one, ban in all. No coding necessary.

start LFS.exe /config=configfile1.txt
start LFS.exe /config=configfile2.txt

Wow, quick response, thx.

Hmm, will have to check how we are configed, very glad you brought that up. Still need to code for other admin purposes.

[CD] Hex <<< banging head on table while trying to rethink strategy.
There are no locking issues with having multiple processes access the ban file?
From general file streams alone i know that if a stream is open and not been closed it wont let another process access it. As long as you close the stream it should be ok.
I should have been more specific:

If one lfs server has opened the file for writing and is updating it, and another lfs server opens for reading, will the second server block on the call or does it just ignore it and try again later? I don't want to impact the performance, although I don't think the block would last for more than a few ms.

Will try and see what happens, then grab a sledge hammer if necessary.
#7 - SamH
I've never noticed it be an issue. We have, IIRC, 8 fairly busy servers all launched from the same dedi install, talking to the same ban file. Mind you, we don't ban people very often. I think you'd have to be banning people at an extreme rate to actually trigger a permissions/access issue.

Life cycle of the ban file
(7 posts, started )
FGED GREDG RDFGDR GSFDG