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:
@@ -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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user