Yes, that should work. CS2D checks the modification date of bans.lst every 5 seconds and reloads it if has been changed outside of CS2D. At least that's what I see in the code. Not sure if it's really working
Quote
How will that affect the server?
It should do what you would expect: The bans you added to the file should be loaded (if formatted correctly).
Quote
Is the file change detection reliable enough?
There shouldn't be any problems with that. It's important that the program you use to manipulate the file also changes the modification time of the file properly (which is pretty standard).
Quote
Are there any risks of dataloss?
Yes, there are risks. They aren't huge but they exist.
The check & reload is only done every 5 seconds. If a ban/unban is performed in CS2D shortly after you modified the file, CS2D might overwrite your changes and they will get lost.
Also if CS2D tries to write bans.lst while you are manipulating the file it will fail to save the changes. If CS2D is then quit or crashes you will lose those bans which could not be written. Note however that CS2D keeps bans in memory and will try to write all bans whenever a ban is added or removed.
Quote
Does the order and formatting matter to CS2D?
Order doesn't really matter. Formatting does. bans.lst is basically parsed like commands in the console but only single lines starting with "banip", "banname", "banusgn" and "bansteam" are supported. Empty lines and lines starting with "//" are ignored.
Be careful! CS2D isn't really verbose at that point. So if you add something to the file like "ban whatever 123" it will probably just be ignored without any error message. So make sure to add your bans correctly without typos.