aboutsummaryrefslogtreecommitdiff
path: root/server/src/client/client.h
diff options
context:
space:
mode:
authorauth <[email protected]>2020-07-13 23:05:20 +0200
committerauth <[email protected]>2020-07-13 23:05:20 +0200
commite177151308cbdfb2b96119389cf5bf7c2659b94e (patch)
tree7e5737aca17322bf3d39ee5643b3ae2d5deea8f3 /server/src/client/client.h
parentSmall changes. (diff)
downloadloader-e177151308cbdfb2b96119389cf5bf7c2659b94e.tar.xz
loader-e177151308cbdfb2b96119389cf5bf7c2659b94e.zip
Forum integration.
Added separate packet ids for login request/response. Added login responses. Small code changes.
Diffstat (limited to 'server/src/client/client.h')
-rw-r--r--server/src/client/client.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/server/src/client/client.h b/server/src/client/client.h
index a3d558d..2777a0d 100644
--- a/server/src/client/client.h
+++ b/server/src/client/client.h
@@ -3,6 +3,17 @@
namespace tcp {
+enum client_state {
+ idle = 0, logged_in, waiting, injected
+};
+
+enum login_result {
+ login_fail = 15494,
+ hwid_mismatch = 11006,
+ login_success = 61539,
+ banned = 28618
+};
+
class client {
int m_socket;
SSL* m_ssl;
@@ -14,10 +25,11 @@ class client {
public:
std::string hwid;
+ int state;
client() : m_socket{-1} {};
client(const int& socket, const std::string_view ip)
- : m_socket{std::move(socket)}, m_ip{ip}, m_ssl{nullptr} {}
+ : m_socket{std::move(socket)}, m_ip{ip}, m_ssl{nullptr}, state{-1} {}
~client() = default;
bool init_ssl(SSL_CTX* server_ctx);