[Server] Add and implement PushPlugin method to MasterClient

pull/249/merge
Koncord 8 years ago
parent 873da495b1
commit 87c172186e

@ -105,6 +105,14 @@ void MasterClient::SetRuleValue(std::string key, double value)
mutexData.unlock(); mutexData.unlock();
} }
void MasterClient::PushPlugin(Plugin plugin)
{
mutexData.lock();
queryData.plugins.push_back(plugin);
updated = true;
mutexData.unlock();
}
bool MasterClient::Process(RakNet::Packet *packet) bool MasterClient::Process(RakNet::Packet *packet)
{ {
if (!sRun || packet->systemAddress != masterServer) if (!sRun || packet->systemAddress != masterServer)

@ -26,6 +26,7 @@ public:
void SetModname(std::string hostname); void SetModname(std::string hostname);
void SetRuleString(std::string key, std::string value); void SetRuleString(std::string key, std::string value);
void SetRuleValue(std::string key, double value); void SetRuleValue(std::string key, double value);
void PushPlugin(Plugin plugin);
bool Process(RakNet::Packet *packet); bool Process(RakNet::Packet *packet);
void Start(); void Start();

Loading…
Cancel
Save