+++ /dev/null
-#include "../../include/freenet/introductionpuzzleremover.h"\r
-\r
-#ifdef XMEM\r
- #include <xmem.h>\r
-#endif\r
-\r
-IntroductionPuzzleRemover::IntroductionPuzzleRemover()\r
-{\r
- m_lastchecked.SetToGMTime();\r
-}\r
-\r
-void IntroductionPuzzleRemover::Process()\r
-{\r
- DateTime now;\r
- DateTime date;\r
- now.SetToGMTime();\r
- date.SetToGMTime();\r
-\r
- // check once a day\r
- if(m_lastchecked<(now-1.0))\r
- {\r
-\r
- date.Add(0,0,0,-2);\r
-\r
- // delete all puzzles 2 or more days old\r
- m_db->Execute("DELETE FROM tblIntroductionPuzzleInserts WHERE Day<='"+date.Format("%Y-%m-%d")+"';");\r
- m_db->Execute("DELETE FROM tblIntroductionPuzzleRequests WHERE Day<='"+date.Format("%Y-%m-%d")+"';");\r
-\r
- m_lastchecked=now;\r
- }\r
-}\r
-\r
-void IntroductionPuzzleRemover::RegisterWithThread(FreenetMasterThread *thread)\r
-{\r
- thread->RegisterPeriodicProcessor(this);\r
-}\r