clean-up & commentary

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6106 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
flowtron
2011-02-15 18:42:26 +00:00
parent 3bd6eeff2a
commit 70250d7d41
2 changed files with 3 additions and 4 deletions
+3 -2
View File
@@ -163,14 +163,15 @@ extern char *global_name;
extern int interm;
extern int totalclients;
// send alive signal to masterserver after 40 minutes of uptime and during an intermission (so theoretically <= 1 hour) - after 1 hour at the latest.
// send alive signal to masterserver after 40 minutes of uptime and if currently in intermission (so theoretically <= 1 hour)
// TODO?: implement a thread to drop this "only in intermission" business, we'll need it once AUTH gets active!
static inline void updatemasterserver(int millis, int port)
{
if(!lastupdatemaster || ((millis-lastupdatemaster)>40*60*1000 && (interm || !totalclients)))
{
char servername[30]; memset(servername,'\0',30); filtertext(servername,global_name,-1,20);
if(mastername[0]) requestmasterf("regserv %d %s %d\n", port, servername[0] ? servername : "noname", AC_VERSION);
lastupdatemaster = millis ? millis : 1;
lastupdatemaster = millis + 1;
}
}