mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2025-07-01 15:26:59 +00:00
Replace obsolete function
This commit is contained in:
parent
6053aa6192
commit
7db40e068e
@ -32,9 +32,8 @@ public:
|
||||
[[nodiscard]] int ModsLoaded() const { return mModsLoaded; }
|
||||
[[nodiscard]] nlohmann::json GetMods() const { return mMods; }
|
||||
|
||||
[[nodiscard]] std::string NewFileList() const;
|
||||
|
||||
void RefreshFiles();
|
||||
void SetProtected(const std::string& ModName, bool Protected);
|
||||
|
||||
private:
|
||||
size_t mMaxModSize = 0;
|
||||
|
@ -786,7 +786,7 @@ void TNetwork::Parse(TClient& c, const std::vector<uint8_t>& Packet) {
|
||||
case 'S':
|
||||
if (SubCode == 'R') {
|
||||
beammp_debug("Sending Mod Info");
|
||||
std::string ToSend = mResourceManager.NewFileList();
|
||||
std::string ToSend = mResourceManager.GetMods().dump();
|
||||
beammp_debugf("Mod Info: {}", ToSend);
|
||||
if (!TCPSend(c, StringToVector(ToSend))) {
|
||||
ClientKick(c, "TCP Send 'SY' failed");
|
||||
|
@ -58,9 +58,6 @@ TResourceManager::TResourceManager() {
|
||||
Application::SetSubsystemStatus("ResourceManager", Application::Status::Good);
|
||||
}
|
||||
|
||||
std::string TResourceManager::NewFileList() const {
|
||||
return mMods.dump();
|
||||
}
|
||||
void TResourceManager::RefreshFiles() {
|
||||
mMods.clear();
|
||||
std::unique_lock Lock(mModsMutex);
|
||||
|
Loading…
x
Reference in New Issue
Block a user