diff options
author | jak1 <mike.wollmann@gmail.com> | 2021-06-06 14:24:49 +0200 |
---|---|---|
committer | jak1 <mike.wollmann@gmail.com> | 2021-06-06 14:24:49 +0200 |
commit | 825ef1e963fd8a30e04e69f676eecc90e601f4e1 (patch) | |
tree | 593221735bbd9cce62cfc34db1f706d20d5c9d92 /src/net/tmwa/generalrecv.cpp | |
parent | 534de91101fca098a8cc3878295cf4ce529810b7 (diff) | |
download | manaplus-825ef1e963fd8a30e04e69f676eecc90e601f4e1.tar.gz manaplus-825ef1e963fd8a30e04e69f676eecc90e601f4e1.tar.bz2 manaplus-825ef1e963fd8a30e04e69f676eecc90e601f4e1.tar.xz manaplus-825ef1e963fd8a30e04e69f676eecc90e601f4e1.zip |
added exitcode 7 to unique sessions (-S)
Diffstat (limited to 'src/net/tmwa/generalrecv.cpp')
-rw-r--r-- | src/net/tmwa/generalrecv.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/net/tmwa/generalrecv.cpp b/src/net/tmwa/generalrecv.cpp index 711e627c6..7cc386c67 100644 --- a/src/net/tmwa/generalrecv.cpp +++ b/src/net/tmwa/generalrecv.cpp @@ -24,6 +24,8 @@ #include "client.h" #include "logger.h" +#include "settings.h" + #include "net/messagein.h" @@ -70,6 +72,21 @@ void GeneralRecv::processConnectionProblem(Net::MessageIn &msg) // TRANSLATORS: error message errorMessage = _("Speed hack detected."); break; + // all launcher (-S) cases should be added here (exitcode = code) + case 7: + if (settings.options.uniqueSession) + { + settings.exitcode = code; + client->setState(State::EXIT); + return; + } + else + { + // TRANSLATORS: error message + errorMessage = _("Wrong Argument set! " + "(launcher option)"); + } + break; case 8: // TRANSLATORS: error message errorMessage = _("Duplicated login."); |