aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDLL/scriptserverbrowser.cpp
diff options
context:
space:
mode:
authorBobTheBob9 <for.oliver.kirkham@gmail.com>2022-08-17 19:26:55 +0100
committerBobTheBob9 <for.oliver.kirkham@gmail.com>2022-08-17 19:26:55 +0100
commite85a3eee190e623e1d6397b4460817170b7bfced (patch)
tree4fdc57c45832870dfda511027929dba965880d42 /NorthstarDLL/scriptserverbrowser.cpp
parent082f3893215797268d7ac8c1000ebe371f276af7 (diff)
downloadNorthstarLauncher-e85a3eee190e623e1d6397b4460817170b7bfced.tar.gz
NorthstarLauncher-e85a3eee190e623e1d6397b4460817170b7bfced.zip
implement some more prs
Diffstat (limited to 'NorthstarDLL/scriptserverbrowser.cpp')
-rw-r--r--NorthstarDLL/scriptserverbrowser.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/NorthstarDLL/scriptserverbrowser.cpp b/NorthstarDLL/scriptserverbrowser.cpp
index bdc49303..0e647f45 100644
--- a/NorthstarDLL/scriptserverbrowser.cpp
+++ b/NorthstarDLL/scriptserverbrowser.cpp
@@ -409,6 +409,13 @@ SQRESULT SQ_CompleteAuthWithLocalServer(void* sqvm)
return SQRESULT_NULL;
}
+// string function NSGetAuthFailReason()
+SQRESULT SQ_GetAuthFailReason(void* sqvm)
+{
+ g_pSquirrel<ScriptContext::UI>->pushstring(sqvm, g_pMasterServerManager->m_sAuthFailureReason.c_str(), -1);
+ return SQRESULT_NOTNULL;
+}
+
ON_DLL_LOAD_CLIENT_RELIESON("client.dll", ScriptServerBrowser, ClientSquirrel, (CModule module))
{
g_pSquirrel<ScriptContext::UI>->AddFuncRegistration("bool", "NSIsMasterServerAuthenticated", "", "", SQ_IsMasterServerAuthenticated);
@@ -440,4 +447,6 @@ ON_DLL_LOAD_CLIENT_RELIESON("client.dll", ScriptServerBrowser, ClientSquirrel, (
g_pSquirrel<ScriptContext::UI>->AddFuncRegistration("void", "NSTryAuthWithLocalServer", "", "", SQ_TryAuthWithLocalServer);
g_pSquirrel<ScriptContext::UI>->AddFuncRegistration("void", "NSCompleteAuthWithLocalServer", "", "", SQ_CompleteAuthWithLocalServer);
+
+ g_pSquirrel<ScriptContext::UI>->AddFuncRegistration("string", "NSGetAuthFailReason", "", "", SQ_GetAuthFailReason);
}