mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-09 20:24:16 +00:00
breakout gmlevel into a scoped enum (#996)
* breakout gmlevel enum and make it a class tested that things still work slash command, chat restrictions, packets and serializations * fix GM level for some slash commands * fix new use of this enum
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
#include "CharacterComponent.h"
|
||||
#include "Database.h"
|
||||
#include "dMessageIdentifiers.h"
|
||||
#include "eGameMasterLevel.h"
|
||||
#include "eReplicaComponentType.h"
|
||||
|
||||
void ClientPackets::HandleChatMessage(const SystemAddress& sysAddr, Packet* packet) {
|
||||
@@ -66,7 +67,7 @@ void ClientPackets::HandleChatMessage(const SystemAddress& sysAddr, Packet* pack
|
||||
}
|
||||
|
||||
std::string playerName = user->GetLastUsedChar()->GetName();
|
||||
bool isMythran = user->GetLastUsedChar()->GetGMLevel() > 0;
|
||||
bool isMythran = user->GetLastUsedChar()->GetGMLevel() > eGameMasterLevel::CIVILIAN;
|
||||
|
||||
if (!user->GetLastChatMessageApproved() && !isMythran) return;
|
||||
|
||||
|
Reference in New Issue
Block a user