From: TimePath Date: Sat, 9 Jan 2016 05:51:38 +0000 (+1100) Subject: Generic command: version X-Git-Tag: xonotic-v0.8.2~1259 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3c822f855c838e050901282f9e723083e9b7f8d0;p=xonotic%2Fxonotic-data.pk3dir.git Generic command: version --- diff --git a/qcsrc/common/debug.qh b/qcsrc/common/debug.qh index 75a76ae34..4f60e9fe3 100644 --- a/qcsrc/common/debug.qh +++ b/qcsrc/common/debug.qh @@ -185,4 +185,22 @@ GENERIC_COMMAND(bufstr_get, "Examine a string buffer object") } } +GENERIC_COMMAND(version, "Print the current version") +{ + switch (request) + { + case CMD_REQUEST_COMMAND: + { + LOG_INFO(WATERMARK "\n"); + return; + } + default: + case CMD_REQUEST_USAGE: + { + LOG_INFO(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " version")); + return; + } + } +} + #endif