summaryrefslogtreecommitdiff
path: root/src/net/eathena/generalrecv.cpp
diff options
context:
space:
mode:
authorjak1 <mike.wollmann@gmail.com>2021-06-06 14:24:49 +0200
committerjak1 <mike.wollmann@gmail.com>2021-06-06 14:24:49 +0200
commit825ef1e963fd8a30e04e69f676eecc90e601f4e1 (patch)
tree593221735bbd9cce62cfc34db1f706d20d5c9d92 /src/net/eathena/generalrecv.cpp
parent534de91101fca098a8cc3878295cf4ce529810b7 (diff)
downloadplus-825ef1e963fd8a30e04e69f676eecc90e601f4e1.tar.gz
plus-825ef1e963fd8a30e04e69f676eecc90e601f4e1.tar.bz2
plus-825ef1e963fd8a30e04e69f676eecc90e601f4e1.tar.xz
plus-825ef1e963fd8a30e04e69f676eecc90e601f4e1.zip
added exitcode 7 to unique sessions (-S)
Diffstat (limited to 'src/net/eathena/generalrecv.cpp')
-rw-r--r--src/net/eathena/generalrecv.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/net/eathena/generalrecv.cpp b/src/net/eathena/generalrecv.cpp
index f1a6654dc..c3dc4b4b8 100644
--- a/src/net/eathena/generalrecv.cpp
+++ b/src/net/eathena/generalrecv.cpp
@@ -24,6 +24,7 @@
#include "client.h"
#include "logger.h"
+#include "settings.h"
#include "net/messagein.h"
@@ -78,6 +79,20 @@ void GeneralRecv::processConnectionProblem(Net::MessageIn &msg)
// TRANSLATORS: error message
errorMessage = _("Sorry, you are underaged.");
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 = _("Unique Session required.");
+ }
+ break;
case 8:
// TRANSLATORS: error message
errorMessage = _("Duplicated login.");