jpcsupplies / Economy_mod

Basic Economy System for Space Engineers
13 stars 12 forks source link

Seen Command, Timestamp and Balance integrity #5

Closed jpcsupplies closed 8 years ago

jpcsupplies commented 9 years ago

along with uid and balance, a timestamp should also be recorded in the balance file.

this timestamp is also used to prevent players with 0 balance accidentally being given another "default balance" if we have not allowed for this already when adding new players to the balance file (actually the way file works now this shouldn't happen now anyway)

this time stamp should be added/updated every time someone uses an economy command - although it could also be updated on QUIT too - it should only update if they already HAVE a bank balance so as to not conflict with our database minimization strategy.

A seen command that displays this timestamp would also be useful.

jpcsupplies commented 9 years ago

Looking at the /bal code we need to make it update the timestamp if there is already a balance too

jpcsupplies commented 9 years ago

Have a working seen command now, just need to add in some quick code so that the timestamp updates on execution of any other command.

Is there any obvious way to catch a quit event too? That would be the better place to catch a timestamp.

midspace commented 9 years ago

I've standardized the Seen update in https://github.com/jpcsupplies/Economy_mod/commit/15cc91a5254ffa033359c463ee2937748ffd94c1

It does not check the balance though. I'm thinking it might be backwards if we don't update the date seen if they have no balance. They might have just sold something, and are waiting on the dough.

jpcsupplies commented 9 years ago

hmm well the idea is to keep the database size small, any player not using the economy isnt in the database, to avoid revolving door noobs who join for 5 seconds and never return getting a balance, although from a practical sense catching the quit event for a timestamp is intiutve to what people expect a seen command to do :/

midspace commented 9 years ago

Perhaps adding FirstSeen or DateJoined, so we know how long they have been active for.

jpcsupplies commented 9 years ago

sort of like an account opened date ? that could work, could even display it in the /accounts command output

jpcsupplies commented 8 years ago

Added seen date to accounts command. pretty much everything we can do here is done i think