X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Ffreenet%2Fidentityintroductionrequester.cpp;h=0e5e3ddb637d27b5dcd478d81ed8a7ffd7cf2496;hb=175f098e7e712b839db433b93fe8649a402c6784;hp=dc3a12015bd6045541f7cedb45de4fc1c11836ca;hpb=964f55fd550fc711c0320ce6a24ad713040695d0;p=fms.git diff --git a/src/freenet/identityintroductionrequester.cpp b/src/freenet/identityintroductionrequester.cpp index dc3a120..0e5e3dd 100644 --- a/src/freenet/identityintroductionrequester.cpp +++ b/src/freenet/identityintroductionrequester.cpp @@ -82,9 +82,10 @@ const bool IdentityIntroductionRequester::HandleAllData(FCPMessage &message) // we don't already know about this id - add it st.Finalize(); date.SetToGMTime(); - st=m_db->Prepare("INSERT INTO tblIdentity(PublicKey,DateAdded) VALUES(?,?);"); + st=m_db->Prepare("INSERT INTO tblIdentity(PublicKey,DateAdded,AddedMethod) VALUES(?,?,?);"); st.Bind(0,xml.GetIdentity()); st.Bind(1,date.Format("%Y-%m-%d %H:%M:%S")); + st.Bind(2,"solved captcha"); st.Step(); } st.Finalize(); @@ -177,7 +178,7 @@ const bool IdentityIntroductionRequester::HandleMessage(FCPMessage &message) void IdentityIntroductionRequester::Initialize() { std::string tempval=""; - Option::instance()->Get("MaxIdentityIntroductionRequests",tempval); + Option::Instance()->Get("MaxIdentityIntroductionRequests",tempval); StringFunctions::Convert(tempval,m_maxrequests); if(m_maxrequests<1) { @@ -188,7 +189,7 @@ void IdentityIntroductionRequester::Initialize() { m_log->WriteLog(LogFile::LOGLEVEL_WARNING,"Option MaxIdentityIntroductionRequests is currently set at "+tempval+". This value might be incorrectly configured."); } - Option::instance()->Get("MessageBase",m_messagebase); + Option::Instance()->Get("MessageBase",m_messagebase); m_tempdate.SetToGMTime(); } @@ -243,7 +244,7 @@ void IdentityIntroductionRequester::Process() // this will recheck for ids every minute DateTime now; now.SetToGMTime(); - if(m_tempdate<(now-(1.0/1440.0))) + if(m_ids.size()==0 && m_tempdate<(now-(1.0/1440.0))) { PopulateIDList(); m_tempdate=now;