sending the name (no effective effect)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5129 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
@@ -69,7 +69,7 @@ struct mapaction : serveraction
|
||||
{
|
||||
bool notify = valid_client(caller);
|
||||
int maploc = MAP_NOTFOUND;
|
||||
mapstats *ms = map[0] ? getservermapstats(map, false, &maploc) : NULL; // this is very redundant, since startgame gets the layout
|
||||
mapstats *ms = map[0] ? getservermapstats(map, false, &maploc) : NULL;
|
||||
mapok = mode == GMODE_COOPEDIT || ( ms != NULL && mapisok(ms) );
|
||||
if(!mapok)
|
||||
{
|
||||
|
||||
@@ -1267,6 +1267,7 @@ void clearservers()
|
||||
}
|
||||
|
||||
#define RETRIEVELIMIT 20000
|
||||
extern char *global_name;
|
||||
|
||||
void retrieveservers(vector<char> &data)
|
||||
{
|
||||
@@ -1278,7 +1279,9 @@ void retrieveservers(vector<char> &data)
|
||||
show_out_of_renderloop_progress(0, text);
|
||||
|
||||
int starttime = SDL_GetTicks(), timeout = 0;
|
||||
const char *req = "list\n";
|
||||
string request;
|
||||
sprintf(request, "list %s\n",global_name);
|
||||
const char *req = request;
|
||||
int reqlen = strlen(req);
|
||||
ENetBuffer buf;
|
||||
while(reqlen > 0)
|
||||
|
||||
@@ -155,12 +155,14 @@ void flushmasterinput()
|
||||
else disconnectmaster();
|
||||
}
|
||||
|
||||
extern char *global_name;
|
||||
|
||||
// send alive signal to masterserver every hour of uptime
|
||||
static inline void updatemasterserver(int millis, int port)
|
||||
{
|
||||
if(!lastupdatemaster || millis-lastupdatemaster>60*60*1000)
|
||||
{
|
||||
if(mastername[0]) requestmasterf("regserv %d\n", port);
|
||||
if(mastername[0]) requestmasterf("regserv %d %s\n", port, global_name);
|
||||
lastupdatemaster = millis ? millis : 1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user