diff --git a/source/glest_game/main/main.cpp b/source/glest_game/main/main.cpp index 6fdfd586e..e75e9707a 100644 --- a/source/glest_game/main/main.cpp +++ b/source/glest_game/main/main.cpp @@ -3013,6 +3013,14 @@ int glestMain(int argc, char** argv) { config.setInt("ServerPort",internalPort); config.setInt("MasterServerExternalPort",externalPort); config.setInt("FTPServerPort",internalPort+1); + + if(paramPartPortsTokens.size() >= 3 && paramPartPortsTokens[2].length() > 0) { + int statusPort = strToInt(paramPartPortsTokens[2]); + + printf("Forcing status port# %d\n",statusPort); + + config.setInt("ServerAdminPort",statusPort); + } } else { printf("\nInvalid ports specified on commandline [%s] value [%s]\n\n",argv[foundParamIndIndex],(paramPartTokens.size() >= 2 ? paramPartTokens[1].c_str() : NULL)); diff --git a/source/shared_lib/include/platform/sdl/platform_main.h b/source/shared_lib/include/platform/sdl/platform_main.h index f931d113e..cfade95c1 100644 --- a/source/shared_lib/include/platform/sdl/platform_main.h +++ b/source/shared_lib/include/platform/sdl/platform_main.h @@ -172,13 +172,15 @@ void printParameterHelp(const char *argv0, bool foundInvalidArgs) { printf("\n%s\tCheck the current status of a headless server.",GAME_ARGS[GAME_ARG_MASTERSERVER_STATUS]); - printf("\n%s=x,y\t\t\tForce hosted games to listen internally on port",GAME_ARGS[GAME_ARG_USE_PORTS]); - printf("\n\t\t\t\tx, externally on port y."); + printf("\n%s=x,y,z\t\t\tForce hosted games to listen internally on port",GAME_ARGS[GAME_ARG_USE_PORTS]); + printf("\n\t\t\t\tx, externally on port y and game status on port z."); printf("\n \t\tWhere x is the internal port # on the local"); printf("\n \t\t machine to listen for connects"); printf("\n \t\t y is the external port # on the"); printf("\n \t\t router/proxy to forward connection"); printf("\n \t\t from to the internal port #"); + printf("\n \t\t z is the game status port # on the"); + printf("\n \t\t local machine to listen for status requests"); printf("\n \t\t*NOTE: If enabled the FTP Server port #'s will"); printf("\n \t\t be set to x+1 to x+9");