mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-11-25 10:48:15 +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:
@@ -23,6 +23,7 @@
|
||||
#include "AssetManager.h"
|
||||
#include "CDClientDatabase.h"
|
||||
#include "dMessageIdentifiers.h"
|
||||
#include "eGameMasterLevel.h"
|
||||
|
||||
UserManager* UserManager::m_Address = nullptr;
|
||||
|
||||
@@ -330,7 +331,7 @@ void UserManager::CreateCharacter(const SystemAddress& sysAddr, Packet* packet)
|
||||
|
||||
//Check to see if our name was pre-approved:
|
||||
bool nameOk = IsNamePreapproved(name);
|
||||
if (!nameOk && u->GetMaxGMLevel() > 1) nameOk = true;
|
||||
if (!nameOk && u->GetMaxGMLevel() > eGameMasterLevel::FORUM_MODERATOR) nameOk = true;
|
||||
|
||||
if (name != "") {
|
||||
sql::PreparedStatement* stmt = Database::CreatePreppedStmt("INSERT INTO `charinfo`(`id`, `account_id`, `name`, `pending_name`, `needs_rename`, `last_login`) VALUES (?,?,?,?,?,?)");
|
||||
|
||||
Reference in New Issue
Block a user