The online racing simulator
The content of the text file is deleted
Hello.

I am using Lapper version 7.0.9.0.

I send the IP address of the players I have banned to a txt file. However, when I close the lapper, throw !reload, and when the server crashes due to ddos ​​and the lapper crashes, the data in the txt file is deleted when I ban a new person.

In short, when Lapper restarts and we ban a new player, the txt file containing the old IP addresses is cleared and the IP address of the last banned player appears.

Is this a lapper bug? I don't know.
I guess reload does reinitilaise the globals, which constructs again userGroup object, thus clearing the previerous hashtable by allocing new empty one, internarly UserGroupToFile function uses addUserFromFile function, which just moves the said hashtable into the file by using overriding method StreamWriter. There's an appending version of this function, by supplying a boolean as a second param to the function, but I've got no idea what would be the further implications of doing so.

Generally got a feeling like this function doesn't serve the purpose you want from it, so propably better to store ban info by opening file stream of your own rather than reusing lapper internals.

Not sure how long will this thread last thought, as I heard they're trying to stop you from using lfsforum.net as replacement of an debbuger Wink But yeah, you've got source, you should check the definition of the potential file-accessing function you invoke yourself to see why things are happening the way they're happening.
This thread is closed

FGED GREDG RDFGDR GSFDG