Quote:
Originally Posted by splewis
With regards to the connection times, I pretty much do that. I have a cron job run once a day that does:
Code:
if elapsed_time_days > 1.0 and lastTime > 0 and rating > 1500.0:
rating_loss = 40.0 * elapsed_time_days * (rating - 1500.0) / rating
new_rating = rating - rating_loss
# update rating in database
# update lastTime to current time
I only put this together yesterday, so the 40.0 is a arbitrary constant I might change. Make sure you check if lastTime != 0 since that's the default value. For backwards compatibility it won't be guaranteed to be recorded.
|
Okay, so I just finished adding the rate removal feature, added a variable in the config file to change the constant and made it so the file can only be accessed by the local machine and not any malicious user trying to remove people's points. ATM, I'm just polishing/changing stuff up.