[Server] Add GetArchitectureType() script function

Additionally, bring GetOperatingSystem() up-to-date by making it use the renamed function in Utils.
pull/496/head
David Cernat 5 years ago
parent 9fe54aa8c6
commit 5e38e8abdb

@ -36,7 +36,12 @@ void ServerFunctions::UnbanAddress(const char *ipAddress) noexcept
const char *ServerFunctions::GetOperatingSystemType() noexcept
{
return Utils::getOperatingSystem().c_str();
return Utils::getOperatingSystemType().c_str();
}
const char *ServerFunctions::GetArchitectureType() noexcept
{
return Utils::getArchitectureType().c_str();
}
const char *ServerFunctions::GetServerVersion() noexcept

@ -11,6 +11,7 @@
{"UnbanAddress", ServerFunctions::UnbanAddress},\
\
{"GetOperatingSystemType", ServerFunctions::GetOperatingSystemType},\
{"GetArchitectureType", ServerFunctions::GetArchitectureType},\
{"GetServerVersion", ServerFunctions::GetServerVersion},\
{"GetProtocolVersion", ServerFunctions::GetProtocolVersion},\
{"GetAvgPing", ServerFunctions::GetAvgPing},\
@ -75,6 +76,15 @@ public:
*/
static const char *GetOperatingSystemType() noexcept;
/**
* \brief Get the architecture type used by the server.
*
* Note: Currently, the type can be "64-bit", "32-bit", "ARMv#" or "Unknown architecture".
*
* \return The architecture type.
*/
static const char *GetArchitectureType() noexcept;
/**
* \brief Get the TES3MP version of the server.
*

Loading…
Cancel
Save