This is somewhat niche in use, but currently if a player restarts mafia you have no way to tell if they did so as far as I can tell.
Everything that is written to log seems to be non unique and can be replicated by a command invocation.
The use case for this was kolfix, a script that aims to recover your account when preferences were corrupted.
In that case, I wanted to detect the last logs printed before the client crashed. This is for collecting the preference changes from the start of the day and up to the moment I crashed. I wanted to ignore everything after the crash.
Obviously you need a cutoff so that something like a daily preference isn't inaccurately reset as it had changed when I logged in after the crash. And although you could figure this out from some incidental text... Nothing reliable as far as I can see.
So I was thinking that it could be logged to session logs when the mafia client logs in and out. I don't mean kol log in and out, if you kept mafia running over rollover then it would not log that either. Instead the session log would only note that you never logged in, but you did log out later on.
Another thought on this is simply logging "started writing to session file" and "stopped writing to session file". So if you stayed logged in over rollover, it would both write that to yesterdays file and also to today's file.
Logging when a kol login.php occurs strikes me as somewhat useless. You log in all the time for harmless reasons. From being inactive to trying to get a better ping.
Everything that is written to log seems to be non unique and can be replicated by a command invocation.
The use case for this was kolfix, a script that aims to recover your account when preferences were corrupted.
In that case, I wanted to detect the last logs printed before the client crashed. This is for collecting the preference changes from the start of the day and up to the moment I crashed. I wanted to ignore everything after the crash.
Obviously you need a cutoff so that something like a daily preference isn't inaccurately reset as it had changed when I logged in after the crash. And although you could figure this out from some incidental text... Nothing reliable as far as I can see.
So I was thinking that it could be logged to session logs when the mafia client logs in and out. I don't mean kol log in and out, if you kept mafia running over rollover then it would not log that either. Instead the session log would only note that you never logged in, but you did log out later on.
Another thought on this is simply logging "started writing to session file" and "stopped writing to session file". So if you stayed logged in over rollover, it would both write that to yesterdays file and also to today's file.
Logging when a kol login.php occurs strikes me as somewhat useless. You log in all the time for harmless reasons. From being inactive to trying to get a better ping.