So I've been doing quite a lot of debugging recently, and thought of some logging that should be pretty easy to implement, but also very helpful.
The idea here is that every time someone changes race, it simply writes a line to a log file. Also, when the server first starts, the plugin writes a line to the file. This would allow you to see the last few races chosen before a server crash. An example might look something like:
L 11/09/2012 - 22:17:40: [SM] - Changerace log session started (Server Start)
L 11/09/2012 - 22:17:43: [SM] - Player: [player1] changed race to - human - while - ALIVE -
L 11/09/2012 - 22:20:30: [SM] - Player: [player2] changed race to - undead - while - DEAD -
L 11/09/2012 - 23:17:40: [SM] - Changerace log session started (Server Start)
L 11/09/2012 - 23:18:40: [SM] - Player: [player3] changed race to - orc - while - ALIVE -
The above result would suggest to me that either human or undead where the cause of the server crash, making it much easier to troubleshoot.
Thoughts? I don't really know enough about the inner workings of the mod yet to code this myself, but it would seem to be reasonably straight forward to me (just add another line into where ever the changerace control happens that checks for a log cvar and appends to the log file if it's enabled, and a line when the plugin is first loaded to add the session start line)




Logged





DarkEnergy