[Commands] Cleanup #version Command. (#1967)

- Utilize popup over chat message.
This commit is contained in:
Kinglykrab 2022-02-10 16:10:23 -05:00 committed by GitHub
parent d83ced6f76
commit 49d7eb1402
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,9 +2,17 @@
void command_version(Client *c, const Seperator *sep)
{
c->Message(Chat::White, "Current version information.");
c->Message(Chat::White, " %s", CURRENT_VERSION);
c->Message(Chat::White, " Compiled on: %s at %s", COMPILE_DATE, COMPILE_TIME);
c->Message(Chat::White, " Last modified on: %s", LAST_MODIFIED);
std::string popup_text = "<table>";
popup_text += fmt::format("<tr><td>Version</td><td>{}</td></tr>", CURRENT_VERSION);
popup_text += fmt::format("<tr><td>Compiled</td><td>{} {}</td></tr>", COMPILE_DATE, COMPILE_TIME);
popup_text += fmt::format("<tr><td>Last Modified</td><td>{}</td></tr>", LAST_MODIFIED);
popup_text += "</table>";
c->SendPopupToClient(
"Server Version Information",
popup_text.c_str()
);
}