aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/scriptserverbrowser.cpp
diff options
context:
space:
mode:
authorEmma Miler <27428383+emma-miler@users.noreply.github.com>2022-06-16 01:36:41 +0200
committerGitHub <noreply@github.com>2022-06-16 01:36:41 +0200
commit7f70a1e46b35f3e5731ada00040096be51ac05c6 (patch)
treeccf3f5caa6af4a2873537028f4dde162863ec37e /NorthstarDedicatedTest/scriptserverbrowser.cpp
parentdf8c4b26e7727dd45c244f25304d2a35c66bffa6 (diff)
downloadNorthstarLauncher-7f70a1e46b35f3e5731ada00040096be51ac05c6.tar.gz
NorthstarLauncher-7f70a1e46b35f3e5731ada00040096be51ac05c6.zip
Localize error messages from masterserver (#159)
Diffstat (limited to 'NorthstarDedicatedTest/scriptserverbrowser.cpp')
-rw-r--r--NorthstarDedicatedTest/scriptserverbrowser.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/NorthstarDedicatedTest/scriptserverbrowser.cpp b/NorthstarDedicatedTest/scriptserverbrowser.cpp
index aec47c3b..b0e19fc1 100644
--- a/NorthstarDedicatedTest/scriptserverbrowser.cpp
+++ b/NorthstarDedicatedTest/scriptserverbrowser.cpp
@@ -355,6 +355,13 @@ SQRESULT SQ_WasAuthSuccessful(void* sqvm)
return SQRESULT_NOTNULL;
}
+// bool function NSWasAuthSuccessful()
+SQRESULT SQ_GetAuthFailReason(void* sqvm)
+{
+ ClientSq_pushstring(sqvm, g_MasterServerManager->s_authfail_reason.c_str(), -1);
+ return SQRESULT_NOTNULL;
+}
+
// void function NSConnectToAuthedServer()
SQRESULT SQ_ConnectToAuthedServer(void* sqvm)
{
@@ -438,4 +445,6 @@ void InitialiseScriptServerBrowser(HMODULE baseAddress)
g_UISquirrelManager->AddFuncRegistration("void", "NSTryAuthWithLocalServer", "", "", SQ_TryAuthWithLocalServer);
g_UISquirrelManager->AddFuncRegistration("void", "NSCompleteAuthWithLocalServer", "", "", SQ_CompleteAuthWithLocalServer);
+
+ g_UISquirrelManager->AddFuncRegistration("string", "NSGetAuthFailReason", "", "", SQ_GetAuthFailReason);
} \ No newline at end of file