diff options
author | BobTheBob9 <for.oliver.kirkham@gmail.com> | 2022-10-08 16:47:43 +0100 |
---|---|---|
committer | BobTheBob9 <for.oliver.kirkham@gmail.com> | 2022-10-08 16:47:43 +0100 |
commit | da3d91228c08ec660564368f992a2ba6b78ca4a8 (patch) | |
tree | ce0bc00ae9c5ed647d8eca1f1995b645b40bb803 /NorthstarDLL/scriptserverbrowser.cpp | |
parent | ed77a516d8061db848329072c70fa6b3d910027c (diff) | |
download | NorthstarLauncher-da3d91228c08ec660564368f992a2ba6b78ca4a8.tar.gz NorthstarLauncher-da3d91228c08ec660564368f992a2ba6b78ca4a8.zip |
set serverfilter betterv1.9.8-rc1
Diffstat (limited to 'NorthstarDLL/scriptserverbrowser.cpp')
-rw-r--r-- | NorthstarDLL/scriptserverbrowser.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/NorthstarDLL/scriptserverbrowser.cpp b/NorthstarDLL/scriptserverbrowser.cpp index a361aeb8..e33406fc 100644 --- a/NorthstarDLL/scriptserverbrowser.cpp +++ b/NorthstarDLL/scriptserverbrowser.cpp @@ -371,8 +371,7 @@ SQRESULT SQ_ConnectToAuthedServer(HSquirrelVM* sqvm) // set auth token, then try to connect // i'm honestly not entirely sure how silentconnect works regarding ports and encryption so using connect for now - R2::Cbuf_AddText( - R2::Cbuf_GetCurrentPlayer(), fmt::format("serverfilter {}", info.authToken).c_str(), R2::cmd_source_t::kCommandSrcCode); + R2::g_pCVar->FindVar("serverfilter")->SetValue(info.authToken); R2::Cbuf_AddText( R2::Cbuf_GetCurrentPlayer(), fmt::format( @@ -403,10 +402,8 @@ SQRESULT SQ_CompleteAuthWithLocalServer(HSquirrelVM* sqvm) { // literally just set serverfilter // note: this assumes we have no authdata other than our own - R2::Cbuf_AddText( - R2::Cbuf_GetCurrentPlayer(), - fmt::format("serverfilter {}", g_pServerAuthentication->m_RemoteAuthenticationData.begin()->first).c_str(), - R2::cmd_source_t::kCommandSrcCode); + if (g_pServerAuthentication->m_RemoteAuthenticationData.size()) + R2::g_pCVar->FindVar("serverfilter")->SetValue(g_pServerAuthentication->m_RemoteAuthenticationData.begin()->first.c_str()); return SQRESULT_NULL; } |