summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--npc/003-3/malindou.txt8
1 files changed, 7 insertions, 1 deletions
diff --git a/npc/003-3/malindou.txt b/npc/003-3/malindou.txt
index f3035f40c..2115bd3f8 100644
--- a/npc/003-3/malindou.txt
+++ b/npc/003-3/malindou.txt
@@ -1035,7 +1035,13 @@ OnInit:
OnClock0500:
if (gettime(GETTIME_DAYOFMONTH) >= 7)
query_sql("DELETE FROM `chatlog` WHERE `time` < '"+sqldate(-7)+"'");
- query_sql("DELETE FROM `picklog` WHERE `time` < '"+sqldate(0, -1)+"'");
+ // Flush picklog
+ if ($@HAS_API) {
+ query_sql("DELETE FROM `picklog` WHERE `time` < '"+sqldate(0, -1)+"'");
+ } else {
+ apiasync("SQL", "DELETE FROM `picklog` WHERE `time` < '"+sqldate(0, -1)+"'");
+ apiasync("SQLRUN", "");
+ }
// TODO: Have crontab make monthly .gz backup?
// Remove overhead from picklog
if (gettime(GETTIME_DAYOFMONTH) == 14)