diff options
author | Jesusaves <cpntb1@ymail.com> | 2021-02-14 17:03:52 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2021-02-14 17:03:52 -0300 |
commit | 6cd4c2de5c12b9c83f718d33e2e00e2b6a88bcfa (patch) | |
tree | cb9543b5eab70c957eb8d044bcb02f9dbf2a1918 /npc/functions/util.txt | |
parent | 6cb742fd7cfdc7e8207a001294de33d828a69b52 (diff) | |
download | serverdata-6cd4c2de5c12b9c83f718d33e2e00e2b6a88bcfa.tar.gz serverdata-6cd4c2de5c12b9c83f718d33e2e00e2b6a88bcfa.tar.bz2 serverdata-6cd4c2de5c12b9c83f718d33e2e00e2b6a88bcfa.tar.xz serverdata-6cd4c2de5c12b9c83f718d33e2e00e2b6a88bcfa.zip |
Keep chatlogs for only one week, implement auto deletion policy in server.
This imposes over forks as well instead of being cron-reliant
Diffstat (limited to 'npc/functions/util.txt')
-rw-r--r-- | npc/functions/util.txt | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/npc/functions/util.txt b/npc/functions/util.txt index 721789f78..5afbdbce1 100644 --- a/npc/functions/util.txt +++ b/npc/functions/util.txt @@ -1144,9 +1144,11 @@ function script numdate { return atoi(.@strdate$); } -// Same as numdate() but SQL format +// Same as numdate() but SQL format. +// sqldate({day variation}) function script sqldate { - .@strdate$=sprintf("%04d-%02d-%02d %02d:%02d:%02d", gettime(GETTIME_YEAR), gettime(GETTIME_MONTH), gettime(GETTIME_DAYOFMONTH), gettime(GETTIME_HOUR), gettime(GETTIME_MINUTE), gettime(GETTIME_SECOND)); + .@d=getarg(0, 0); + .@strdate$=sprintf("%04d-%02d-%02d %02d:%02d:%02d", gettime(GETTIME_YEAR), gettime(GETTIME_MONTH), gettime(GETTIME_DAYOFMONTH)+.@d, gettime(GETTIME_HOUR), gettime(GETTIME_MINUTE), gettime(GETTIME_SECOND)); return .@strdate$; } |