Is it possible to let OpenTTD create a log file with information who joined the server at what time? I can't always be online, but sometimes I want to know who was online and messed up a multiplayer game so I can ban his/her IP. I know there is the autopilot, but I couldn't find if this was possible. If this is impossible at this moment, is it difficult to create? Perhaps some server-admins with programming skills can make some patch that eventually gets in the trunk.
Autopilot already saves the game at every join, so it shouldn't be too hard to extend it to write a logfile for joins. Quits may be more difficult, though.
Look around to see if the chat is loggable; that may also give you the desired information.
DaleStan wrote:Autopilot already saves the game at every join, so it shouldn't be too hard to extend it to write a logfile for joins. Quits may be more difficult, though.
Look around to see if the chat is loggable; that may also give you the desired information.
A save at every join? If you have a busy server and a 1024x1024 map, the OpenTTD folder would be 100's of MB's after a few days! Not really an option IMHO...
Grolsch wrote:A save at every join? If you have a busy server and a 1024x1024 map, the OpenTTD folder would be 100's of MB's after a few days! Not really an option IMHO...
It might be the same file every time. The point is so that you can roll back to just before a griefer actually got around to causing any grief, so anything older than a few hours probably isn't very useful any more.
XeryusTC wrote:Autopilot has a log function, just give it mysql access and it will start logging, or well, it should start logging.
Too bad my mysql-skills are bad, to put it mildly However I do already have a webserver with sql running which logs visitors of my website. This was made by a friend who does have some programming skills. Is there a way to connect these two? Or some kind of manual or helpfile that could help me on the way?
echo "Starting server"
script openttd.log
net_frame_freq = 1
set name "My Server"
If we then save the above script as on_dedicated.scr, it will be run whenever a dedicated server is started, and do the following:
* It will Print "Starting Server" in the console window
* It will begin logging the non-debuging output from the console window to openttd.log
* net_frame_freq will be set to 1
* The server name will be set to "My Server"
BTW why the command to log console output to file is called "script". It seems to be quite unintuitive. I expected to have it name like "log" or "logfile" or "consolelog" or something like that ... not "script" ...
If you need something, do it yourself or it will be never done.
Well, I tried that just now, but the file stays 0kB (no text in it).
However your link is interesting. I'm trying some scripting now, but how do I send a message to the player currently connecting to my server? If I use the "say" command, everybody sees it. If I use "say_client" it obviously needs a client-id. Anybody?
Yes, it is offtopic... But my other question still stands