summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am4
-rw-r--r--src/progs/manaplus/client.cpp8
2 files changed, 12 insertions, 0 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index a0a7328ce..a1d92c243 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -65,6 +65,10 @@ manaplus_CXXFLAGS += -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC -D_LIBCPP_DEBUG=
dyecmd_CXXFLAGS += -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC -D_LIBCPP_DEBUG=1
endif
+if ENABLE_COMMANDLINEPASSWORD
+manaplus_CXXFLAGS += -DENABLE_COMMANDLINEPASSWORD
+endif
+
if USE_X11
manaplus_CXXFLAGS += -DUSE_X11
dyecmd_CXXFLAGS += -DUSE_X11
diff --git a/src/progs/manaplus/client.cpp b/src/progs/manaplus/client.cpp
index 1ee563bac..22d2bc483 100644
--- a/src/progs/manaplus/client.cpp
+++ b/src/progs/manaplus/client.cpp
@@ -301,6 +301,14 @@ void Client::gameInit()
Dirs::initRootDir();
Dirs::initHomeDir();
+#ifndef ENABLE_COMMANDLINEPASSWORD
+ if (!settings.options.password.empty())
+ {
+ settings.options.password = std::string();
+ logger->log("Command line password parameter disabled.");
+ }
+#endif
+
// Configure logger
if (!settings.options.logFileName.empty())
{