version 1.15 | | version 1.16 |
---|
| | |
/* | | /* |
* static char *rcsid_metaserver_c = | | * static char *rcsid_metaserver_c = |
* "$Id: metaserver.c,v 1.15 2003/10/26 06:56:57 mwedel Exp $"; | | * "$Id: metaserver.c,v 1.16 2003/12/02 18:51:44 ryo_saeba Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
The authors can be reached via e-mail at crossfire-devel@real-time.com | | The authors can be reached via e-mail at crossfire-devel@real-time.com |
*/ | | */ |
| | |
| | /** |
| | * \file |
| | * \date 2003-12-02 |
| | * Meta-server related functions. |
| | */ |
| | |
#include <global.h> | | #include <global.h> |
| | |
#ifndef WIN32 /* ---win32 exclude unix header files */ | | #ifndef WIN32 /* ---win32 exclude unix header files */ |
| | |
static int metafd=-1; | | static int metafd=-1; |
static struct sockaddr_in sock; | | static struct sockaddr_in sock; |
| | |
/* metaserver_init sets up the connection. Its only called once. If we are not | | /** |
| | * Connects to metaserver. |
| | * |
| | * Its only called once. If we are not |
* trying to contact the metaserver of the connection attempt fails, metafd will be | | * trying to contact the metaserver of the connection attempt fails, metafd will be |
* set to -1. We use this instead of messing with the settings.meta_on so that | | * set to -1. We use this instead of messing with the settings.meta_on so that |
* that can be examined to at least see what the user was trying to do. | | * that can be examined to at least see what the user was trying to do. |
| | |
} | | } |
} | | } |
| | |
| | /** |
| | * Updates our info in the metaserver |
| | */ |
void metaserver_update() | | void metaserver_update() |
{ | | { |
char data[MAX_BUF], num_players=0; | | char data[MAX_BUF], num_players=0; |