New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request for new commandline parameter: 'name for headless server' #95
Comments
I would appreciate it, too (and had previously suggested it on the forums). Currently the player name option is taken into account when setting the server title. I think it would be much nicer to allow for setting a server title, which, if set, would overrule the current mechanism. Or which would replace it entirely, defaulting to something like "Untitled server". In my opinion this should also be configurable in glest(user).ini, overridden by the command line option. Availability of he command line option should not be limited to headless servers, but also work when you host a game using the GUI client and take part in it. So in my opinion a better option title would be
In addition to changes to the game code, this change would also require modification of the masterserver code, the DB schema and the 'protocol' the game uses to communicate with the masterserver. We would need to add a "serverTitle" value. I would think 25 single byte characters should be sufficient. It would be nice to add "serverAdminName" and "serverAdminEmail" fields of the same size. To tell apart headless and non-headless servers, a separate single byte field "serverType" should be added, which can take the values of 0 (default, non headless) and 1 (headless). This would allow to display servers differently on the games' server list as well as on the masterserver's web UI. |
just as note, ^ This does not help in case
so you are a host/admin player and you are visible as a player, where do you want to see |
Hope you did not mind me removing the "minor bug" association, this very much seems to be an enhancement to me, not a bug. Ad (1): Ad (2): |
:) Ad (1): Ad (2): |
I added --server-title which is used instead of playernames generic game name now. I kept the "titi controls" servername once there is an active controller. Please test, so we can close this issue. |
Test on the same files as headless dev works we get this error: megatest@initiate:~/megaglest/game$ ./start_megaglest --headless-server-mode=vps,exit --use-ports=63012,63012,63011 --server-title=MegaTest2 2> test.log
Disabled reading from console [vps]
Forcing quit after game has completed [exit]
Forcing serverTitle[MegaTest2]
megaglest v3.12-dev
Compiled using: GNUC: 40804 [64bit] platform: Linux-X64 endianness: little
GIT: [Rev: 5357.44f851c] - using STREFLOP [SSE] - [no-denormals]
Forcing internal port# 63012, external port# 63012
Forcing status port# 63011
Language file NOT FOUND, can't open file: [/data/lang/english.lng] switching to default language: english
Error saved to logfile [/home/megatest/.megaglest/error.log]
*ERROR* [2016-01-04 08:46:32] In [/home/jenkins/build/workspace/megaglest-source_l64/source/glest_game/main/main.cpp::handleRuntimeError Line: 641] [File NOT FOUND, can't open file: [/data/lang/english.lng]
Stack Trace:
/home/megatest/megaglest/game/megaglest:Shared::Platform::megaglest_runtime_error::megaglest_runtime_error(std::string const&, bool)address [0xb2552d] line: 346
/home/megatest/megaglest/game/megaglest:Shared::Util::Properties::load(std::string const&, bool)address [0xaf6716] line: 77
/home/megatest/megaglest/game/megaglest:Glest::Game::Lang::loadGameStringProperties(std::string, Shared::Util::Properties&, bool, bool)address [0x619296] line: 200
/home/megatest/megaglest/game/megaglest:Glest::Game::Lang::loadGameStrings(std::string, bool, bool)address [0x61ccf4] line: 66
/home/megatest/megaglest/game/megaglest:Glest::Game::glestMain(int, char**)address [0x6e0b9c] line: 4957
/home/megatest/megaglest/game/megaglest:Glest::Game::glestMainSEHWrapper(int, char**)address [0x6e7546] line: 5860
/lib/x86_64-linux-gnu/libc.so.6:__libc_start_main()address [0x7f7c5976cec5] line: 0
/home/megatest/megaglest/game/megaglest() [0x4f018a]address [0x4f018a]
] gameInitialized = 0, program = (nil)
-------------------------------------------------------------------------------------------------------------------------------
megatest@initiate:~/megaglest/game$ cat test.log
******************************************************
#2 An error occurred and MegaGlest will close.
Error msg = [File NOT FOUND, can't open file: [/data/lang/english.lng]
Stack Trace:
/home/megatest/megaglest/game/megaglest:Shared::Platform::megaglest_runtime_error::megaglest_runtime_error(std::string const&, bool)address [0xb2552d] line: 346
/home/megatest/megaglest/game/megaglest:Shared::Util::Properties::load(std::string const&, bool)address [0xaf6716] line: 77
/home/megatest/megaglest/game/megaglest:Glest::Game::Lang::loadGameStringProperties(std::string, Shared::Util::Properties&, bool, bool)address [0x619296] line: 200
/home/megatest/megaglest/game/megaglest:Glest::Game::Lang::loadGameStrings(std::string, bool, bool)address [0x61ccf4] line: 66
/home/megatest/megaglest/game/megaglest:Glest::Game::glestMain(int, char**)address [0x6e0b9c] line: 4957
/home/megatest/megaglest/game/megaglest:Glest::Game::glestMainSEHWrapper(int, char**)address [0x6e7546] line: 5860
/lib/x86_64-linux-gnu/libc.so.6:__libc_start_main()address [0x7f7c5976cec5] line: 0
/home/megatest/megaglest/game/megaglest() [0x4f018a]address [0x4f018a]
]
Please report this bug to http://bugs.megaglest.org
******************************************************
Aborted (core dumped) without megatest@initiate:~/megaglest/game$ ./start_megaglest --headless-server-mode=vps,exit --use-ports=63012,63012,63011 2> test.log
Disabled reading from console [vps]
Forcing quit after game has completed [exit]
megaglest v3.12-dev
Compiled using: GNUC: 40804 [64bit] platform: Linux-X64 endianness: little
GIT: [Rev: 5357.44f851c] - using STREFLOP [SSE] - [no-denormals]
Forcing internal port# 63012, external port# 63012
Forcing status port# 63011
Waiting for players to join and start a game...
Headless server is now running...
To shutdown type: quit
All commands require you to press ENTER
** #2 Socket peek error for sock = -1 err = -1 lastSocketError = 104 mustGetData = 0
...
-------------------------------------------------------------------------------------------------------------------------------
megatest@initiate:~/megaglest/game$ cat test.log
|
on 5369 1767838 error fixed and --server-title seems to be successfully implemented, |
Such parameter e.g. like:
which is taken into account when also
--headless-server-mode
is used could be quite useful at least in two cases:The text was updated successfully, but these errors were encountered: