This commit is contained in:
Akkadius 2023-12-16 18:54:25 -06:00
parent e9ca2b4202
commit 75d9e6ffaf
36 changed files with 54 additions and 48 deletions

View File

@ -15,7 +15,7 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#include <fmt/format.h> #include <fmt/core.h>
#include "../common/global_define.h" #include "../common/global_define.h"
#include "../common/classes.h" #include "../common/classes.h"
#include "data_verification.h" #include "data_verification.h"

View File

@ -18,7 +18,7 @@
* *
*/ */
#include <fmt/format.h> #include <fmt/core.h>
#include "eqemu_command_handler.h" #include "eqemu_command_handler.h"
#include "terminal_color.hpp" #include "terminal_color.hpp"
#include "../platform.h" #include "../platform.h"

View File

@ -22,7 +22,7 @@
#include "linked_list.h" #include "linked_list.h"
#include "path_manager.h" #include "path_manager.h"
#include <fstream> #include <fstream>
#include <fmt/format.h> #include <fmt/core.h>
struct LoginConfig { struct LoginConfig {
std::string LoginHost; std::string LoginHost;

View File

@ -33,7 +33,8 @@
#endif #endif
#endif #endif
#include <fmt/format.h> //#define FMT_HEADER_ONLY
#include <fmt/core.h>
#include "types.h" #include "types.h"
namespace Logs { namespace Logs {

View File

@ -2,7 +2,7 @@
#include "../repositories/character_data_repository.h" #include "../repositories/character_data_repository.h"
#include "../json/json_archive_single_line.h" #include "../json/json_archive_single_line.h"
#include <vector> #include <vector>
#include <fmt/format.h> #include <fmt/core.h>
#include <cereal/archives/json.hpp> #include <cereal/archives/json.hpp>
#include <cereal/types/vector.hpp> #include <cereal/types/vector.hpp>

View File

@ -22,6 +22,7 @@
#include "../common/strings.h" #include "../common/strings.h"
#include "../common/rulesys.h" #include "../common/rulesys.h"
#include "../common/util/uuid.h" #include "../common/util/uuid.h"
#include <fmt/core.h>
#include <fmt/format.h> #include <fmt/format.h>
const char* const DZ_REPLAY_TIMER_NAME = "Replay Timer"; // see December 14, 2016 patch notes const char* const DZ_REPLAY_TIMER_NAME = "Replay Timer"; // see December 14, 2016 patch notes

View File

@ -35,7 +35,7 @@
#endif #endif
#include <fmt/format.h> #include <fmt/core.h>
#include <filesystem> #include <filesystem>
#include <iostream> #include <iostream>

View File

@ -19,7 +19,7 @@
*/ */
#include <cstring> #include <cstring>
#include <fmt/format.h> #include <fmt/core.h>
#include <csignal> #include <csignal>
#include <vector> #include <vector>
#include "ip_util.h" #include "ip_util.h"

View File

@ -1,6 +1,6 @@
#include "console_server.h" #include "console_server.h"
#include "../strings.h" #include "../strings.h"
#include <fmt/format.h> #include <fmt/core.h>
EQ::Net::ConsoleServer::ConsoleServer(const std::string &addr, int port) EQ::Net::ConsoleServer::ConsoleServer(const std::string &addr, int port)
{ {

View File

@ -4,7 +4,7 @@
#include "../eqemu_logsys.h" #include "../eqemu_logsys.h"
#include "../servertalk.h" #include "../servertalk.h"
#include "../rulesys.h" #include "../rulesys.h"
#include <fmt/format.h> #include <fmt/core.h>
EQ::Net::ConsoleServerConnection::ConsoleServerConnection(ConsoleServer *parent, std::shared_ptr<TCPConnection> connection) EQ::Net::ConsoleServerConnection::ConsoleServerConnection(ConsoleServer *parent, std::shared_ptr<TCPConnection> connection)
{ {
@ -21,7 +21,7 @@ EQ::Net::ConsoleServerConnection::ConsoleServerConnection(ConsoleServer *parent,
m_connection->OnDisconnect(std::bind(&ConsoleServerConnection::OnDisconnect, this, std::placeholders::_1)); m_connection->OnDisconnect(std::bind(&ConsoleServerConnection::OnDisconnect, this, std::placeholders::_1));
m_connection->Start(); m_connection->Start();
ClearBuffer(); ClearBuffer();
auto addr = m_connection->RemoteIP(); auto addr = m_connection->RemoteIP();
SendLine(fmt::format("Establishing connection from: {0}:{1}", addr, m_connection->RemotePort())); SendLine(fmt::format("Establishing connection from: {0}:{1}", addr, m_connection->RemotePort()));
@ -85,12 +85,12 @@ void EQ::Net::ConsoleServerConnection::QueueMessage(const std::string &msg)
} }
else { else {
std::string cmd(m_line, m_line + m_cursor); std::string cmd(m_line, m_line + m_cursor);
size_t len = m_user.length() + 2 + cmd.length(); size_t len = m_user.length() + 2 + cmd.length();
for (size_t i = 0; i < len; ++i) { for (size_t i = 0; i < len; ++i) {
Send("\x08"); Send("\x08");
} }
if (msg.length() < cmd.length()) { if (msg.length() < cmd.length()) {
Send(msg); Send(msg);
size_t blank_spaces = 2 + cmd.length() - msg.length(); size_t blank_spaces = 2 + cmd.length() - msg.length();

View File

@ -5,7 +5,7 @@
#include "crc32.h" #include "crc32.h"
#include "../eqemu_logsys.h" #include "../eqemu_logsys.h"
#include <zlib.h> #include <zlib.h>
#include <fmt/format.h> #include <fmt/core.h>
#include <sstream> #include <sstream>
EQ::Net::DaybreakConnectionManager::DaybreakConnectionManager() EQ::Net::DaybreakConnectionManager::DaybreakConnectionManager()

View File

@ -1,7 +1,7 @@
#include "packet.h" #include "packet.h"
#include "endian.h" #include "endian.h"
#include <cctype> #include <cctype>
#include <fmt/format.h> #include <fmt/core.h>
void EQ::Net::Packet::PutInt8(size_t offset, int8_t value) void EQ::Net::Packet::PutInt8(size_t offset, int8_t value)
{ {

View File

@ -1,7 +1,7 @@
#include "websocket_server.h" #include "websocket_server.h"
#include "../event/event_loop.h" #include "../event/event_loop.h"
#include "../event/timer.h" #include "../event/timer.h"
#include <fmt/format.h> #include <fmt/core.h>
#include <map> #include <map>
#include <unordered_set> #include <unordered_set>
#include <array> #include <array>
@ -50,7 +50,7 @@ EQ::Net::WebsocketServer::WebsocketServer(const std::string &addr, int port)
if (iter != _impl->connections.end()) { if (iter != _impl->connections.end()) {
iter->second->GetTCPConnection()->Write(data, size); iter->second->GetTCPConnection()->Write(data, size);
} }
return websocketpp::lib::error_code(); return websocketpp::lib::error_code();
}); });
@ -76,7 +76,7 @@ EQ::Net::WebsocketServer::WebsocketServer(const std::string &addr, int port)
_impl->login_handler = [](const WebsocketServerConnection* connection, const std::string& user, const std::string& pass) { _impl->login_handler = [](const WebsocketServerConnection* connection, const std::string& user, const std::string& pass) {
WebsocketLoginStatus ret; WebsocketLoginStatus ret;
ret.account_name = "admin"; ret.account_name = "admin";
if (connection->RemoteIP() == "127.0.0.1" || connection->RemoteIP() == "::") { if (connection->RemoteIP() == "127.0.0.1" || connection->RemoteIP() == "::") {
ret.logged_in = true; ret.logged_in = true;
return ret; return ret;
@ -125,8 +125,8 @@ Json::Value EQ::Net::WebsocketServer::HandleRequest(WebsocketServerConnection *c
void EQ::Net::WebsocketServer::SetMethodHandler(const std::string &method, MethodHandler handler, int required_status) void EQ::Net::WebsocketServer::SetMethodHandler(const std::string &method, MethodHandler handler, int required_status)
{ {
//Reserved method names //Reserved method names
if (method == "subscribe" || if (method == "subscribe" ||
method == "unsubscribe" || method == "unsubscribe" ||
method == "login") { method == "login") {
return; return;
} }
@ -171,7 +171,7 @@ Json::Value EQ::Net::WebsocketServer::Login(WebsocketServerConnection *connectio
auto user = params[0].asString(); auto user = params[0].asString();
auto pass = params[1].asString(); auto pass = params[1].asString();
auto r = _impl->login_handler(connection, user, pass); auto r = _impl->login_handler(connection, user, pass);
if (r.logged_in) { if (r.logged_in) {

View File

@ -3,7 +3,7 @@
#include "../timer.h" #include "../timer.h"
#include "../util/uuid.h" #include "../util/uuid.h"
#include <sstream> #include <sstream>
#include <fmt/format.h> #include <fmt/core.h>
struct EQ::Net::WebsocketServerConnection::Impl { struct EQ::Net::WebsocketServerConnection::Impl {
WebsocketServer *parent; WebsocketServer *parent;
@ -16,7 +16,7 @@ struct EQ::Net::WebsocketServerConnection::Impl {
int status; int status;
}; };
EQ::Net::WebsocketServerConnection::WebsocketServerConnection(WebsocketServer *parent, EQ::Net::WebsocketServerConnection::WebsocketServerConnection(WebsocketServer *parent,
std::shared_ptr<TCPConnection> connection, std::shared_ptr<TCPConnection> connection,
std::shared_ptr<websocket_connection> ws_connection) std::shared_ptr<websocket_connection> ws_connection)
{ {
@ -34,7 +34,7 @@ EQ::Net::WebsocketServerConnection::WebsocketServerConnection(WebsocketServer *p
connection->OnDisconnect([this](EQ::Net::TCPConnection *connection) { connection->OnDisconnect([this](EQ::Net::TCPConnection *connection) {
_impl->parent->ReleaseConnection(this); _impl->parent->ReleaseConnection(this);
}); });
connection->OnRead([this](EQ::Net::TCPConnection *c, const unsigned char *buffer, size_t buffer_size) { connection->OnRead([this](EQ::Net::TCPConnection *c, const unsigned char *buffer, size_t buffer_size) {
_impl->ws_connection->read_all((const char*)buffer, buffer_size); _impl->ws_connection->read_all((const char*)buffer, buffer_size);
}); });

View File

@ -27,7 +27,7 @@
// fmt // fmt
#include <fmt/format.h> #include <fmt/core.h>
//# include <fmt/core.h> //# include <fmt/core.h>
//# define FMT_STRING(s) s //# define FMT_STRING(s) s

View File

@ -1,17 +1,17 @@
/* EQEMu: Everquest Server Emulator /* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2019 EQEMu Development Team (http://eqemulator.net) Copyright (C) 2001-2019 EQEMu Development Team (http://eqemulator.net)
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License. the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY except by those people which sell it, which but WITHOUT ANY WARRANTY except by those people which sell it, which
are required to give you total support for your newly bought product; are required to give you total support for your newly bought product;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details. A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -22,7 +22,7 @@
#include <string> #include <string>
#include <list> #include <list>
#include <fmt/format.h> #include <fmt/core.h>
class DBcore; class DBcore;
@ -37,7 +37,7 @@ namespace EQ
static bool AddProfanity(DBcore *db, std::string profanity); static bool AddProfanity(DBcore *db, std::string profanity);
static bool RemoveProfanity(DBcore *db, std::string profanity); static bool RemoveProfanity(DBcore *db, std::string profanity);
static void RedactMessage(char *message); static void RedactMessage(char *message);
static void RedactMessage(std::string &message); static void RedactMessage(std::string &message);
@ -54,7 +54,7 @@ namespace EQ
static bool load_database_entries(DBcore *db); static bool load_database_entries(DBcore *db);
static bool clear_database_entries(DBcore *db); static bool clear_database_entries(DBcore *db);
static bool check_for_existing_entry(const std::string& profanity); static bool check_for_existing_entry(const std::string& profanity);
}; };
} /*EQEmu*/ } /*EQEmu*/

View File

@ -22,7 +22,7 @@
#include "strings.h" #include "strings.h"
#include <cstdlib> #include <cstdlib>
#include <cstring> #include <cstring>
#include <fmt/format.h> #include <fmt/core.h>
#include "../common/repositories/rule_sets_repository.h" #include "../common/repositories/rule_sets_repository.h"
#include "../common/repositories/rule_values_repository.h" #include "../common/repositories/rule_values_repository.h"

View File

@ -18,7 +18,7 @@
#include <iostream> #include <iostream>
#include <cstring> #include <cstring>
#include <fmt/format.h> #include <fmt/core.h>
#if defined(_MSC_VER) && _MSC_VER >= 1800 #if defined(_MSC_VER) && _MSC_VER >= 1800
#include <algorithm> #include <algorithm>

View File

@ -34,7 +34,7 @@
*/ */
#include "strings.h" #include "strings.h"
#include <fmt/format.h> #include <fmt/core.h>
#include <algorithm> #include <algorithm>
#include <cctype> #include <cctype>

View File

@ -44,7 +44,7 @@
#include <tuple> #include <tuple>
#include <type_traits> #include <type_traits>
#include <fmt/format.h> #include <fmt/core.h>
#ifndef _WIN32 #ifndef _WIN32
// this doesn't appear to affect linux-based systems..need feedback for _WIN64 // this doesn't appear to affect linux-based systems..need feedback for _WIN64
@ -206,7 +206,7 @@ const std::string NUM_TO_ENGLISH_Y[] = {
"Fifty ", "Sixty ", "Seventy ", "Eighty ", "Ninety " "Fifty ", "Sixty ", "Seventy ", "Eighty ", "Ninety "
}; };
// _WIN32 builds require that #include<fmt/format.h> be included in whatever code file the invocation is made from (no header files) // _WIN32 builds require that #include<fmt/core.h> be included in whatever code file the invocation is made from (no header files)
template<typename T1, typename T2> template<typename T1, typename T2>
std::vector<std::string> join_pair( std::vector<std::string> join_pair(
const std::string &glue, const std::string &glue,
@ -239,7 +239,7 @@ std::vector<std::string> join_pair(
return output; return output;
} }
// _WIN32 builds require that #include<fmt/format.h> be included in whatever code file the invocation is made from (no header files) // _WIN32 builds require that #include<fmt/core.h> be included in whatever code file the invocation is made from (no header files)
template<typename T1, typename T2, typename T3, typename T4> template<typename T1, typename T2, typename T3, typename T4>
std::vector<std::string> join_tuple( std::vector<std::string> join_tuple(
const std::string &glue, const std::string &glue,

View File

@ -1,6 +1,6 @@
#include <cstring> #include <cstring>
#include "strings.h" #include "strings.h"
#include <fmt/format.h> #include <fmt/core.h>
#include <algorithm> #include <algorithm>
#include <cctype> #include <cctype>
#include <cinttypes> #include <cinttypes>

View File

@ -1,6 +1,6 @@
#include <cstring> #include <cstring>
#include "strings.h" #include "strings.h"
#include <fmt/format.h> #include <fmt/core.h>
#include <algorithm> #include <algorithm>
#include <cctype> #include <cctype>

View File

@ -1,7 +1,7 @@
#include "uuid.h" #include "uuid.h"
#include <ios> #include <ios>
#include <fmt/format.h> #include <fmt/core.h>
#ifdef _WIN32 #ifdef _WIN32
#include <objbase.h> #include <objbase.h>

View File

@ -35,6 +35,7 @@
#include "wguild_mgr.h" #include "wguild_mgr.h"
#include "../common/zone_store.h" #include "../common/zone_store.h"
#include <set> #include <set>
#include <fmt/format.h>
extern WebInterfaceList web_interface; extern WebInterfaceList web_interface;

View File

@ -31,7 +31,7 @@
#include "../common/md5.h" #include "../common/md5.h"
#include "eqemu_api_world_data_service.h" #include "eqemu_api_world_data_service.h"
#include "../common/zone_store.h" #include "../common/zone_store.h"
#include <fmt/format.h> #include <fmt/core.h>
extern ClientList client_list; extern ClientList client_list;
extern ZSList zoneserver_list; extern ZSList zoneserver_list;

View File

@ -18,7 +18,7 @@
* *
*/ */
#include <fmt/format.h> #include <fmt/core.h>
#include "clientlist.h" #include "clientlist.h"
#include "cliententry.h" #include "cliententry.h"
#include "eqemu_api_world_data_service.h" #include "eqemu_api_world_data_service.h"

View File

@ -23,6 +23,7 @@
#include "../common/repositories/expeditions_repository.h" #include "../common/repositories/expeditions_repository.h"
#include "../common/repositories/expedition_lockouts_repository.h" #include "../common/repositories/expedition_lockouts_repository.h"
#include "../common/repositories/dynamic_zone_members_repository.h" #include "../common/repositories/dynamic_zone_members_repository.h"
#include <fmt/format.h>
void ExpeditionDatabase::PurgeExpiredExpeditions() void ExpeditionDatabase::PurgeExpiredExpeditions()
{ {

View File

@ -16,6 +16,7 @@
#include "../common/repositories/completed_shared_task_activity_state_repository.h" #include "../common/repositories/completed_shared_task_activity_state_repository.h"
#include "../common/repositories/shared_task_dynamic_zones_repository.h" #include "../common/repositories/shared_task_dynamic_zones_repository.h"
#include <ctime> #include <ctime>
#include <fmt/format.h>
extern ClientList client_list; extern ClientList client_list;
extern ZSList zoneserver_list; extern ZSList zoneserver_list;

View File

@ -28,6 +28,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include "../common/event_sub.h" #include "../common/event_sub.h"
#include "web_interface.h" #include "web_interface.h"
#include "../common/zone_store.h" #include "../common/zone_store.h"
#include <fmt/format.h>
extern uint32 numzones; extern uint32 numzones;
extern EQ::Random emu_random; extern EQ::Random emu_random;

View File

@ -65,7 +65,7 @@
#include "dialogue_window.h" #include "dialogue_window.h"
#include "mob.h" #include "mob.h"
#include <fmt/format.h> #include <fmt/core.h>
extern QueryServ* QServ; extern QueryServ* QServ;
extern WorldServer worldserver; extern WorldServer worldserver;

View File

@ -29,7 +29,7 @@
#include "bot.h" #include "bot.h"
#include "client.h" #include "client.h"
#include <fmt/format.h> #include <fmt/core.h>
bool BotDatabase::LoadBotCommandSettings(std::map<std::string, std::pair<uint8, std::vector<std::string>>> &bot_command_settings) bool BotDatabase::LoadBotCommandSettings(std::map<std::string, std::pair<uint8, std::vector<std::string>>> &bot_command_settings)

View File

@ -1,7 +1,7 @@
#include <string.h> #include <string.h>
#include <algorithm> #include <algorithm>
#include <thread> #include <thread>
#include <fmt/format.h> #include <fmt/core.h>
#include "../common/repositories/command_subsettings_repository.h" #include "../common/repositories/command_subsettings_repository.h"
#ifdef _WINDOWS #ifdef _WINDOWS

View File

@ -2,7 +2,7 @@
#include "client.h" #include "client.h"
#include "pathfinder_null.h" #include "pathfinder_null.h"
#include "pathfinder_nav_mesh.h" #include "pathfinder_nav_mesh.h"
#include <fmt/format.h> #include <fmt/core.h>
#include <sys/stat.h> #include <sys/stat.h>
IPathfinder *IPathfinder::Load(const std::string &zone) { IPathfinder *IPathfinder::Load(const std::string &zone) {

View File

@ -27,7 +27,7 @@
// fmt // fmt
//#include <fmt/format.h> //#include <fmt/core.h>
//# include <fmt/core.h> //# include <fmt/core.h>
//# define FMT_STRING(s) s //# define FMT_STRING(s) s

View File

@ -16,7 +16,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#include <fmt/format.h> #include <fmt/core.h>
#include "../common/global_define.h" #include "../common/global_define.h"
#include "../common/types.h" #include "../common/types.h"

View File

@ -25,7 +25,7 @@
#include <ctime> #include <ctime>
#include <iostream> #include <iostream>
#include <fmt/format.h> #include <fmt/core.h>
extern Zone* zone; extern Zone* zone;