diff options
author | wolf109909 <1486234278@qq.com> | 2022-01-16 00:15:18 +0800 |
---|---|---|
committer | Barichello <artur@barichello.me> | 2022-01-20 16:27:18 -0300 |
commit | 85e958331ac9aafc2d2c05ed96c591c8a245f665 (patch) | |
tree | 7fa3487c73f62d118ddb5339da29d9a1e7352fd1 /NorthstarDedicatedTest/masterserver.h | |
parent | ce369d39889304b5712e9628c7ae084c27a1cce2 (diff) | |
download | NorthstarLauncher-85e958331ac9aafc2d2c05ed96c591c8a245f665.tar.gz NorthstarLauncher-85e958331ac9aafc2d2c05ed96c591c8a245f665.zip |
Fixes and optimizations around title and server names
Server name now supports UTF-8 chars in Unicode codepoints.
Dedicated server now displays server name for better itentification.
Diffstat (limited to 'NorthstarDedicatedTest/masterserver.h')
-rw-r--r-- | NorthstarDedicatedTest/masterserver.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/NorthstarDedicatedTest/masterserver.h b/NorthstarDedicatedTest/masterserver.h index d7071b6c..b1119564 100644 --- a/NorthstarDedicatedTest/masterserver.h +++ b/NorthstarDedicatedTest/masterserver.h @@ -1,7 +1,8 @@ #pragma once #include "convar.h" #include <WinSock2.h> - +#include <string> +#include <cstring> struct RemoteModInfo { public: @@ -73,6 +74,8 @@ public: char m_ownClientAuthToken[33]; std::string m_ownModInfoJson; + std::string ns_auth_srvName; // Unicode unescaped version of Cvar_ns_auth_servername for support in cjk characters + std::string ns_auth_srvDesc; // Unicode unescaped version of Cvar_ns_auth_serverdesc for support in cjk characters bool m_bOriginAuthWithMasterServerDone = false; bool m_bOriginAuthWithMasterServerInProgress = false; @@ -112,7 +115,8 @@ public: void WritePlayerPersistentData(char* playerId, char* pdata, size_t pdataSize); void RemoveSelfFromServerList(); }; - +void unescape_unicode(std::string& str); +void UpdateServerInfoFromUnicodeToUTF8(); void InitialiseSharedMasterServer(HMODULE baseAddress); extern MasterServerManager* g_MasterServerManager; |