Posted November 24, 2017 (edited) Hello everyone! Recently we had the need to query our database for inactive players and the corresponding deeds. To make this task easily accessible without the need of database knowledge, I wrote this small handy mod to help with that. You can configure the minimum days of inactivity in the properties file. You can also disable the mod in the properties file by setting the "active" property to false instead of the default true. What this mod does is essentially a lookup in the database for which players are inactive for the minimum amount of days configured and then dumping the information into a formatted textfile in the server root folder. If the mod is set to inactive, it will clean up after itself and delete the textfile from the server root folder if it exists. It will never, at any point, write anything to the database. It just performs a safe lookup through the wurmplayers.db and wurmzones.db The collected informations are: Name of the player Total days played (if 0 the player has just played less than 24 hours) Total days inactive Name of the deed the player is the mayor of Download from Github: https://github.com/Jhary/InactivePlayerMod/releases Usage: Download the mod Unzip the contents of the zip file into your server mods folder Make sure its active in the properties file and set the inactiveDays property to a value of your liking Run the server .... Profit (you will find the output file in the server root folder) The mod does collect the data on serverstart. Please report any bugs you may encounter. I hope it helps some of you people Source code can be found on its Github Repository Known problems: fixed As long as the mod is active, its currently not possible to login. Your database will not be harmed by this. I am investigating the issue currently. Edited December 6, 2017 by Arduin 3 Share this post Link to post Share on other sites
Posted December 3, 2017 (edited) I am pretty sure this corrupted my player database. Can't imagine what else would have done it. Scratch that. I removed it and I was finally able to log in. No character loss. Edited December 3, 2017 by Crustyfoot 1 Share this post Link to post Share on other sites
Posted December 4, 2017 17 hours ago, Crustyfoot said: I am pretty sure this corrupted my player database. Can't imagine what else would have done it. Scratch that. I removed it and I was finally able to log in. No character loss. So is this a working mod or not? Share this post Link to post Share on other sites
Posted December 4, 2017 I have not retried it. When I did try it I could not log in. Results may vary for other people. Share this post Link to post Share on other sites
Posted December 5, 2017 (edited) I will have a deeper look at it. It seems weird, since I am just performing a simple lookup. Literally just two "select statements" and thats it. Also closing all database connections afterwards. Ok thats really wonky. I updated the post to state that you should stop the server and deactivate the mod again after you got the datadump. I am currently investigating why you can't login as long as the mod is active. Thanks for pointing that out. Your database will not be harmed by this in any way. I pushed a new version to the github that does not delete the output file anymore if the mod is set to inactive in the config file. Found the error. Its fixed now. I closed the database connections. Thats normal practice, but the server seems to never check if the connection is open, it just opens it on startup. Soo yeah I shut the server out of its own database.. lol ^^. All is fine now and works as intended New release Edited December 5, 2017 by Arduin 2 Share this post Link to post Share on other sites
Posted December 6, 2017 This game is almost entirely "in memory", nothing is saved to disk on a regular or real-time basis. The game dumps everything to disk on shutdown, so any changes (database or otherwise) have to be applied or queried after shutting down the server. Share this post Link to post Share on other sites
Posted December 6, 2017 6 minutes ago, Ricowan said: This game is almost entirely "in memory", nothing is saved to disk on a regular or real-time basis. The game dumps everything to disk on shutdown, so any changes (database or otherwise) have to be applied or queried after shutting down the server. Thats known, because this the mod is creating the textfile with the server(re)start. Eject 1 Share this post Link to post Share on other sites
Posted December 8, 2017 Nice mod! I enjoy sharing as much info as I can with players 1 Share this post Link to post Share on other sites
Posted December 9, 2017 If you got other ideas that involve analyzing data from all the wurm databases, let me know. I am currently considering to rewrite the mod so it is an action category on the ebony wand. And you can then choose between different things. The only issue I got currently is if I add more than one entry to that "category" it is shown at the "root" of the ebony wand. For example I then got : ebony wand - ... different actions - DBTools //my category - - inactive players - economy statistics //another action I am working on If someone with more knowledge on action "categories" reads that and wants to help out, please send me a PM As far as I know Wurm does not only save all the data to the databases on server shutdown. There is different "batch jobs" that write stuff to the db at runtime. So it should be usable with somewhat more up to date data. The "worst" case would be its a state from the last shutdown. 1 Share this post Link to post Share on other sites