summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorCronus89 <cronus@nite-serv.com>2013-11-03 21:41:01 -0600
committerCronus89 <cronus@nite-serv.com>2013-11-03 21:41:01 -0600
commita831e5d3069dab75c7c8ef9dbf72af904bb0af09 (patch)
tree0c677f1d2a916a1aec87cda7326b8b12fe2a7845 /modules
parent6e8d2bf09dbc349df5e2d2094a83a60c6309b76b (diff)
CREATE EVENT chanstats_event_cleanup_weekly failed due to calculating improper start of week.
Diffstat (limited to 'modules')
-rw-r--r--modules/stats/m_chanstats.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/stats/m_chanstats.cpp b/modules/stats/m_chanstats.cpp
index 98d876222..ab67e311b 100644
--- a/modules/stats/m_chanstats.cpp
+++ b/modules/stats/m_chanstats.cpp
@@ -439,7 +439,7 @@ class MChanstats : public Module
this->RunQuery(query);
}
query = "CREATE EVENT `chanstats_event_cleanup_weekly` "
- "ON SCHEDULE EVERY 1 WEEK STARTS (DATE(CURRENT_TIMESTAMP)-WEEKDAY(CURRENT_TIMESTAMP)) "
+ "ON SCHEDULE EVERY 1 WEEK STARTS ADDDATE(CURDATE(), INTERVAL 1-DAYOFWEEK(CURDATE()) DAY) "
"DO UPDATE `" + prefix + "chanstats` SET letters=0, words=0, line=0, actions=0, smileys_happy=0,"
"smileys_sad=0, smileys_other=0, kicks=0, modes=0, topics=0, time0=0, time1=0, time2=0,"
"time3=0, time4=0, time5=0, time6=0, time7=0, time8=0, time9=0, time10=0, time11=0,"