mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user