1 | |
|
|
2 | /* |
|
|
3 | * static char *rcsid_init_c = |
|
|
4 | * "$Id: init.C,v 1.7 2006/09/10 13:43:33 root Exp $"; |
|
|
5 | */ |
|
|
6 | |
|
|
7 | /* |
1 | /* |
8 | CrossFire, A Multiplayer game for X-windows |
2 | CrossFire, A Multiplayer game for X-windows |
9 | |
3 | |
10 | Copyright (C) 2001 Mark Wedel |
4 | Copyright (C) 2001 Mark Wedel |
11 | Copyright (C) 1992 Frank Tore Johansen |
5 | Copyright (C) 1992 Frank Tore Johansen |
… | |
… | |
22 | |
16 | |
23 | You should have received a copy of the GNU General Public License |
17 | You should have received a copy of the GNU General Public License |
24 | along with this program; if not, write to the Free Software |
18 | along with this program; if not, write to the Free Software |
25 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
19 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
26 | |
20 | |
27 | The author can be reached via e-mail to crossfire-devel@real-time.com |
21 | The author can be reached via e-mail to <crossfire@schmorp.de> |
28 | */ |
22 | */ |
29 | |
23 | |
30 | /** |
24 | /** |
31 | * \file |
25 | * \file |
32 | * Socket general functions |
26 | * Socket general functions |
… | |
… | |
114 | ns->exp64 = 0; |
108 | ns->exp64 = 0; |
115 | ns->monitor_spells = 0; |
109 | ns->monitor_spells = 0; |
116 | ns->mapmode = Map0Cmd; |
110 | ns->mapmode = Map0Cmd; |
117 | ns->darkness = 1; |
111 | ns->darkness = 1; |
118 | ns->status = Ns_Add; |
112 | ns->status = Ns_Add; |
119 | ns->comment = NULL; |
|
|
120 | ns->old_mode = (Old_Mode) 0; |
|
|
121 | ns->mapx = 11; |
113 | ns->mapx = 11; |
122 | ns->mapy = 11; |
114 | ns->mapy = 11; |
123 | ns->newmapcmd = 0; |
115 | ns->newmapcmd = 0; |
124 | ns->itemcmd = 1; /* Default is version item1 command */ |
116 | ns->itemcmd = 1; /* Default is version item1 command */ |
125 | ns->ext_mapinfos = 0; /*extendedmapinfo datas */ |
117 | ns->ext_mapinfos = 0; /*extendedmapinfo datas */ |
… | |
… | |
340 | |
332 | |
341 | #ifdef ESRV_DEBUG |
333 | #ifdef ESRV_DEBUG |
342 | LOG (llevDebug, "Error closing socket %d\n", ns->fd); |
334 | LOG (llevDebug, "Error closing socket %d\n", ns->fd); |
343 | #endif |
335 | #endif |
344 | } |
336 | } |
|
|
337 | |
345 | if (ns->stats.range) |
338 | if (ns->stats.range) |
346 | free (ns->stats.range); |
339 | free (ns->stats.range); |
|
|
340 | |
347 | if (ns->stats.title) |
341 | if (ns->stats.title) |
348 | free (ns->stats.title); |
342 | free (ns->stats.title); |
349 | if (ns->comment) |
343 | |
350 | free (ns->comment); |
|
|
351 | free (ns->host); |
344 | free (ns->host); |
352 | free (ns->inbuf.buf); |
345 | free (ns->inbuf.buf); |
353 | } |
346 | } |
354 | |
347 | |
355 | /** Sends the 'goodbye' command to the player, and closes connection. */ |
348 | /** Sends the 'goodbye' command to the player, and closes connection. */ |