From 01a0f906e1d6957a621d121e25bee49c5bd23ee1 Mon Sep 17 00:00:00 2001 From: Alex King <89047260+Kinglykrab@users.noreply.github.com> Date: Sun, 22 Jan 2023 12:56:55 -0500 Subject: [PATCH] [Bots] Add Bot Command Reloading (#2773) # Notes - Adds `bot_command_init` to `#reload commands` so that operators can reload bot commands if they enable/disable bots while the server is running. --- zone/worldserver.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/zone/worldserver.cpp b/zone/worldserver.cpp index 90aa34f66..5d5c5251e 100644 --- a/zone/worldserver.cpp +++ b/zone/worldserver.cpp @@ -22,7 +22,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include #include #include -#include #ifdef _WINDOWS #include @@ -54,11 +53,10 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include "worldserver.h" #include "zone.h" #include "zone_config.h" -#include "zone_reload.h" #include "../common/shared_tasks.h" #include "shared_task_zone_messaging.h" #include "dialogue_window.h" -#include "queryserv.h" +#include "bot_command.h" extern EntityList entity_list; extern Zone* zone; @@ -1929,6 +1927,9 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) { zone->SendReloadMessage("Commands"); command_init(); + if (RuleB(Bots, Enabled) && database.DoesTableExist("bot_command_settings")) { + bot_command_init(); + } break; } case ServerOP_ReloadContentFlags: