author | matthijs |
Wed, 22 Mar 2006 22:26:16 +0000 | |
branch | 0.4.5 |
changeset 9958 | bed516c67d61 |
parent 2548 | 97ada3bd2702 |
child 3623 | 2dd90d28fe20 |
permissions | -rw-r--r-- |
2186 | 1 |
/* $Id$ */ |
2 |
||
543
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
3 |
#ifndef NETWORK_SERVER_H |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
4 |
#define NETWORK_SERVER_H |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
5 |
|
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
6 |
#ifdef ENABLE_NETWORK |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
7 |
|
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
8 |
DEF_SERVER_SEND_COMMAND(PACKET_SERVER_MAP); |
716
40a349345f82
(svn r1168) -Cleanup: [Network] Cleaned the network code a bit. Added 'const'
truelight
parents:
690
diff
changeset
|
9 |
DEF_SERVER_SEND_COMMAND_PARAM(PACKET_SERVER_ERROR_QUIT)(NetworkClientState *cs, uint16 client_index, NetworkErrorCode errorno); |
40a349345f82
(svn r1168) -Cleanup: [Network] Cleaned the network code a bit. Added 'const'
truelight
parents:
690
diff
changeset
|
10 |
DEF_SERVER_SEND_COMMAND_PARAM(PACKET_SERVER_ERROR)(NetworkClientState *cs, NetworkErrorCode error); |
543
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
11 |
DEF_SERVER_SEND_COMMAND(PACKET_SERVER_SHUTDOWN); |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
12 |
DEF_SERVER_SEND_COMMAND(PACKET_SERVER_NEWGAME); |
1026
5b2681cad645
(svn r1527) -Add: RCon (Remote Connection). A server can set:
truelight
parents:
839
diff
changeset
|
13 |
DEF_SERVER_SEND_COMMAND_PARAM(PACKET_SERVER_RCON)(NetworkClientState *cs, uint16 color, const char *command); |
543
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
14 |
|
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
15 |
bool NetworkFindName(char new_name[NETWORK_NAME_LENGTH]); |
839
62e15965a3d8
(svn r1320) -Fix: fixed chat-bug (that from a certain moment, nobody could talk).. 1
truelight
parents:
785
diff
changeset
|
16 |
void NetworkServer_HandleChat(NetworkAction action, DestType desttype, int dest, const char *msg, uint16 from_index); |
543
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
17 |
|
716
40a349345f82
(svn r1168) -Cleanup: [Network] Cleaned the network code a bit. Added 'const'
truelight
parents:
690
diff
changeset
|
18 |
bool NetworkServer_ReadPackets(NetworkClientState *cs); |
2235
09e4565e5138
(svn r2755) Fix: Fix a desync issue with autoreplace
ludde
parents:
2186
diff
changeset
|
19 |
void NetworkServer_Tick(bool send_frame); |
716
40a349345f82
(svn r1168) -Cleanup: [Network] Cleaned the network code a bit. Added 'const'
truelight
parents:
690
diff
changeset
|
20 |
void NetworkServerMonthlyLoop(void); |
785
e9ca2bcc9c8f
(svn r1252) -Add: [Network] With 'set restart_game_date' you can set the date for in
truelight
parents:
716
diff
changeset
|
21 |
void NetworkServerYearlyLoop(void); |
543
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
22 |
|
2548
97ada3bd2702
(svn r3077) static, const, bracing, indentation, 0 -> '\0'/NULL, typos in comments, excess empty lines, minor other changes
tron
parents:
2538
diff
changeset
|
23 |
static inline const char* GetPlayerIP(const NetworkClientInfo* ci) |
97ada3bd2702
(svn r3077) static, const, bracing, indentation, 0 -> '\0'/NULL, typos in comments, excess empty lines, minor other changes
tron
parents:
2538
diff
changeset
|
24 |
{ |
97ada3bd2702
(svn r3077) static, const, bracing, indentation, 0 -> '\0'/NULL, typos in comments, excess empty lines, minor other changes
tron
parents:
2538
diff
changeset
|
25 |
return inet_ntoa(*(const struct in_addr*)&ci->client_ip); |
97ada3bd2702
(svn r3077) static, const, bracing, indentation, 0 -> '\0'/NULL, typos in comments, excess empty lines, minor other changes
tron
parents:
2538
diff
changeset
|
26 |
} |
2538
81e192bfcf10
(svn r3067) - Feature: allow unbanning players based on banlist-id (as well as IP).
Darkvater
parents:
2436
diff
changeset
|
27 |
|
543
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
28 |
#endif /* ENABLE_NETWORK */ |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff
changeset
|
29 |
|
2436
177cb6a8339f
(svn r2962) - const correctness for all Get* functions and most Draw* functions that don't change their pointer parameters
Darkvater
parents:
2235
diff
changeset
|
30 |
#endif /* NETWORK_SERVER_H */ |