version 0.3.13
[fms.git] / src / freenet / introductionpuzzleinserter.cpp
index b185b9d..6904186 100644 (file)
@@ -52,7 +52,8 @@ void IntroductionPuzzleInserter::CheckForNeededInsert()
                        // identity doesn't have any non-solved puzzles for today - start a new insert\r
                        if(rs2.Empty()==true)\r
                        {\r
-                               if(m_lastinserted.find(rs.GetInt(0))==m_lastinserted.end() || m_lastinserted[rs.GetInt(0)]<=lastinsert)\r
+                               // make sure we are on the next day or the appropriate amount of time has elapsed since the last insert\r
+                               if(m_lastinserted.find(rs.GetInt(0))==m_lastinserted.end() || m_lastinserted[rs.GetInt(0)]<=lastinsert || m_lastinserted[rs.GetInt(0)].day()!=now.day())\r
                                {\r
                                        StartInsert(rs.GetInt(0));\r
                                        m_lastinserted[rs.GetInt(0)]=now;\r