mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-16 22:18:20 +00:00
[Strings] Refactor Strings Usage (#2305)
* Initial commit checkpoint * More functions converted * Commify * More functions * Fin * Sort declarations * Split functions between files * Bots * Update strings.h * Split * Revert find replaces * Repository template * Money * Misc function * Update CMakeLists.txt * Saylink * Update strings.cpp * Swap Strings::Saylink for Saylink::Create since saylink is coupled to zone database * API casings
This commit is contained in:
+16
-16
@@ -55,7 +55,7 @@ void command_who(Client *c, const Seperator *sep)
|
||||
std::string search_string;
|
||||
|
||||
if (sep->arg[1]) {
|
||||
search_string = str_tolower(sep->arg[1]);
|
||||
search_string = Strings::ToLower(sep->arg[1]);
|
||||
}
|
||||
|
||||
int found_count = 0;
|
||||
@@ -82,13 +82,13 @@ void command_who(Client *c, const Seperator *sep)
|
||||
|
||||
if (search_string.length()) {
|
||||
bool found_search_term = (
|
||||
str_tolower(player_name).find(search_string) != std::string::npos ||
|
||||
str_tolower(zone_short_name).find(search_string) != std::string::npos ||
|
||||
str_tolower(displayed_race_name).find(search_string) != std::string::npos ||
|
||||
str_tolower(base_class_name).find(search_string) != std::string::npos ||
|
||||
str_tolower(guild_name).find(search_string) != std::string::npos ||
|
||||
str_tolower(account_name).find(search_string) != std::string::npos ||
|
||||
str_tolower(account_ip).find(search_string) != std::string::npos
|
||||
Strings::ToLower(player_name).find(search_string) != std::string::npos ||
|
||||
Strings::ToLower(zone_short_name).find(search_string) != std::string::npos ||
|
||||
Strings::ToLower(displayed_race_name).find(search_string) != std::string::npos ||
|
||||
Strings::ToLower(base_class_name).find(search_string) != std::string::npos ||
|
||||
Strings::ToLower(guild_name).find(search_string) != std::string::npos ||
|
||||
Strings::ToLower(account_name).find(search_string) != std::string::npos ||
|
||||
Strings::ToLower(account_ip).find(search_string) != std::string::npos
|
||||
);
|
||||
|
||||
if (!found_search_term) {
|
||||
@@ -98,7 +98,7 @@ void command_who(Client *c, const Seperator *sep)
|
||||
|
||||
std::string displayed_guild_name;
|
||||
if (guild_name.length()) {
|
||||
displayed_guild_name = EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
displayed_guild_name = Saylink::Create(
|
||||
fmt::format(
|
||||
"#who \"{}\"",
|
||||
guild_name
|
||||
@@ -111,7 +111,7 @@ void command_who(Client *c, const Seperator *sep)
|
||||
);
|
||||
}
|
||||
|
||||
auto goto_saylink = EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
auto goto_saylink = Saylink::Create(
|
||||
fmt::format(
|
||||
"#goto {}",
|
||||
player_name
|
||||
@@ -120,7 +120,7 @@ void command_who(Client *c, const Seperator *sep)
|
||||
"Goto"
|
||||
);
|
||||
|
||||
auto summon_saylink = EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
auto summon_saylink = Saylink::Create(
|
||||
fmt::format(
|
||||
"#summon {}",
|
||||
player_name
|
||||
@@ -134,7 +134,7 @@ void command_who(Client *c, const Seperator *sep)
|
||||
static_cast<uint8>(player_level)
|
||||
);
|
||||
|
||||
auto class_saylink = EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
auto class_saylink = Saylink::Create(
|
||||
fmt::format(
|
||||
"#who {}",
|
||||
base_class_name
|
||||
@@ -143,7 +143,7 @@ void command_who(Client *c, const Seperator *sep)
|
||||
display_class_name
|
||||
);
|
||||
|
||||
auto race_saylink = EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
auto race_saylink = Saylink::Create(
|
||||
fmt::format(
|
||||
"#who %s",
|
||||
displayed_race_name
|
||||
@@ -152,7 +152,7 @@ void command_who(Client *c, const Seperator *sep)
|
||||
displayed_race_name
|
||||
);
|
||||
|
||||
auto zone_saylink = EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
auto zone_saylink = Saylink::Create(
|
||||
fmt::format(
|
||||
"#who {}",
|
||||
zone_short_name
|
||||
@@ -161,7 +161,7 @@ void command_who(Client *c, const Seperator *sep)
|
||||
zone_long_name
|
||||
);
|
||||
|
||||
auto account_saylink = EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
auto account_saylink = Saylink::Create(
|
||||
fmt::format(
|
||||
"#who {}",
|
||||
account_name
|
||||
@@ -170,7 +170,7 @@ void command_who(Client *c, const Seperator *sep)
|
||||
account_name
|
||||
);
|
||||
|
||||
auto account_ip_saylink = EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
auto account_ip_saylink = Saylink::Create(
|
||||
fmt::format(
|
||||
"#who {}",
|
||||
account_ip
|
||||
|
||||
Reference in New Issue
Block a user