mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-12 08:02:25 +00:00
Add "world:version" command
This commit is contained in:
parent
25bd285be5
commit
d23dccec82
@ -1,20 +1,22 @@
|
|||||||
/* EQEMu: Everquest Server Emulator
|
/**
|
||||||
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
|
* EQEmulator: Everquest Server Emulator
|
||||||
|
* Copyright (C) 2001-2019 EQEmulator Development Team (https://github.com/EQEmu/Server)
|
||||||
This program is free software; you can redistribute it and/or modify
|
*
|
||||||
it under the terms of the GNU General Public License as published by
|
* This program is free software; you can redistribute it and/or modify
|
||||||
the Free Software Foundation; version 2 of the License.
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; version 2 of the License.
|
||||||
This program is distributed in the hope that it will be useful,
|
*
|
||||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
* This program is distributed in the hope that it will be useful,
|
||||||
are required to give you total support for your newly bought product;
|
* but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
* are required to give you total support for your newly bought product;
|
||||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
|
* A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
You should have received a copy of the GNU General Public License
|
*
|
||||||
along with this program; if not, write to the Free Software
|
* You should have received a copy of the GNU General Public License
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* along with this program; if not, write to the Free Software
|
||||||
*/
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef _EQEMU_VERSION_H
|
#ifndef _EQEMU_VERSION_H
|
||||||
#define _EQEMU_VERSION_H
|
#define _EQEMU_VERSION_H
|
||||||
@ -22,14 +24,15 @@
|
|||||||
#define LOGIN_VERSION "0.8.0"
|
#define LOGIN_VERSION "0.8.0"
|
||||||
#define EQEMU_PROTOCOL_VERSION "0.3.10"
|
#define EQEMU_PROTOCOL_VERSION "0.3.10"
|
||||||
|
|
||||||
#define CURRENT_VERSION "1.1.3"
|
#define CURRENT_VERSION "2.0"
|
||||||
|
|
||||||
/*
|
|
||||||
Everytime a Database SQL is added to Github,
|
|
||||||
increment CURRENT_BINARY_DATABASE_VERSION number and make sure you update the manifest
|
|
||||||
Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Every time a Database SQL is added to Github increment CURRENT_BINARY_DATABASE_VERSION
|
||||||
|
* number and make sure you update the manifest
|
||||||
|
*
|
||||||
|
* Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt
|
||||||
|
*/
|
||||||
|
|
||||||
#define CURRENT_BINARY_DATABASE_VERSION 9144
|
#define CURRENT_BINARY_DATABASE_VERSION 9144
|
||||||
|
|
||||||
@ -38,6 +41,7 @@
|
|||||||
#else
|
#else
|
||||||
#define CURRENT_BINARY_BOTS_DATABASE_VERSION 0 // must be 0
|
#define CURRENT_BINARY_BOTS_DATABASE_VERSION 0 // must be 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define COMPILE_DATE __DATE__
|
#define COMPILE_DATE __DATE__
|
||||||
#define COMPILE_TIME __TIME__
|
#define COMPILE_TIME __TIME__
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
|
|||||||
@ -46,7 +46,8 @@ namespace WorldserverCommandHandler {
|
|||||||
/**
|
/**
|
||||||
* Register commands
|
* Register commands
|
||||||
*/
|
*/
|
||||||
function_map["database:version"] = &WorldserverCommandHandler::DatabaseVersion;
|
function_map["world:version"] = &WorldserverCommandHandler::Version;
|
||||||
|
function_map["database:version"] = &WorldserverCommandHandler::DatabaseVersion;
|
||||||
function_map["database:set-account-status"] = &WorldserverCommandHandler::DatabaseSetAccountStatus;
|
function_map["database:set-account-status"] = &WorldserverCommandHandler::DatabaseSetAccountStatus;
|
||||||
|
|
||||||
EQEmuCommand::HandleMenu(function_map, cmd, argc, argv);
|
EQEmuCommand::HandleMenu(function_map, cmd, argc, argv);
|
||||||
@ -77,6 +78,34 @@ namespace WorldserverCommandHandler {
|
|||||||
std::cout << payload.str() << std::endl;
|
std::cout << payload.str() << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param argc
|
||||||
|
* @param argv
|
||||||
|
* @param cmd
|
||||||
|
* @param description
|
||||||
|
*/
|
||||||
|
void Version(int argc, char **argv, argh::parser &cmd, std::string &description)
|
||||||
|
{
|
||||||
|
description = "Shows server version";
|
||||||
|
|
||||||
|
if (cmd[{"-h", "--help"}]) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Json::Value database_version;
|
||||||
|
|
||||||
|
database_version["bots_database_version"] = CURRENT_BINARY_BOTS_DATABASE_VERSION;
|
||||||
|
database_version["compile_date"] = COMPILE_DATE;
|
||||||
|
database_version["compile_time"] = COMPILE_TIME;
|
||||||
|
database_version["database_version"] = CURRENT_BINARY_DATABASE_VERSION;
|
||||||
|
database_version["server_version"] = CURRENT_VERSION;
|
||||||
|
|
||||||
|
std::stringstream payload;
|
||||||
|
payload << database_version;
|
||||||
|
|
||||||
|
std::cout << payload.str() << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param argc
|
* @param argc
|
||||||
* @param argv
|
* @param argv
|
||||||
|
|||||||
@ -26,6 +26,7 @@
|
|||||||
|
|
||||||
namespace WorldserverCommandHandler {
|
namespace WorldserverCommandHandler {
|
||||||
void CommandHandler(int argc, char **argv);
|
void CommandHandler(int argc, char **argv);
|
||||||
|
void Version(int argc, char **argv, argh::parser &cmd, std::string &description);
|
||||||
void DatabaseVersion(int argc, char **argv, argh::parser &cmd, std::string &description);
|
void DatabaseVersion(int argc, char **argv, argh::parser &cmd, std::string &description);
|
||||||
void DatabaseSetAccountStatus(int argc, char **argv, argh::parser &cmd, std::string &description);
|
void DatabaseSetAccountStatus(int argc, char **argv, argh::parser &cmd, std::string &description);
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user