Skip to content

Commit

Permalink
Command: Removed the bot reload, tweak and debug commands from non ga…
Browse files Browse the repository at this point in the history
…memasters
  • Loading branch information
mostlikely4r committed Feb 20, 2025
1 parent bbb20e2 commit a20b74f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions playerbot/PlayerbotMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -759,14 +759,14 @@ std::list<std::string> PlayerbotHolder::HandlePlayerbotCommand(char const* args,
return messages;
}

if (!strcmp(cmd, "reload"))
if (!strcmp(cmd, "reload") && master->GetSession()->GetSecurity() >= SEC_GAMEMASTER)
{
messages.push_back("Reloading config");
sPlayerbotAIConfig.Initialize();
return messages;
}

if (!strcmp(cmd, "tweak"))
if (!strcmp(cmd, "tweak") && master->GetSession()->GetSecurity() >= SEC_GAMEMASTER)
{
sPlayerbotAIConfig.tweakValue = sPlayerbotAIConfig.tweakValue++;
if (sPlayerbotAIConfig.tweakValue > 2)
Expand Down Expand Up @@ -920,7 +920,7 @@ std::list<std::string> PlayerbotHolder::HandlePlayerbotCommand(char const* args,
return messages;
}

if (command.find("debug ") != std::string::npos)
if (command.find("debug ") != std::string::npos && master->GetSession()->GetSecurity() >= SEC_GAMEMASTER)
{
bool hasBot = false;

Expand Down

0 comments on commit a20b74f

Please sign in to comment.