diff options
| author | auth <[email protected]> | 2020-07-11 23:19:24 +0200 |
|---|---|---|
| committer | auth <[email protected]> | 2020-07-11 23:19:24 +0200 |
| commit | 883aafaf87ec22aa4c9142ac5c836040a0f531b4 (patch) | |
| tree | 38a73a202d815719991efeecfd3769dea7d20984 /server/src/client | |
| parent | Added blacklist implementation on server. (diff) | |
| download | loader-883aafaf87ec22aa4c9142ac5c836040a0f531b4.tar.xz loader-883aafaf87ec22aa4c9142ac5c836040a0f531b4.zip | |
Small changes.
Diffstat (limited to 'server/src/client')
| -rw-r--r-- | server/src/client/blacklist.h | 6 | ||||
| -rw-r--r-- | server/src/client/client.cpp | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/server/src/client/blacklist.h b/server/src/client/blacklist.h index ea9e261..397dc6c 100644 --- a/server/src/client/blacklist.h +++ b/server/src/client/blacklist.h @@ -47,6 +47,12 @@ public: return true; } } + + for(auto &item : m_data["hwids"]) { + if(item.get<std::string>() == key) { + return true; + } + } return false; } }; diff --git a/server/src/client/client.cpp b/server/src/client/client.cpp index 1163ab5..9b46574 100644 --- a/server/src/client/client.cpp +++ b/server/src/client/client.cpp @@ -19,7 +19,7 @@ bool tcp::client::init_ssl(SSL_CTX* server_ctx) { if (ret <= 0) { int err = SSL_get_error(m_ssl, ret); - io::logger->error("{} failed to accept ssl, return code {}", m_ip, + io::logger->error("{} failed to accept ssl, return code {}.", m_ip, err); return false; } @@ -42,7 +42,7 @@ int tcp::client::stream(std::vector<char>& data, float *dur/*= nullptr*/) { auto size = data.size(); auto networked_size = htonl(size); - int a = write(&networked_size, sizeof(networked_size)); + write(&networked_size, sizeof(networked_size)); // with 4kb chunk size, speed peaks at 90mb/s without enc // speed is at ~75mb/s with xor |