forked from mirror/openmw-tes3mp
[Server] Add GetOperatingSystemType() script function
This commit is contained in:
parent
da6b89c185
commit
fa1700e2ab
2 changed files with 15 additions and 0 deletions
|
@ -34,6 +34,11 @@ void ServerFunctions::UnbanAddress(const char *ipAddress) noexcept
|
|||
mwmp::Networking::getPtr()->unbanAddress(ipAddress);
|
||||
}
|
||||
|
||||
const char *ServerFunctions::GetOperatingSystemType() noexcept
|
||||
{
|
||||
return Utils::getOperatingSystem().c_str();
|
||||
}
|
||||
|
||||
const char *ServerFunctions::GetServerVersion() noexcept
|
||||
{
|
||||
return TES3MP_VERSION;
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
{"BanAddress", ServerFunctions::BanAddress},\
|
||||
{"UnbanAddress", ServerFunctions::UnbanAddress},\
|
||||
\
|
||||
{"GetOperatingSystemType", ServerFunctions::GetOperatingSystemType},\
|
||||
{"GetServerVersion", ServerFunctions::GetServerVersion},\
|
||||
{"GetProtocolVersion", ServerFunctions::GetProtocolVersion},\
|
||||
{"GetAvgPing", ServerFunctions::GetAvgPing},\
|
||||
|
@ -65,6 +66,15 @@ public:
|
|||
*/
|
||||
static void UnbanAddress(const char *ipAddress) noexcept;
|
||||
|
||||
/**
|
||||
* \brief Get the type of the operating system used by the server.
|
||||
*
|
||||
* Note: Currently, the type can be "Windows", "Linux", "OS X" or "Unknown OS".
|
||||
*
|
||||
* \return The type of the operating system.
|
||||
*/
|
||||
static const char *GetOperatingSystemType() noexcept;
|
||||
|
||||
/**
|
||||
* \brief Get the TES3MP version of the server.
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue