From 87c172186e23528742557664b2db5e5224f7c7df Mon Sep 17 00:00:00 2001 From: Koncord Date: Sun, 7 May 2017 02:51:57 +0800 Subject: [PATCH] [Server] Add and implement PushPlugin method to MasterClient --- apps/openmw-mp/MasterClient.cpp | 8 ++++++++ apps/openmw-mp/MasterClient.hpp | 1 + 2 files changed, 9 insertions(+) diff --git a/apps/openmw-mp/MasterClient.cpp b/apps/openmw-mp/MasterClient.cpp index 1094ae4fa..1d900e413 100644 --- a/apps/openmw-mp/MasterClient.cpp +++ b/apps/openmw-mp/MasterClient.cpp @@ -105,6 +105,14 @@ void MasterClient::SetRuleValue(std::string key, double value) mutexData.unlock(); } +void MasterClient::PushPlugin(Plugin plugin) +{ + mutexData.lock(); + queryData.plugins.push_back(plugin); + updated = true; + mutexData.unlock(); +} + bool MasterClient::Process(RakNet::Packet *packet) { if (!sRun || packet->systemAddress != masterServer) diff --git a/apps/openmw-mp/MasterClient.hpp b/apps/openmw-mp/MasterClient.hpp index 02c3c9c6a..858946297 100644 --- a/apps/openmw-mp/MasterClient.hpp +++ b/apps/openmw-mp/MasterClient.hpp @@ -26,6 +26,7 @@ public: void SetModname(std::string hostname); void SetRuleString(std::string key, std::string value); void SetRuleValue(std::string key, double value); + void PushPlugin(Plugin plugin); bool Process(RakNet::Packet *packet); void Start();