[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
+6 -6
View File
@@ -1,5 +1,5 @@
#include "console_server.h"
#include "../string_util.h"
#include "../strings.h"
#include <fmt/format.h>
EQ::Net::ConsoleServer::ConsoleServer(const std::string &addr, int port)
@@ -52,11 +52,11 @@ void EQ::Net::ConsoleServer::ConnectionDisconnected(ConsoleServerConnection *c)
void EQ::Net::ConsoleServer::ProcessCommand(ConsoleServerConnection *c, const std::string &cmd)
{
auto split = SplitString(cmd, ' ');
auto split = Strings::Split(cmd, ' ');
if (split.size() > 0) {
auto command = split[0];
ToLowerString(command);
command = Strings::ToLower(command);
if (command == "help" || command == "?") {
c->SendLine("Commands:");
@@ -70,9 +70,9 @@ void EQ::Net::ConsoleServer::ProcessCommand(ConsoleServerConnection *c, const st
c->SendPrompt();
return;
}
split.erase(split.begin(), split.begin() + 1);
auto cmd_def = m_commands.find(command);
if (cmd_def != m_commands.end()) {
if (c->Admin() >= cmd_def->second.status_required) {