X-Git-Url: https://git.pterodactylus.net/?p=fms.git;a=blobdiff_plain;f=src%2Ffreenet%2Fintroductionpuzzleinserter.cpp;h=9dca8e095ccfc1e9d79677f8da5e0e9702c781b8;hp=a4b661746b6028d4ad659366f9faf3f3eb803958;hb=964f55fd550fc711c0320ce6a24ad713040695d0;hpb=868c533e84b3c81b6604b45b84efa32073aa20b4 diff --git a/src/freenet/introductionpuzzleinserter.cpp b/src/freenet/introductionpuzzleinserter.cpp index a4b6617..9dca8e0 100644 --- a/src/freenet/introductionpuzzleinserter.cpp +++ b/src/freenet/introductionpuzzleinserter.cpp @@ -27,11 +27,17 @@ void IntroductionPuzzleInserter::CheckForNeededInsert() while(!rs.AtEnd()) { + std::string localidentityidstr; DateTime now; now.SetToGMTime(); + if(rs.GetField(0)) + { + localidentityidstr=rs.GetField(0); + } + // if this identity has any non-solved puzzles for today, we don't need to insert a new puzzle - SQLite3DB::Recordset rs2=m_db->Query("SELECT UUID FROM tblIntroductionPuzzleInserts WHERE Day='"+now.Format("%Y-%m-%d")+"' AND FoundSolution='false';"); + SQLite3DB::Recordset rs2=m_db->Query("SELECT UUID FROM tblIntroductionPuzzleInserts WHERE Day='"+now.Format("%Y-%m-%d")+"' AND FoundSolution='false' AND LocalIdentityID="+localidentityidstr+";"); // identity doesn't have any non-solved puzzles for today - start a new insert if(rs2.Empty()==true)