]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Generic command: version
authorTimePath <andrew.hardaker1995@gmail.com>
Sat, 9 Jan 2016 05:51:38 +0000 (16:51 +1100)
committerTimePath <andrew.hardaker1995@gmail.com>
Sat, 9 Jan 2016 05:51:38 +0000 (16:51 +1100)
qcsrc/common/debug.qh

index 75a76ae348f066b2512038cecec32f838cded97c..4f60e9fe3cf5b5e4334c9c805d87fff81c618ab5 100644 (file)
@@ -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