[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:
Chris Miles
2022-07-14 02:10:52 -05:00
committed by GitHub
parent 44c85a0dd7
commit dfd8f84cac
573 changed files with 5197 additions and 5137 deletions
+9 -9
View File
@@ -4,7 +4,7 @@ void command_flagedit(Client *c, const Seperator *sep)
{
int arguments = sep->argnum;
if (!arguments) {
auto flags_link = EQ::SayLinkEngine::GenerateQuestSaylink("#flags", false, "#flags");
auto flags_link = Saylink::Create("#flags", false, "#flags");
c->Message(
Chat::White,
"Usage: #flagedit lock [Zone ID|Zone Short Name] [Flag Name] - Set the specified flag name on the zone, locking the zone"
@@ -48,7 +48,7 @@ void command_flagedit(Client *c, const Seperator *sep)
!is_take &&
!is_unlock
) {
auto flags_link = EQ::SayLinkEngine::GenerateQuestSaylink("#flags", false, "#flags");
auto flags_link = Saylink::Create("#flags", false, "#flags");
c->Message(
Chat::White,
"Usage: #flagedit lock [Zone ID|Zone Short Name] [Flag Name] - Set the specified flag name on the zone, locking the zone"
@@ -85,7 +85,7 @@ void command_flagedit(Client *c, const Seperator *sep)
std::stoul(sep->arg[2]) :
ZoneID(sep->arg[2])
);
std::string zone_short_name = str_tolower(ZoneName(zone_id, true));
std::string zone_short_name = Strings::ToLower(ZoneName(zone_id, true));
bool is_unknown_zone = zone_short_name.find("unknown") != std::string::npos;
if (zone_id && !is_unknown_zone) {
std::string zone_long_name = ZoneLongName(zone_id);
@@ -120,7 +120,7 @@ void command_flagedit(Client *c, const Seperator *sep)
}
std::string popup_text = "<table>";
popup_text += "<tr><td>Zone</td><td>Flag Required</td></tr>";
for (auto row : results) {
@@ -154,7 +154,7 @@ void command_flagedit(Client *c, const Seperator *sep)
std::stoul(sep->arg[2]) :
ZoneID(sep->arg[2])
);
std::string zone_short_name = str_tolower(ZoneName(zone_id, true));
std::string zone_short_name = Strings::ToLower(ZoneName(zone_id, true));
bool is_unknown_zone = zone_short_name.find("unknown") != std::string::npos;
if (zone_id && !is_unknown_zone) {
if (arguments < 3) {
@@ -164,8 +164,8 @@ void command_flagedit(Client *c, const Seperator *sep)
);
return;
}
std::string flag_name = EscapeString(sep->argplus[3]);
std::string flag_name = Strings::Escape(sep->argplus[3]);
std::string zone_long_name = ZoneLongName(zone_id);
auto query = fmt::format(
@@ -209,7 +209,7 @@ void command_flagedit(Client *c, const Seperator *sep)
std::stoul(sep->arg[2]) :
ZoneID(sep->arg[2])
);
std::string zone_short_name = str_tolower(ZoneName(zone_id, true));
std::string zone_short_name = Strings::ToLower(ZoneName(zone_id, true));
bool is_unknown_zone = zone_short_name.find("unknown") != std::string::npos;
if (zone_id && !is_unknown_zone) {
std::string zone_long_name = ZoneLongName(zone_id);
@@ -237,7 +237,7 @@ void command_flagedit(Client *c, const Seperator *sep)
std::stoul(sep->arg[2]) :
ZoneID(sep->arg[2])
);
std::string zone_short_name = str_tolower(ZoneName(zone_id, true));
std::string zone_short_name = Strings::ToLower(ZoneName(zone_id, true));
bool is_unknown_zone = zone_short_name.find("unknown") != std::string::npos;
if (zone_id && !is_unknown_zone) {
std::string zone_long_name = ZoneLongName(zone_id);