fix parsing of commandline switches for servers

also:
 * -Y now sets the private key for the server
 * -m without argument uses default masterserver URL
 * servers run LAN-only by default (set ms URL and private key to
   register with the master)
 * use generic locale "POSIX"
This commit is contained in:
ac-stef
2017-06-27 15:15:21 +02:00
parent 25deee5287
commit c8c310886a
9 changed files with 75 additions and 90 deletions
-3
View File
@@ -45,15 +45,12 @@ void setskin(playerent *pl, int skin, int team)
pl->setskin(team, skin);
}
extern char *global_name;
bool duplicatename(playerent *d, char *name = NULL)
{
if(!name) name = d->name;
if(d!=player1 && !strcmp(name, player1->name) && !watchingdemo) return true;
if(!strcmp(name, "you")) return true;
loopv(players) if(players[i] && d!=players[i] && !strcmp(name, players[i]->name)) return true;
global_name = player1->name; // this certainly is not the best place to put this
return false;
}