From 825ef1e963fd8a30e04e69f676eecc90e601f4e1 Mon Sep 17 00:00:00 2001 From: jak1 Date: Sun, 6 Jun 2021 14:24:49 +0200 Subject: added exitcode 7 to unique sessions (-S) --- src/net/eathena/generalrecv.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/net/eathena/generalrecv.cpp') 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."); -- cgit v1.2.3-70-g09d2