mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 21:01:29 +00:00
[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.
This commit is contained in:
parent
0a11eaa092
commit
01a0f906e1
@ -22,7 +22,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <limits.h>
|
|
||||||
|
|
||||||
#ifdef _WINDOWS
|
#ifdef _WINDOWS
|
||||||
#include <process.h>
|
#include <process.h>
|
||||||
@ -54,11 +53,10 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||||||
#include "worldserver.h"
|
#include "worldserver.h"
|
||||||
#include "zone.h"
|
#include "zone.h"
|
||||||
#include "zone_config.h"
|
#include "zone_config.h"
|
||||||
#include "zone_reload.h"
|
|
||||||
#include "../common/shared_tasks.h"
|
#include "../common/shared_tasks.h"
|
||||||
#include "shared_task_zone_messaging.h"
|
#include "shared_task_zone_messaging.h"
|
||||||
#include "dialogue_window.h"
|
#include "dialogue_window.h"
|
||||||
#include "queryserv.h"
|
#include "bot_command.h"
|
||||||
|
|
||||||
extern EntityList entity_list;
|
extern EntityList entity_list;
|
||||||
extern Zone* zone;
|
extern Zone* zone;
|
||||||
@ -1929,6 +1927,9 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
|
|||||||
{
|
{
|
||||||
zone->SendReloadMessage("Commands");
|
zone->SendReloadMessage("Commands");
|
||||||
command_init();
|
command_init();
|
||||||
|
if (RuleB(Bots, Enabled) && database.DoesTableExist("bot_command_settings")) {
|
||||||
|
bot_command_init();
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ServerOP_ReloadContentFlags:
|
case ServerOP_ReloadContentFlags:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user