Skip to content

Commit

Permalink
[Cleanup] Remove DBInitVars(), HandleMysqlError(), and IsChatChannelI…
Browse files Browse the repository at this point in the history
…nDB() in ucs/database.h (#3113)

# Notes
- These are unused.
  • Loading branch information
Kinglykrab committed Mar 17, 2023
1 parent 0caee90 commit 97e4547
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
12 changes: 0 additions & 12 deletions ucs/database.cpp
Expand Up @@ -283,18 +283,6 @@ void UCSDatabase::LoadFilteredNamesFromDB()
LogInfo("Loaded [{}] filtered channel name(s)", names.size());
}

bool UCSDatabase::IsChatChannelInDB(const std::string& channel_name)
{
auto r = ChatchannelsRepository::Count(
*this,
fmt::format(
"name = {}", Strings::Escape(channel_name)
)
);

return r > 0;
}

void UCSDatabase::SaveChatChannel(
const std::string& channel_name,
const std::string& channel_owner,
Expand Down
7 changes: 0 additions & 7 deletions ucs/database.h
Expand Up @@ -45,7 +45,6 @@ class UCSDatabase : public Database {
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);
void DeleteChatChannel(const std::string& channel_name);
Expand All @@ -62,12 +61,6 @@ class UCSDatabase : public Database {
void AddFriendOrIgnore(const int& char_id, const int& type, const std::string& name);
void RemoveFriendOrIgnore(const int& char_id, const int& type, const std::string& name);
void GetFriendsAndIgnore(const int& char_id, std::vector<std::string> &Friends, std::vector<std::string> &Ignorees);

protected:
void HandleMysqlError(uint32 errnum);
private:
void DBInitVars();

};

#endif
Expand Down

0 comments on commit 97e4547

Please sign in to comment.