[Commands] Cleanup #zsave Command. (#1807)

* [Commands] Cleanup #zsave Command.
- Cleanup message and logic.

* White.
This commit is contained in:
Kinglykrab 2021-11-22 21:17:03 -05:00 committed by GitHub
parent 26c7287997
commit 0da4610249
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,11 +2,15 @@
void command_zsave(Client *c, const Seperator *sep)
{
if (zone->SaveZoneCFG()) {
c->Message(Chat::Red, "Zone header saved successfully.");
}
else {
c->Message(Chat::Red, "ERROR: Zone header data was NOT saved.");
}
c->Message(
Chat::White,
fmt::format(
"Zone header {}.",
(
zone->SaveZoneCFG() ?
"saved successfully" :
"failed to save"
)
).c_str()
);
}