Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

Commit

Permalink
fix: AutoPurge LVLBase table problems
Browse files Browse the repository at this point in the history
  • Loading branch information
K4ryuu committed Mar 26, 2024
1 parent cbfbf52 commit c5755b7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
- feat: Add proper MySQL error logging to keep track of queries
- fix: Save query problems at some table, which block full save mechanism
- fix: Point modifications show new poont instead of old (#155)
- fix: AutPurge - LVLBase wrong column name to check date
- fix: AutoPurge - LVLBase error if module not used

-- 2023.03.25 - V4.0.2

Expand Down
7 changes: 5 additions & 2 deletions K4-System/src/Plugin/PluginStock.cs
Original file line number Diff line number Diff line change
Expand Up @@ -571,8 +571,11 @@ await Database.Instance.ExecuteWithTransactionAsync(async (connection, transacti
query = $@"DELETE FROM `{this.Config.DatabaseSettings.TablePrefix}k4ranks` WHERE `lastseen` < NOW() - INTERVAL @days DAY;";
await Database.Instance.ExecuteNonQueryAsync(query, parameters);
query = $@"DELETE FROM `{Config.DatabaseSettings.LvLRanksTableName}` WHERE `last_seen_unix_time` < UNIX_TIMESTAMP(NOW() - INTERVAL @days DAY);";
await Database.Instance.ExecuteNonQueryAsync(query, parameters);
if (Config.GeneralSettings.LevelRanksCompatibility)
{
query = $@"DELETE FROM `{Config.DatabaseSettings.LvLRanksTableName}` WHERE `lastconnect` < UNIX_TIMESTAMP(NOW() - INTERVAL @days DAY);";
await Database.Instance.ExecuteNonQueryAsync(query, parameters);
}
});
}

Expand Down

0 comments on commit c5755b7

Please sign in to comment.