Updates
This commit is contained in:
@@ -209,8 +209,8 @@ void TSServer::testBanStateChange(const std::shared_ptr<ConnectedClient>& invoke
|
||||
this->forEachClient([&](shared_ptr<ConnectedClient> client) {
|
||||
auto ban = client->resolveActiveBan(client->getPeerIp());
|
||||
if(ban) {
|
||||
debugMessage(this->getServerId(), "Found online client with a active ban. ({})", CLIENT_STR_LOG_PREFIX_(client));
|
||||
auto entryTime = ban->until.time_since_epoch().count() > 0 ? (uint64_t) duration_cast<seconds>(ban->until - system_clock::now()).count() : 0UL;
|
||||
logMessage(this->getServerId(), "Client {} was online, but had an ban whcih effect him has been registered. Disconnecting client.", CLIENT_STR_LOG_PREFIX_(client));
|
||||
auto entryTime = ban->until.time_since_epoch().count() > 0 ? (uint64_t) chrono::ceil<seconds>(ban->until - system_clock::now()).count() : 0UL;
|
||||
this->notify_client_ban(client, invoker, ban->reason, entryTime);
|
||||
client->closeConnection(system_clock::now() + seconds(1));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user