allow updatefrommaster command to be forced

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2808 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Lee Salzman
2008-10-03 23:13:46 +00:00
parent 6ca21e2565
commit a29fc7a531
+3 -3
View File
@@ -533,10 +533,10 @@ void clearservers()
VARP(masterupdatefrequency, 1, 60*60, 24*60*60);
void updatefrommaster()
void updatefrommaster(int force)
{
static int lastupdate = 0;
if(lastupdate && totalmillis-lastupdate<masterupdatefrequency*1000) return;
if(!force && lastupdate && totalmillis-lastupdate<masterupdatefrequency*1000) return;
uchar buf[32000];
uchar *reply = retrieveservers(buf, sizeof(buf));
@@ -562,7 +562,7 @@ void updatefrommaster()
COMMAND(addserver, ARG_2STR);
COMMAND(clearservers, ARG_NONE);
COMMAND(updatefrommaster, ARG_NONE);
COMMAND(updatefrommaster, ARG_1INT);
void writeservercfg()
{