mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-02-20 18:10:02 +01:00
Fix reload command security (#774)
This commit is contained in:
parent
c436781d39
commit
453fa4b4f5
@ -958,9 +958,17 @@ std::vector<std::string> PlayerbotHolder::HandlePlayerbotCommand(char const* arg
|
||||
|
||||
if (!strcmp(cmd, "reload"))
|
||||
{
|
||||
messages.push_back("Reloading config");
|
||||
sPlayerbotAIConfig->Initialize();
|
||||
return messages;
|
||||
if (master->GetSession()->GetSecurity() >= SEC_GAMEMASTER)
|
||||
{
|
||||
sPlayerbotAIConfig->Initialize();
|
||||
messages.push_back("Config reloaded.");
|
||||
return messages;
|
||||
}
|
||||
else
|
||||
{
|
||||
messages.push_back("ERROR: Only GM can use this command.");
|
||||
return messages;
|
||||
}
|
||||
}
|
||||
|
||||
if (!strcmp(cmd, "tweak"))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user