Skip to content

Commit

Permalink
[Saylink] Fix cases where saylinks were not being cached (#3508)
Browse files Browse the repository at this point in the history
* [Saylink] Fix cases where saylinks were not being cached

* Update say_link.cpp
  • Loading branch information
Akkadius authored Jul 20, 2023
1 parent 202d2ed commit b5652e6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion common/say_link.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ std::string EQ::SayLinkEngine::InjectSaylinksIfNotExist(const char *message)

void EQ::SayLinkEngine::LoadCachedSaylinks()
{
auto saylinks = SaylinkRepository::GetWhere(database, "phrase not like '%#%'");
auto saylinks = SaylinkRepository::GetWhere(database, "phrase not REGEXP BINARY '[A-Z]' and phrase not REGEXP '[0-9]'");
LogSaylink("Loaded [{}] saylinks into cache", saylinks.size());
g_cached_saylinks = saylinks;
}
Expand All @@ -399,6 +399,7 @@ SaylinkRepository::Saylink EQ::SayLinkEngine::GetOrSaveSaylink(std::string sayli

// return if found from the database
if (!saylinks.empty()) {
g_cached_saylinks.emplace_back(saylinks[0]);
return saylinks[0];
}

Expand Down

0 comments on commit b5652e6

Please sign in to comment.