summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-11-16 18:02:08 +0300
committerAndrei Karas <akaras@inbox.ru>2014-11-16 18:02:08 +0300
commitcef3523b7692bd08fa90e98cd6f87184a15960c9 (patch)
treec1cd5b0027bd099bcfe1b9d40b7cf191c8fb5879 /src/main.cpp
parent8df6afa68f9192321f98942348cbcb757ef7bbdc (diff)
downloadplus-cef3523b7692bd08fa90e98cd6f87184a15960c9.tar.gz
plus-cef3523b7692bd08fa90e98cd6f87184a15960c9.tar.bz2
plus-cef3523b7692bd08fa90e98cd6f87184a15960c9.tar.xz
plus-cef3523b7692bd08fa90e98cd6f87184a15960c9.zip
Add new command option --server-type.
It can accept values: eathena, evol, evol2, tmwathena
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 7fc00918f..da445aab6 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -107,6 +107,8 @@ static void printHelp()
// TRANSLATORS: command line help
<< _(" -s --server : Login server name or IP") << std::endl
// TRANSLATORS: command line help
+ << _(" -y --server-type : Login server type") << std::endl
+ // TRANSLATORS: command line help
<< _(" -p --port : Login server port") << std::endl
// TRANSLATORS: command line help
<< _(" -H --update-host : Use this update host") << std::endl
@@ -146,7 +148,7 @@ static void printVersion()
static void parseOptions(const int argc, char *const argv[])
{
- const char *const optstring = "hvud:U:P:Dc:p:l:L:C:s:t:T:a:r";
+ const char *const optstring = "hvud:U:P:Dc:p:y:l:L:C:s:t:T:a:r";
const struct option long_options[] =
{
@@ -171,6 +173,7 @@ static void parseOptions(const int argc, char *const argv[])
{ "tests", no_argument, nullptr, 'T' },
{ "test", required_argument, nullptr, 't' },
{ "renderer", required_argument, nullptr, 'r' },
+ { "server-type", required_argument, nullptr, 'y' },
{ nullptr, 0, nullptr, 0 }
};
@@ -256,6 +259,9 @@ static void parseOptions(const int argc, char *const argv[])
case 'r':
options.renderer = static_cast<int>(atoi(optarg));
break;
+ case 'y':
+ options.serverType = optarg;
+ break;
default:
break;
}