[Optimization] Handle channel name filter checks in memory (#2767)

* Handle channel name filter checks in memory

With this commit, name filters are loaded into memory when the server loads and new channels are compared against these memory values VS hitting the database each time.

* Minor formatting tweaks
This commit is contained in:
Vayle
2023-01-19 22:23:11 -05:00
committed by GitHub
parent 3424ae2dde
commit ba5b901c16
4 changed files with 50 additions and 6 deletions
+1
View File
@@ -45,6 +45,7 @@ public:
bool GetVariable(const char* varname, char* varvalue, uint16 varvalue_len);
bool LoadChatChannels();
void LoadReservedNamesFromDB();
void LoadFilteredNamesFromDB();
bool IsChatChannelInDB(const std::string& channel_name);
bool CheckChannelNameFilter(const std::string& channel_name);
void SaveChatChannel(const std::string& channel_name, const std::string& channel_owner, const std::string& channel_password, const uint16& min_status);