diff options
author | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2024-02-11 21:39:51 +0100 |
---|---|---|
committer | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2024-03-02 17:05:37 +0100 |
commit | 78d6d9352f66f41963207b04a999d94c17d67cf2 (patch) | |
tree | c286d4a6ebd46bc89808d3e18b2d7d920ea10351 /src/gui/customserverdialog.cpp | |
parent | 8546361abaa6123acd9dc1429575d1fd1cf6a4ec (diff) | |
download | mana-78d6d9352f66f41963207b04a999d94c17d67cf2.tar.gz mana-78d6d9352f66f41963207b04a999d94c17d67cf2.tar.bz2 mana-78d6d9352f66f41963207b04a999d94c17d67cf2.tar.xz mana-78d6d9352f66f41963207b04a999d94c17d67cf2.zip |
Added support for -y / --server-type parameter
Usually this would be guessed correctly by the port, but now it is also
possible to just specify the server type and the port will be derived
from there, unless a default port is given in the branding file.
Closes #56
Diffstat (limited to 'src/gui/customserverdialog.cpp')
-rw-r--r-- | src/gui/customserverdialog.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/customserverdialog.cpp b/src/gui/customserverdialog.cpp index 733a6b5c..455951ec 100644 --- a/src/gui/customserverdialog.cpp +++ b/src/gui/customserverdialog.cpp @@ -194,7 +194,7 @@ void CustomServerDialog::action(const gcn::ActionEvent &event) if (mPortField->getText().empty()) serverInfo.port = ServerInfo::defaultPortForServerType(serverInfo.type); else - serverInfo.port = (short) atoi(mPortField->getText().c_str()); + serverInfo.port = static_cast<uint16_t>(atoi(mPortField->getText().c_str())); // Tell the server has to be saved serverInfo.save = true; |