diff options
Diffstat (limited to 'NorthstarDLL/scriptserverbrowser.cpp')
-rw-r--r-- | NorthstarDLL/scriptserverbrowser.cpp | 98 |
1 files changed, 49 insertions, 49 deletions
diff --git a/NorthstarDLL/scriptserverbrowser.cpp b/NorthstarDLL/scriptserverbrowser.cpp index aa5b0e17..2a366b3f 100644 --- a/NorthstarDLL/scriptserverbrowser.cpp +++ b/NorthstarDLL/scriptserverbrowser.cpp @@ -24,21 +24,21 @@ SQRESULT SQ_RequestServerList(void* sqvm) // bool function NSIsRequestingServerList() SQRESULT SQ_IsRequestingServerList(void* sqvm) { - ClientSq_pushbool(sqvm, g_MasterServerManager->m_scriptRequestingServerList); + ClientSq_pushbool(sqvm, g_MasterServerManager->m_bScriptRequestingServerList); return SQRESULT_NOTNULL; } // bool function NSMasterServerConnectionSuccessful() SQRESULT SQ_MasterServerConnectionSuccessful(void* sqvm) { - ClientSq_pushbool(sqvm, g_MasterServerManager->m_successfullyConnected); + ClientSq_pushbool(sqvm, g_MasterServerManager->m_bSuccessfullyConnected); return SQRESULT_NOTNULL; } // int function NSGetServerCount() SQRESULT SQ_GetServerCount(void* sqvm) { - ClientSq_pushinteger(sqvm, g_MasterServerManager->m_remoteServers.size()); + ClientSq_pushinteger(sqvm, g_MasterServerManager->m_vRemoteServers.size()); return SQRESULT_NOTNULL; } @@ -47,19 +47,19 @@ SQRESULT SQ_GetServerName(void* sqvm) { SQInteger serverIndex = ClientSq_getinteger(sqvm, 1); - if (serverIndex >= g_MasterServerManager->m_remoteServers.size()) + if (serverIndex >= g_MasterServerManager->m_vRemoteServers.size()) { ClientSq_pusherror( sqvm, fmt::format( "Tried to get name of server index {} when only {} servers are available", serverIndex, - g_MasterServerManager->m_remoteServers.size()) + g_MasterServerManager->m_vRemoteServers.size()) .c_str()); return SQRESULT_ERROR; } - ClientSq_pushstring(sqvm, g_MasterServerManager->m_remoteServers[serverIndex].name, -1); + ClientSq_pushstring(sqvm, g_MasterServerManager->m_vRemoteServers[serverIndex].name, -1); return SQRESULT_NOTNULL; } @@ -68,19 +68,19 @@ SQRESULT SQ_GetServerDescription(void* sqvm) { SQInteger serverIndex = ClientSq_getinteger(sqvm, 1); - if (serverIndex >= g_MasterServerManager->m_remoteServers.size()) + if (serverIndex >= g_MasterServerManager->m_vRemoteServers.size()) { ClientSq_pusherror( sqvm, fmt::format( "Tried to get description of server index {} when only {} servers are available", serverIndex, - g_MasterServerManager->m_remoteServers.size()) + g_MasterServerManager->m_vRemoteServers.size()) .c_str()); return SQRESULT_ERROR; } - ClientSq_pushstring(sqvm, g_MasterServerManager->m_remoteServers[serverIndex].description.c_str(), -1); + ClientSq_pushstring(sqvm, g_MasterServerManager->m_vRemoteServers[serverIndex].description.c_str(), -1); return SQRESULT_NOTNULL; } @@ -89,19 +89,19 @@ SQInteger SQ_GetServerMap(void* sqvm) { SQInteger serverIndex = ClientSq_getinteger(sqvm, 1); - if (serverIndex >= g_MasterServerManager->m_remoteServers.size()) + if (serverIndex >= g_MasterServerManager->m_vRemoteServers.size()) { ClientSq_pusherror( sqvm, fmt::format( "Tried to get map of server index {} when only {} servers are available", serverIndex, - g_MasterServerManager->m_remoteServers.size()) + g_MasterServerManager->m_vRemoteServers.size()) .c_str()); return SQRESULT_ERROR; } - ClientSq_pushstring(sqvm, g_MasterServerManager->m_remoteServers[serverIndex].map, -1); + ClientSq_pushstring(sqvm, g_MasterServerManager->m_vRemoteServers[serverIndex].map, -1); return SQRESULT_NOTNULL; } @@ -110,19 +110,19 @@ SQRESULT SQ_GetServerPlaylist(void* sqvm) { SQInteger serverIndex = ClientSq_getinteger(sqvm, 1); - if (serverIndex >= g_MasterServerManager->m_remoteServers.size()) + if (serverIndex >= g_MasterServerManager->m_vRemoteServers.size()) { ClientSq_pusherror( sqvm, fmt::format( "Tried to get playlist of server index {} when only {} servers are available", serverIndex, - g_MasterServerManager->m_remoteServers.size()) + g_MasterServerManager->m_vRemoteServers.size()) .c_str()); return SQRESULT_ERROR; } - ClientSq_pushstring(sqvm, g_MasterServerManager->m_remoteServers[serverIndex].playlist, -1); + ClientSq_pushstring(sqvm, g_MasterServerManager->m_vRemoteServers[serverIndex].playlist, -1); return SQRESULT_NOTNULL; } @@ -131,19 +131,19 @@ SQRESULT SQ_GetServerPlayerCount(void* sqvm) { SQInteger serverIndex = ClientSq_getinteger(sqvm, 1); - if (serverIndex >= g_MasterServerManager->m_remoteServers.size()) + if (serverIndex >= g_MasterServerManager->m_vRemoteServers.size()) { ClientSq_pusherror( sqvm, fmt::format( "Tried to get playercount of server index {} when only {} servers are available", serverIndex, - g_MasterServerManager->m_remoteServers.size()) + g_MasterServerManager->m_vRemoteServers.size()) .c_str()); return SQRESULT_ERROR; } - ClientSq_pushinteger(sqvm, g_MasterServerManager->m_remoteServers[serverIndex].playerCount); + ClientSq_pushinteger(sqvm, g_MasterServerManager->m_vRemoteServers[serverIndex].playerCount); return SQRESULT_NOTNULL; } @@ -152,19 +152,19 @@ SQRESULT SQ_GetServerMaxPlayerCount(void* sqvm) { SQInteger serverIndex = ClientSq_getinteger(sqvm, 1); - if (serverIndex >= g_MasterServerManager->m_remoteServers.size()) + if (serverIndex >= g_MasterServerManager->m_vRemoteServers.size()) { ClientSq_pusherror( sqvm, fmt::format( "Tried to get max playercount of server index {} when only {} servers are available", serverIndex, - g_MasterServerManager->m_remoteServers.size()) + g_MasterServerManager->m_vRemoteServers.size()) .c_str()); return SQRESULT_ERROR; } - ClientSq_pushinteger(sqvm, g_MasterServerManager->m_remoteServers[serverIndex].maxPlayers); + ClientSq_pushinteger(sqvm, g_MasterServerManager->m_vRemoteServers[serverIndex].maxPlayers); return SQRESULT_NOTNULL; } @@ -173,19 +173,19 @@ SQRESULT SQ_GetServerID(void* sqvm) { SQInteger serverIndex = ClientSq_getinteger(sqvm, 1); - if (serverIndex >= g_MasterServerManager->m_remoteServers.size()) + if (serverIndex >= g_MasterServerManager->m_vRemoteServers.size()) { ClientSq_pusherror( sqvm, fmt::format( "Tried to get id of server index {} when only {} servers are available", serverIndex, - g_MasterServerManager->m_remoteServers.size()) + g_MasterServerManager->m_vRemoteServers.size()) .c_str()); return SQRESULT_ERROR; } - ClientSq_pushstring(sqvm, g_MasterServerManager->m_remoteServers[serverIndex].id, -1); + ClientSq_pushstring(sqvm, g_MasterServerManager->m_vRemoteServers[serverIndex].id, -1); return SQRESULT_NOTNULL; } @@ -194,19 +194,19 @@ SQRESULT SQ_ServerRequiresPassword(void* sqvm) { SQInteger serverIndex = ClientSq_getinteger(sqvm, 1); - if (serverIndex >= g_MasterServerManager->m_remoteServers.size()) + if (serverIndex >= g_MasterServerManager->m_vRemoteServers.size()) { ClientSq_pusherror( sqvm, fmt::format( "Tried to get hasPassword of server index {} when only {} servers are available", serverIndex, - g_MasterServerManager->m_remoteServers.size()) + g_MasterServerManager->m_vRemoteServers.size()) .c_str()); return SQRESULT_ERROR; } - ClientSq_pushbool(sqvm, g_MasterServerManager->m_remoteServers[serverIndex].requiresPassword); + ClientSq_pushbool(sqvm, g_MasterServerManager->m_vRemoteServers[serverIndex].requiresPassword); return SQRESULT_NOTNULL; } @@ -215,19 +215,19 @@ SQRESULT SQ_GetServerRequiredModsCount(void* sqvm) { SQInteger serverIndex = ClientSq_getinteger(sqvm, 1); - if (serverIndex >= g_MasterServerManager->m_remoteServers.size()) + if (serverIndex >= g_MasterServerManager->m_vRemoteServers.size()) { ClientSq_pusherror( sqvm, fmt::format( "Tried to get required mods count of server index {} when only {} servers are available", serverIndex, - g_MasterServerManager->m_remoteServers.size()) + g_MasterServerManager->m_vRemoteServers.size()) .c_str()); return SQRESULT_ERROR; } - ClientSq_pushinteger(sqvm, g_MasterServerManager->m_remoteServers[serverIndex].requiredMods.size()); + ClientSq_pushinteger(sqvm, g_MasterServerManager->m_vRemoteServers[serverIndex].requiredMods.size()); return SQRESULT_NOTNULL; } @@ -237,31 +237,31 @@ SQRESULT SQ_GetServerRequiredModName(void* sqvm) SQInteger serverIndex = ClientSq_getinteger(sqvm, 1); SQInteger modIndex = ClientSq_getinteger(sqvm, 2); - if (serverIndex >= g_MasterServerManager->m_remoteServers.size()) + if (serverIndex >= g_MasterServerManager->m_vRemoteServers.size()) { ClientSq_pusherror( sqvm, fmt::format( "Tried to get hasPassword of server index {} when only {} servers are available", serverIndex, - g_MasterServerManager->m_remoteServers.size()) + g_MasterServerManager->m_vRemoteServers.size()) .c_str()); return SQRESULT_ERROR; } - if (modIndex >= g_MasterServerManager->m_remoteServers[serverIndex].requiredMods.size()) + if (modIndex >= g_MasterServerManager->m_vRemoteServers[serverIndex].requiredMods.size()) { ClientSq_pusherror( sqvm, fmt::format( "Tried to get required mod name of mod index {} when only {} mod are available", modIndex, - g_MasterServerManager->m_remoteServers[serverIndex].requiredMods.size()) + g_MasterServerManager->m_vRemoteServers[serverIndex].requiredMods.size()) .c_str()); return SQRESULT_ERROR; } - ClientSq_pushstring(sqvm, g_MasterServerManager->m_remoteServers[serverIndex].requiredMods[modIndex].Name.c_str(), -1); + ClientSq_pushstring(sqvm, g_MasterServerManager->m_vRemoteServers[serverIndex].requiredMods[modIndex].Name.c_str(), -1); return SQRESULT_NOTNULL; } @@ -271,31 +271,31 @@ SQRESULT SQ_GetServerRequiredModVersion(void* sqvm) SQInteger serverIndex = ClientSq_getinteger(sqvm, 1); SQInteger modIndex = ClientSq_getinteger(sqvm, 2); - if (serverIndex >= g_MasterServerManager->m_remoteServers.size()) + if (serverIndex >= g_MasterServerManager->m_vRemoteServers.size()) { ClientSq_pusherror( sqvm, fmt::format( "Tried to get required mod version of server index {} when only {} servers are available", serverIndex, - g_MasterServerManager->m_remoteServers.size()) + g_MasterServerManager->m_vRemoteServers.size()) .c_str()); return SQRESULT_ERROR; } - if (modIndex >= g_MasterServerManager->m_remoteServers[serverIndex].requiredMods.size()) + if (modIndex >= g_MasterServerManager->m_vRemoteServers[serverIndex].requiredMods.size()) { ClientSq_pusherror( sqvm, fmt::format( "Tried to get required mod version of mod index {} when only {} mod are available", modIndex, - g_MasterServerManager->m_remoteServers[serverIndex].requiredMods.size()) + g_MasterServerManager->m_vRemoteServers[serverIndex].requiredMods.size()) .c_str()); return SQRESULT_ERROR; } - ClientSq_pushstring(sqvm, g_MasterServerManager->m_remoteServers[serverIndex].requiredMods[modIndex].Version.c_str(), -1); + ClientSq_pushstring(sqvm, g_MasterServerManager->m_vRemoteServers[serverIndex].requiredMods[modIndex].Version.c_str(), -1); return SQRESULT_NOTNULL; } @@ -314,14 +314,14 @@ SQRESULT SQ_TryAuthWithServer(void* sqvm) SQInteger serverIndex = ClientSq_getinteger(sqvm, 1); const SQChar* password = ClientSq_getstring(sqvm, 2); - if (serverIndex >= g_MasterServerManager->m_remoteServers.size()) + if (serverIndex >= g_MasterServerManager->m_vRemoteServers.size()) { ClientSq_pusherror( sqvm, fmt::format( "Tried to auth with server index {} when only {} servers are available", serverIndex, - g_MasterServerManager->m_remoteServers.size()) + g_MasterServerManager->m_vRemoteServers.size()) .c_str()); return SQRESULT_ERROR; } @@ -334,8 +334,8 @@ SQRESULT SQ_TryAuthWithServer(void* sqvm) // do auth g_MasterServerManager->AuthenticateWithServer( g_LocalPlayerUserID, - g_MasterServerManager->m_ownClientAuthToken, - g_MasterServerManager->m_remoteServers[serverIndex].id, + g_MasterServerManager->m_sOwnClientAuthToken, + g_MasterServerManager->m_vRemoteServers[serverIndex].id, (char*)password); return SQRESULT_NULL; @@ -344,14 +344,14 @@ SQRESULT SQ_TryAuthWithServer(void* sqvm) // bool function NSIsAuthenticatingWithServer() SQRESULT SQ_IsAuthComplete(void* sqvm) { - ClientSq_pushbool(sqvm, g_MasterServerManager->m_scriptAuthenticatingWithGameServer); + ClientSq_pushbool(sqvm, g_MasterServerManager->m_bScriptAuthenticatingWithGameServer); return SQRESULT_NOTNULL; } // bool function NSWasAuthSuccessful() SQRESULT SQ_WasAuthSuccessful(void* sqvm) { - ClientSq_pushbool(sqvm, g_MasterServerManager->m_successfullyAuthenticatedWithGameServer); + ClientSq_pushbool(sqvm, g_MasterServerManager->m_bSuccessfullyAuthenticatedWithGameServer); return SQRESULT_NOTNULL; } @@ -365,7 +365,7 @@ SQRESULT SQ_GetAuthFailReason(void* sqvm) // void function NSConnectToAuthedServer() SQRESULT SQ_ConnectToAuthedServer(void* sqvm) { - if (!g_MasterServerManager->m_hasPendingConnectionInfo) + if (!g_MasterServerManager->m_bHasPendingConnectionInfo) { ClientSq_pusherror(sqvm, fmt::format("Tried to connect to authed server before any pending connection info was available").c_str()); return SQRESULT_ERROR; @@ -388,7 +388,7 @@ SQRESULT SQ_ConnectToAuthedServer(void* sqvm) .c_str(), cmd_source_t::kCommandSrcCode); - g_MasterServerManager->m_hasPendingConnectionInfo = false; + g_MasterServerManager->m_bHasPendingConnectionInfo = false; return SQRESULT_NULL; } @@ -396,7 +396,7 @@ SQRESULT SQ_ConnectToAuthedServer(void* sqvm) SQRESULT SQ_TryAuthWithLocalServer(void* sqvm) { // do auth request - g_MasterServerManager->AuthenticateWithOwnServer(g_LocalPlayerUserID, g_MasterServerManager->m_ownClientAuthToken); + g_MasterServerManager->AuthenticateWithOwnServer(g_LocalPlayerUserID, g_MasterServerManager->m_sOwnClientAuthToken); return SQRESULT_NULL; } |