diff options
author | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2021-08-09 22:21:46 +0100 |
---|---|---|
committer | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2021-08-09 22:21:46 +0100 |
commit | 9a3e1ec2daf753106ee95d53719d94921d3b051f (patch) | |
tree | 954d8b75530d66c15fcfcf153a3a4f351e49ef8e /NorthstarDedicatedTest/masterserver.h | |
parent | 4d0e4679d05b146e5e43a1a707708c6451099c54 (diff) | |
download | NorthstarLauncher-9a3e1ec2daf753106ee95d53719d94921d3b051f.tar.gz NorthstarLauncher-9a3e1ec2daf753106ee95d53719d94921d3b051f.zip |
add mod localisation, say command and more masterserver stuff
Diffstat (limited to 'NorthstarDedicatedTest/masterserver.h')
-rw-r--r-- | NorthstarDedicatedTest/masterserver.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/NorthstarDedicatedTest/masterserver.h b/NorthstarDedicatedTest/masterserver.h index 76e19b48..9b8e8a89 100644 --- a/NorthstarDedicatedTest/masterserver.h +++ b/NorthstarDedicatedTest/masterserver.h @@ -5,7 +5,7 @@ class RemoteServerInfo { public: - char id[32]; + char id[33]; // 32 bytes + nullterminator // server info char name[64]; @@ -18,12 +18,9 @@ public: // connection stuff bool requiresPassword; - in_addr ip; - int port; public: - RemoteServerInfo(const char* newId, const char* newName, const char* newDescription, const char* newMap, const char* newPlaylist, int newPlayerCount, int newMaxPlayers); - RemoteServerInfo(const char* newId, const char* newName, const char* newDescription, const char* newMap, const char* newPlaylist, int newPlayerCount, int newMaxPlayers, in_addr newIp, int newPort); + RemoteServerInfo(const char* newId, const char* newName, const char* newDescription, const char* newMap, const char* newPlaylist, int newPlayerCount, int newMaxPlayers, bool newRequiresPassword); }; struct RemoteServerConnectionInfo @@ -42,6 +39,8 @@ private: bool m_authenticatingWithGameServer = false; public: + char m_ownServerId[33]; + bool m_scriptRequestingServerList = false; bool m_successfullyConnected = true; @@ -56,7 +55,11 @@ public: public: void ClearServerList(); void RequestServerList(); - void TryAuthenticateWithServer(char* serverId, char* password); + void AuthenticateWithServer(char* serverId, char* password); + void AddSelfToServerList(int port, char* name, char* description, char* map, char* playlist, int maxPlayers, char* password); + void UpdateServerMapAndPlaylist(char* map, char* playlist); + void UpdateServerPlayerCount(int playerCount); + void RemoveSelfFromServerList(); }; void InitialiseSharedMasterServer(HMODULE baseAddress); |