mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 09:31:30 +00:00
25 lines
626 B
C++
25 lines
626 B
C++
#include "../../common/json/json.h"
|
|
#include "../../common/version.h"
|
|
|
|
void WorldserverCLI::Version(int argc, char **argv, argh::parser &cmd, std::string &description)
|
|
{
|
|
description = "Shows server version";
|
|
|
|
if (cmd[{"-h", "--help"}]) {
|
|
return;
|
|
}
|
|
|
|
Json::Value j;
|
|
|
|
j["bots_database_version"] = CURRENT_BINARY_BOTS_DATABASE_VERSION;
|
|
j["compile_date"] = COMPILE_DATE;
|
|
j["compile_time"] = COMPILE_TIME;
|
|
j["database_version"] = CURRENT_BINARY_DATABASE_VERSION;
|
|
j["server_version"] = CURRENT_VERSION;
|
|
|
|
std::stringstream payload;
|
|
payload << j;
|
|
|
|
std::cout << payload.str() << std::endl;
|
|
}
|