mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 21:01:29 +00:00
* [Commands] #reload Command Overhaul. - Consolidated #reloadaa, #reloadallrules, #reloadcontentflags, #reloademote, #reloadlevelmods, #reloadmerchants, #reloadperlexportsettings, #reloadqst, #reloadstatic, #reloadtitles, #relaodtraps, #reloadworld, and #reloadzps in to one command. - #reload has 15 different sub commands you may use, including Log Settings and Tasks reloading. - All the reload commands are a part of the Developer Tools Menu messages now, as well as part of the documentation. - Fixes the commands that weren't actually sending their packet to zone server to globally reload stuff. - Added Variables table reloading to command. * Consistency. * Hot reload. * Final big push.
62 lines
1.1 KiB
C++
Executable File
62 lines
1.1 KiB
C++
Executable File
#include "../client.h"
|
|
|
|
void command_zheader(Client *c, const Seperator *sep)
|
|
{
|
|
int arguments = sep->argnum;
|
|
if (!arguments) {
|
|
c->Message(Chat::White, "Usage: #zheader [Zone ID|Zone Short Name] [Version]");
|
|
return;
|
|
}
|
|
|
|
auto zone_id = (
|
|
sep->IsNumber(2) ?
|
|
std::stoul(sep->arg[2]) :
|
|
ZoneID(sep->arg[2])
|
|
);
|
|
if (!zone_id) {
|
|
c->Message(
|
|
Chat::White,
|
|
fmt::format(
|
|
"Zone ID {} could not be found.",
|
|
zone_id
|
|
).c_str()
|
|
);
|
|
return;
|
|
}
|
|
|
|
auto zone_short_name = ZoneName(zone_id);
|
|
auto zone_long_name = ZoneLongName(zone_id);
|
|
auto version = (
|
|
sep->IsNumber(3) ?
|
|
std::stoul(sep->arg[3]) :
|
|
0
|
|
);
|
|
|
|
auto outapp = new EQApplicationPacket(OP_NewZone, sizeof(NewZone_Struct));
|
|
memcpy(outapp->pBuffer, &zone->newzone_data, outapp->size);
|
|
entity_list.QueueClients(c, outapp);
|
|
safe_delete(outapp);
|
|
|
|
c->Message(
|
|
Chat::White,
|
|
fmt::format(
|
|
"Zone Header Load {} | Zone: {} ({}){}",
|
|
(
|
|
zone->LoadZoneCFG(zone_short_name, version) ?
|
|
"Suceeded" :
|
|
"Failed"
|
|
),
|
|
zone_long_name,
|
|
zone_short_name,
|
|
(
|
|
version ?
|
|
fmt::format(
|
|
" Version: {}",
|
|
version
|
|
) :
|
|
""
|
|
)
|
|
).c_str()
|
|
);
|
|
}
|