mirror of
https://github.com/BeamMP/BeamMP-Launcher.git
synced 2025-08-16 08:16:20 +00:00
Mod info logs and check for old format
This commit is contained in:
parent
4fbd25b551
commit
3f12bb757a
@ -383,8 +383,7 @@ struct ModInfo {
|
|||||||
}
|
}
|
||||||
} catch (const std::exception& e) {
|
} catch (const std::exception& e) {
|
||||||
debug(std::string("Failed to receive mod list: ") + e.what());
|
debug(std::string("Failed to receive mod list: ") + e.what());
|
||||||
error("Failed to receive mod list!");
|
warn("Failed to receive new mod list format! This server may be outdated, but everything should still work as expected.");
|
||||||
// TODO: Cry and die
|
|
||||||
}
|
}
|
||||||
return std::make_pair(success, modInfos);
|
return std::make_pair(success, modInfos);
|
||||||
}
|
}
|
||||||
@ -526,11 +525,15 @@ void SyncResources(SOCKET Sock) {
|
|||||||
|
|
||||||
debug("Mod info: " + Ret);
|
debug("Mod info: " + Ret);
|
||||||
|
|
||||||
auto ModInfos = ModInfo::ParseModInfosFromPacket(Ret);
|
if (Ret.starts_with("R")) {
|
||||||
|
debug("This server is likely outdated, not trying to parse new mod info format");
|
||||||
|
} else {
|
||||||
|
auto ModInfos = ModInfo::ParseModInfosFromPacket(Ret);
|
||||||
|
|
||||||
if (ModInfos.first) {
|
if (ModInfos.first) {
|
||||||
NewSyncResources(Sock, Ret, ModInfos.second);
|
NewSyncResources(Sock, Ret, ModInfos.second);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Ret.empty())
|
if (Ret.empty())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user