mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-04 17:54:01 +00:00
Merge pull request #652 from DarkflameUniverse/blacklist-and-chat-changes
Blacklist and chat changes
This commit is contained in:
@@ -18,6 +18,8 @@ User::User(const SystemAddress& sysAddr, const std::string& username, const std:
|
||||
m_SystemAddress = sysAddr;
|
||||
m_Username = username;
|
||||
m_LoggedInCharID = 0;
|
||||
|
||||
m_IsBestFriendMap = std::unordered_map<std::string, bool>();
|
||||
|
||||
//HACK HACK HACK
|
||||
//This needs to be re-enabled / updated whenever the mute stuff is moved to another table.
|
||||
|
@@ -42,6 +42,9 @@ public:
|
||||
bool GetLastChatMessageApproved() { return m_LastChatMessageApproved; }
|
||||
void SetLastChatMessageApproved(bool approved) { m_LastChatMessageApproved = approved; }
|
||||
|
||||
std::unordered_map<std::string, bool> GetIsBestFriendMap() { return m_IsBestFriendMap; }
|
||||
void SetIsBestFriendMap(std::unordered_map<std::string, bool> mapToSet) { m_IsBestFriendMap = mapToSet; }
|
||||
|
||||
bool GetIsMuted() const;
|
||||
|
||||
time_t GetMuteExpire() const;
|
||||
@@ -63,6 +66,8 @@ private:
|
||||
std::vector<Character*> m_Characters;
|
||||
LWOOBJID m_LoggedInCharID;
|
||||
|
||||
std::unordered_map<std::string, bool> m_IsBestFriendMap;
|
||||
|
||||
bool m_LastChatMessageApproved = false;
|
||||
int m_AmountOfTimesOutOfSync = 0;
|
||||
const int m_MaxDesyncAllowed = 12;
|
||||
|
@@ -1193,7 +1193,7 @@ void PetComponent::SetPetNameForModeration(const std::string& petName) {
|
||||
int approved = 1; //default, in mod
|
||||
|
||||
//Make sure that the name isn't already auto-approved:
|
||||
if (Game::chatFilter->IsSentenceOkay(petName, 0)) {
|
||||
if (Game::chatFilter->IsSentenceOkay(petName, 0).empty()) {
|
||||
approved = 2; //approved
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user