Posts: 280
Threads: 62
Joined: Aug 2014
Reputation:
0
hey how can i read my logs in the ban.txt file by /logs and put them in a dialog?
Posts: 10,066
Threads: 38
Joined: Sep 2007
Reputation:
0
Assuming that logs are appended to the end of the file (rather than prepended to the beginning of the file) this is completely impractical. Sequential files must be read top-to-bottom and if the file is big it may cause severe lag.
It may work if new lines are prepended to the beginning. That will create the log in reverse order (newest first). You should be able to open the file with io_append. Then move the cursor to the beginning of the file (fseek) before writing.