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:
Rafael Barreto
2010-06-01 17:36:33 +00:00
parent f73a12db33
commit 094646fcc7
3 changed files with 8 additions and 3 deletions
+1 -1
View File
@@ -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)
{
+4 -1
View File
@@ -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)
+3 -1
View File
@@ -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;
}
}