From 41f38a28371808f18bec61a11db28843a3e7b0ef Mon Sep 17 00:00:00 2001 From: Geoffrey Merck Date: Sun, 26 Jul 2020 05:52:41 -0700 Subject: [PATCH] Remove 30 days back in time --- IRCDDBApp.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IRCDDBApp.cpp b/IRCDDBApp.cpp index 60c8190..96064a2 100644 --- a/IRCDDBApp.cpp +++ b/IRCDDBApp.cpp @@ -130,7 +130,6 @@ IRCDDBApp::IRCDDBApp(const std::string& u_chan) : d(new IRCDDBAppPrivate) , m_maxTime((time_t)950000000) //februray 2000 { - m_maxTime = time(NULL) - 2592000; //Today -30 days d->sendQ = NULL; d->initReady = false; @@ -689,6 +688,7 @@ void IRCDDBApp::doUpdate(std::string& msg) { int tableID = 0; std::vector tkz = CUtils::stringTokenizer(msg); + if (tkz.empty()) return; // no text in message @@ -867,7 +867,7 @@ IRCMessageQueue *IRCDDBApp::getSendQ() std::string IRCDDBApp::getLastEntryTime(int tableID) { if (1 == tableID) { - struct tm *ptm = gmtime(&m_maxTime); + struct tm *ptm = std::gmtime(&m_maxTime); char tstr[80]; strftime(tstr, 80, "%Y-%m-%d %H:%M:%S", ptm); std::string max = tstr;