aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/masterserver.h
diff options
context:
space:
mode:
authorwolf109909 <1486234278@qq.com>2022-01-16 00:15:18 +0800
committerBarichello <artur@barichello.me>2022-01-20 16:27:18 -0300
commit85e958331ac9aafc2d2c05ed96c591c8a245f665 (patch)
tree7fa3487c73f62d118ddb5339da29d9a1e7352fd1 /NorthstarDedicatedTest/masterserver.h
parentce369d39889304b5712e9628c7ae084c27a1cce2 (diff)
downloadNorthstarLauncher-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.h8
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;