network_server.h
changeset 4490 a8c299022281
parent 3623 9b612a4bbd39
child 4830 668bcb0a30b2
equal deleted inserted replaced
4489:e84a0355e096 4490:a8c299022281
    20 void NetworkServerMonthlyLoop(void);
    20 void NetworkServerMonthlyLoop(void);
    21 void NetworkServerYearlyLoop(void);
    21 void NetworkServerYearlyLoop(void);
    22 
    22 
    23 static inline const char* GetPlayerIP(const NetworkClientInfo* ci)
    23 static inline const char* GetPlayerIP(const NetworkClientInfo* ci)
    24 {
    24 {
    25 	return inet_ntoa(*(const struct in_addr*)&ci->client_ip);
    25 	struct in_addr addr;
       
    26 
       
    27 	addr.s_addr = ci->client_ip;
       
    28 	return inet_ntoa(addr);
    26 }
    29 }
    27 
    30 
    28 #endif /* ENABLE_NETWORK */
    31 #endif /* ENABLE_NETWORK */
    29 
    32 
    30 #endif /* NETWORK_SERVER_H */
    33 #endif /* NETWORK_SERVER_H */