summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
Diffstat (limited to 'src/net')
-rw-r--r--src/net/eathena/generalrecv.cpp15
-rw-r--r--src/net/tmwa/generalrecv.cpp17
2 files changed, 32 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.");
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.");