mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-03 03:13:50 +00:00
feat(gm): /reloadcdclient with the cdclient_reload permission (GM 9)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -8,6 +8,8 @@
|
||||
#include "SlashCommandHandler.h"
|
||||
#include "ChatServerLink.h"
|
||||
#include "ChatPackets.h"
|
||||
#include "MasterPackets.h"
|
||||
#include "master/CDClientReload.h"
|
||||
#include "WorldMigration.h"
|
||||
|
||||
#include <algorithm>
|
||||
@@ -1814,6 +1816,20 @@ void SlashCommandHandler::Startup() {
|
||||
.dashboardPermission = "server_live_update"
|
||||
});
|
||||
|
||||
RegisterCommand({
|
||||
.help = "Reloads the client's cdclient.fdb on every server",
|
||||
.info = "Master copies the client's cdclient.fdb (if it changed), makes a new CDServer.sqlite from it with the cdserver migrations, and every server switches to them between frames. What is already spawned keeps what it loaded; what is made from now on reads the new data. Master also does this by itself a few seconds after the file changes. Usage: /reloadcdclient",
|
||||
.aliases = {"reloadcdclient"},
|
||||
.handle = [](Entity* entity, const SystemAddress& sysAddr, const std::string) {
|
||||
CDClientReload request;
|
||||
request.requesterId = entity->GetObjectID();
|
||||
MasterPackets::SendToMaster(request);
|
||||
ChatPackets::SendSystemMessage(sysAddr, u"Asked master to check the client's cdclient.fdb; the server logs say what changed.");
|
||||
},
|
||||
.requiredLevel = eGameMasterLevel::OPERATOR,
|
||||
.dashboardPermission = "cdclient_reload"
|
||||
});
|
||||
|
||||
RegisterCommand({
|
||||
.help = "[claim] Community challenges and live events",
|
||||
.info = "Shows the server-wide community challenges running now, how far along they are and what you added, and the live events in this world. Also gives you the coins waiting from challenges you helped complete",
|
||||
|
||||
Reference in New Issue
Block a user