| 5072 | } |
| 5073 | |
| 5074 | void CClient::RequestDDNetInfo() |
| 5075 | { |
| 5076 | if(m_pDDNetInfoTask && !m_pDDNetInfoTask->Done()) |
| 5077 | return; |
| 5078 | |
| 5079 | char aUrl[256]; |
| 5080 | str_copy(aUrl, DDNET_INFO_URL); |
| 5081 | |
| 5082 | if(g_Config.m_BrIndicateFinished) |
| 5083 | { |
| 5084 | char aEscaped[128]; |
| 5085 | EscapeUrl(aEscaped, sizeof(aEscaped), PlayerName()); |
| 5086 | str_append(aUrl, "?name="); |
| 5087 | str_append(aUrl, aEscaped); |
| 5088 | } |
| 5089 | |
| 5090 | m_pDDNetInfoTask = HttpGetFile(aUrl, Storage(), DDNET_INFO_FILE, IStorage::TYPE_SAVE); |
| 5091 | m_pDDNetInfoTask->Timeout(CTimeout{10000, 0, 500, 10}); |
| 5092 | m_pDDNetInfoTask->SkipByFileTime(false); // Always re-download. |
| 5093 | // Use ipv4 so we can know the ingame ip addresses of players before they join game servers |
| 5094 | m_pDDNetInfoTask->IpResolve(IPRESOLVE::V4); |
| 5095 | Http()->Run(m_pDDNetInfoTask); |
| 5096 | m_InfoState = EInfoState::LOADING; |
| 5097 | } |
| 5098 | |
| 5099 | int CClient::GetPredictionTime() |
| 5100 | { |
no test coverage detected