[Server] Add and implement PushPlugin method to MasterClient

This commit is contained in:
Koncord 2017-05-07 02:51:57 +08:00
parent 873da495b1
commit 87c172186e
2 changed files with 9 additions and 0 deletions

View file

@ -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)

View file

@ -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();