fix: player auto-deletion after a set period of time now works

It only deleted player from the users table. Now, it deletes everything,
so basically clears everything up.
This commit is contained in:
Martin Ambrus
2017-10-28 20:52:15 +02:00
parent e8e0cc89d3
commit 4da72fb9b9
+3 -2
View File
@@ -470,8 +470,9 @@ class Automation {
private function ClearUser() {
global $database;
if(AUTO_DEL_INACTIVE) {
$time = time()+UN_ACT_TIME;
$q = "DELETE from ".TB_PREFIX."users where timestamp >= $time and act != ''";
$time = time()-UN_ACT_TIME;
$q = "INSERT INTO ".TB_PREFIX."deleting SELECT id, UNIX_TIMESTAMP() FROM ".TB_PREFIX."users WHERE timestamp < $time AND tribe IN(1,2,3)";
$database->query($q);
}
}