diff --git a/apps/openmw-mp/Script/Functions/Server.cpp b/apps/openmw-mp/Script/Functions/Server.cpp index 3c8a795dc..d45f4ec58 100644 --- a/apps/openmw-mp/Script/Functions/Server.cpp +++ b/apps/openmw-mp/Script/Functions/Server.cpp @@ -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 diff --git a/apps/openmw-mp/Script/Functions/Server.hpp b/apps/openmw-mp/Script/Functions/Server.hpp index 371be142e..a0fe0defa 100644 --- a/apps/openmw-mp/Script/Functions/Server.hpp +++ b/apps/openmw-mp/Script/Functions/Server.hpp @@ -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. *