Breakout ServerDisconnectIdentifiers into an enum (#995)

This commit is contained in:
Aaron Kimbrell
2023-02-19 06:29:14 -06:00
committed by GitHub
parent d138b7b878
commit 6d989f37f1
8 changed files with 40 additions and 25 deletions

View File

@@ -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]));