Add best friend check and complete blacklist

This commit is contained in:
Jett
2022-07-17 09:40:34 +01:00
parent fab8a1e982
commit 945e572493
6 changed files with 82 additions and 32 deletions

View File

@@ -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.

View File

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