From 7fc926a3bbd5fecbc0467bae2290e00e55a38b96 Mon Sep 17 00:00:00 2001 From: Rafael Barreto Date: Wed, 2 Jun 2010 18:24:28 +0000 Subject: [PATCH] this is not so effective, so, undoing partially git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5136 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/main.cpp | 2 +- source/src/serverbrowser.cpp | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/source/src/main.cpp b/source/src/main.cpp index 2449f84d..51b169a9 100644 --- a/source/src/main.cpp +++ b/source/src/main.cpp @@ -867,7 +867,7 @@ int main(int argc, char **argv) exec("config/sounds.cfg"); exec("config/securemaps.cfg"); exec("config/admin.cfg"); -// execfile("config/servers.cfg"); // do not execute it now + execfile("config/servers.cfg"); persistidents = true; static char resdata[] = { 112, 97, 99, 107, 97, 103, 101, 115, 47, 116, 101, 120, 116, 117, 114, 101, 115, 47, 107, 117, 114, 116, 47, 107, 108, 105, 116, 101, 50, 46, 106, 112, 103, 0 }; diff --git a/source/src/serverbrowser.cpp b/source/src/serverbrowser.cpp index 8dd123e8..139fce93 100644 --- a/source/src/serverbrowser.cpp +++ b/source/src/serverbrowser.cpp @@ -1268,7 +1268,7 @@ void clearservers() #define RETRIEVELIMIT 20000 extern char *global_name; -bool cllock = true, serverscfgread = false; +bool cllock = true; void retrieveservers(vector &data) { @@ -1337,8 +1337,7 @@ void updatefrommaster(int force) retrieveservers(data); if(data.empty()) { - conoutf("master server not replying"); - if ( !serverscfgread ) { execfile("config/servers.cfg"); serverscfgread = true;} + conoutf("Master server not replying. \f1Get more info in http://assault.cubers.net"); } else { @@ -1353,10 +1352,12 @@ void updatefrommaster(int force) } clearservers(); - if ( !strncmp(data.getbuf(), "addserver", 9) ) cllock = false; - if ( !cllock ) execute(data.getbuf()); + if ( !strncmp(data.getbuf(), "addserver", 9) ) cllock = false; // the ms could reply other thing... but currently, this is useless + if ( !cllock ) { + execute(data.getbuf()); + if(curserver) addserver(curname, curport, curweight); + } - if(curserver) addserver(curname, curport, curweight); lastupdate = totalmillis; } }