aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/scriptserverbrowser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'NorthstarDedicatedTest/scriptserverbrowser.cpp')
-rw-r--r--NorthstarDedicatedTest/scriptserverbrowser.cpp98
1 files changed, 49 insertions, 49 deletions
diff --git a/NorthstarDedicatedTest/scriptserverbrowser.cpp b/NorthstarDedicatedTest/scriptserverbrowser.cpp
index 64ffacfc..41506230 100644
--- a/NorthstarDedicatedTest/scriptserverbrowser.cpp
+++ b/NorthstarDedicatedTest/scriptserverbrowser.cpp
@@ -25,21 +25,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;
}
@@ -48,19 +48,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;
}
@@ -69,19 +69,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;
}
@@ -90,19 +90,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;
}
@@ -111,19 +111,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;
}
@@ -132,19 +132,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;
}
@@ -153,19 +153,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;
}
@@ -174,19 +174,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;
}
@@ -195,19 +195,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;
}
@@ -216,19 +216,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;
}
@@ -238,31 +238,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;
}
@@ -272,31 +272,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;
}
@@ -315,14 +315,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;
}
@@ -335,8 +335,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;
@@ -345,21 +345,21 @@ 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;
}
// 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;
@@ -382,7 +382,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;
}
@@ -390,7 +390,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;
}