about summary refs log tree commit diff
path: root/src/engine/shared/network.h
diff options
context:
space:
mode:
authoroy <Tom_Adams@web.de>2010-06-03 14:48:32 +0200
committeroy <Tom_Adams@web.de>2010-06-03 14:48:32 +0200
commit5988b9d38801f0987f38c99fb944e1a861d07ef3 (patch)
tree11771e6418a694f98ce2561e865b2f29971649bf /src/engine/shared/network.h
parentd581e413c8fa94e4d1069b20bbe4edf1ebe2dbff (diff)
downloadzcatch-5988b9d38801f0987f38c99fb944e1a861d07ef3.tar.gz
zcatch-5988b9d38801f0987f38c99fb944e1a861d07ef3.zip
- show connecting players with rcon status command
- make it possible to limit the number of clients with the same ip that can connect to the server
Diffstat (limited to 'src/engine/shared/network.h')
-rw-r--r--src/engine/shared/network.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/engine/shared/network.h b/src/engine/shared/network.h
index 11a1b70d..7de534a4 100644
--- a/src/engine/shared/network.h
+++ b/src/engine/shared/network.h
@@ -244,6 +244,7 @@ private:
 	NETSOCKET m_Socket;
 	CSlot m_aSlots[NET_MAX_CLIENTS];
 	int m_MaxClients;
+	int m_MaxClientsPerIP;
 
 	CBan *m_aBans[256];
 	CBan m_BanPool[NET_SERVER_MAXBANS];
@@ -262,7 +263,7 @@ public:
 	int SetCallbacks(NETFUNC_NEWCLIENT pfnNewClient, NETFUNC_DELCLIENT pfnDelClient, void *pUser);
 
 	//
-	bool Open(NETADDR BindAddr, int MaxClients, int Flags);
+	bool Open(NETADDR BindAddr, int MaxClients, int MaxClientsPerIP, int Flags);
 	int Close();
 	
 	//
@@ -283,6 +284,9 @@ public:
 	NETADDR ClientAddr(int ClientID) const { return m_aSlots[ClientID].m_Connection.PeerAddress(); }
 	NETSOCKET Socket() const { return m_Socket; }
 	int MaxClients() const { return m_MaxClients; }
+
+	//
+	void SetMaxClientsPerIP(int Max);
 };