1 | /* |
|
|
2 | * static char *rcsid_newclient_h = |
|
|
3 | * "$Id: newclient.h,v 1.5 2006/08/29 08:01:36 root Exp $"; |
|
|
4 | */ |
|
|
5 | |
|
|
6 | /* |
1 | /* |
7 | CrossFire, A Multiplayer game for X-windows |
2 | CrossFire, A Multiplayer game for X-windows |
8 | |
3 | |
9 | Copyright (C) 2002 Mark Wedel & Crossfire Development Team |
4 | Copyright (C) 2002 Mark Wedel & Crossfire Development Team |
10 | Copyright (C) 1992 Frank Tore Johansen |
5 | Copyright (C) 1992 Frank Tore Johansen |
… | |
… | |
238 | |
233 | |
239 | #define SOUND_NORMAL 0 |
234 | #define SOUND_NORMAL 0 |
240 | #define SOUND_SPELL 1 |
235 | #define SOUND_SPELL 1 |
241 | |
236 | |
242 | /* Contains the base information we use to make up a packet we want to send. */ |
237 | /* Contains the base information we use to make up a packet we want to send. */ |
243 | struct SockList { |
238 | struct SockList |
|
|
239 | { |
244 | int len; |
240 | int len; |
245 | unsigned char *buf; |
241 | unsigned char *buf; |
246 | }; |
242 | }; |
247 | |
243 | |
248 | inline void SockList_AddChar (SockList *sl, char c) |
244 | inline void SockList_AddChar (SockList *sl, char c) |
249 | { |
245 | { |
250 | sl->buf[sl->len++]=c; |
246 | sl->buf[sl->len++]=c; |
251 | } |
247 | } |
252 | |
248 | |
253 | inline void SockList_AddShort (SockList *sl, unsigned short data) |
249 | inline void SockList_AddShort (SockList *sl, unsigned short data) |
254 | { |
250 | { |
255 | sl->buf[sl->len++] = data >> 8; |
251 | sl->buf[sl->len++] = data >> 8; |
256 | sl->buf[sl->len++] = data; |
252 | sl->buf[sl->len++] = data; |
257 | } |
253 | } |
258 | |
254 | |
259 | struct CS_Stats { |
255 | struct CS_Stats |
|
|
256 | { |
260 | int ibytes; /* ibytes, obytes are bytes in, out */ |
257 | int ibytes; /* ibytes, obytes are bytes in, out */ |
261 | int obytes; |
258 | int obytes; |
262 | short max_conn; /* Maximum connections received */ |
259 | short max_conn; /* Maximum connections received */ |
263 | time_t time_start; /* When we started logging this */ |
260 | time_t time_start; /* When we started logging this */ |
264 | }; |
261 | }; |
265 | |
262 | |
266 | extern CS_Stats cst_tot, cst_lst; |
263 | extern CS_Stats cst_tot, cst_lst; |
267 | |
264 | |
268 | #endif |
265 | #endif |
|
|
266 | |