File diff r2203:ad7839082e5a → r2204:4670311b130c
network_server.c
Show inline comments
 
@@ -6,50 +6,48 @@
 
#include "strings.h"
 
#include "network_data.h"
 

	
 
#ifdef ENABLE_NETWORK
 

	
 
#include "table/strings.h"
 
#include "functions.h"
 
#include "network_server.h"
 
#include "network_udp.h"
 
#include "console.h"
 
#include "command.h"
 
#include "gfx.h"
 
#include "saveload.h"
 
#include "vehicle.h"
 
#include "station.h"
 
#include "settings.h"
 
#include "variables.h"
 

	
 
// This file handles all the server-commands
 

	
 
void NetworkHandleCommandQueue(NetworkClientState *cs);
 
void NetworkPopulateCompanyInfo(void);
 
void NetworkSendPatchSettings(NetworkClientState *cs);
 

	
 
extern const char _openttd_revision[];
 

	
 
// Is the network enabled?
 

	
 
// **********
 
// Sending functions
 
//   DEF_SERVER_SEND_COMMAND has parameter: NetworkClientState *cs
 
// **********
 

	
 
DEF_SERVER_SEND_COMMAND_PARAM(PACKET_SERVER_CLIENT_INFO)(NetworkClientState *cs, NetworkClientInfo *ci)
 
{
 
	//
 
	// Packet: SERVER_CLIENT_INFO
 
	// Function: Sends info about a client
 
	// Data:
 
	//    uint16:  The index of the client (always unique on a server. 1 = server)
 
	//    uint8:  As which player the client is playing
 
	//    String: The name of the client
 
	//    String: The unique id of the client
 
	//
 

	
 
	Packet *p;
 

	
 
	if (ci->client_index != NETWORK_EMPTY_INDEX) {
 
		p = NetworkSend_Init(PACKET_SERVER_CLIENT_INFO);
 
		NetworkSend_uint16(p, ci->client_index);