mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-04 17:54:01 +00:00
Breakout ServerDisconnectIdentifiers into an enum (#995)
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include "dLogger.h"
|
||||
#include "Game.h"
|
||||
#include "dZoneManager.h"
|
||||
#include "eServerDisconnectIdentifiers.h"
|
||||
|
||||
User::User(const SystemAddress& sysAddr, const std::string& username, const std::string& sessionKey) {
|
||||
m_AccountID = 0;
|
||||
@@ -126,6 +127,6 @@ void User::UserOutOfSync() {
|
||||
if (m_AmountOfTimesOutOfSync > m_MaxDesyncAllowed) {
|
||||
//YEET
|
||||
Game::logger->Log("User", "User %s was out of sync %i times out of %i, disconnecting for suspected speedhacking.", m_Username.c_str(), m_AmountOfTimesOutOfSync, m_MaxDesyncAllowed);
|
||||
Game::server->Disconnect(this->m_SystemAddress, SERVER_DISCON_KICK);
|
||||
Game::server->Disconnect(this->m_SystemAddress, eServerDisconnectIdentifiers::PLAY_SCHEDULE_TIME_DONE);
|
||||
}
|
||||
}
|
||||
|
@@ -74,6 +74,7 @@
|
||||
#include "dMessageIdentifiers.h"
|
||||
#include "eMissionState.h"
|
||||
#include "TriggerComponent.h"
|
||||
#include "eServerDisconnectIdentifiers.h"
|
||||
|
||||
void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entity* entity, const SystemAddress& sysAddr) {
|
||||
std::string chatCommand;
|
||||
@@ -1094,7 +1095,7 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit
|
||||
return;
|
||||
}
|
||||
|
||||
Game::server->Disconnect(player->GetSystemAddress(), SERVER_DISCON_KICK);
|
||||
Game::server->Disconnect(player->GetSystemAddress(), eServerDisconnectIdentifiers::KICK);
|
||||
|
||||
ChatPackets::SendSystemMessage(sysAddr, u"Kicked: " + username);
|
||||
} else {
|
||||
@@ -1140,7 +1141,7 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit
|
||||
delete userUpdate;
|
||||
|
||||
if (player != nullptr) {
|
||||
Game::server->Disconnect(player->GetSystemAddress(), SERVER_DISCON_KICK);
|
||||
Game::server->Disconnect(player->GetSystemAddress(), eServerDisconnectIdentifiers::FREE_TRIAL_EXPIRED);
|
||||
}
|
||||
|
||||
ChatPackets::SendSystemMessage(sysAddr, u"Banned: " + GeneralUtils::ASCIIToUTF16(args[0]));
|
||||
|
Reference in New Issue
Block a user