From 75d9e6ffaf3675b3b099c429be06930701dd5be9 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sat, 16 Dec 2023 18:54:25 -0600 Subject: [PATCH] FMT test --- common/classes.cpp | 2 +- common/cli/eqemu_command_handler.cpp | 2 +- common/eqemu_config.h | 2 +- common/eqemu_logsys.h | 3 ++- common/events/player_event_discord_formatter.cpp | 2 +- common/expedition_lockout_timer.cpp | 1 + common/file.cpp | 2 +- common/ip_util.cpp | 2 +- common/net/console_server.cpp | 2 +- common/net/console_server_connection.cpp | 8 ++++---- common/net/daybreak_connection.cpp | 2 +- common/net/packet.cpp | 2 +- common/net/websocket_server.cpp | 12 ++++++------ common/net/websocket_server_connection.cpp | 6 +++--- common/pch/pch.h | 2 +- common/profanity_manager.h | 12 ++++++------ common/rulesys.cpp | 2 +- common/shareddb.cpp | 2 +- common/strings.cpp | 2 +- common/strings.h | 6 +++--- common/strings_legacy.cpp | 2 +- common/strings_misc.cpp | 2 +- common/util/uuid.cpp | 2 +- world/clientlist.cpp | 1 + world/console.cpp | 2 +- world/eqemu_api_world_data_service.cpp | 2 +- world/expedition_database.cpp | 1 + world/shared_task_manager.cpp | 1 + world/zonelist.cpp | 1 + zone/bot_command.cpp | 2 +- zone/bot_database.cpp | 2 +- zone/command.cpp | 2 +- zone/pathfinder_interface.cpp | 2 +- zone/pch.h | 2 +- zone/spawngroup.cpp | 2 +- zone/zonedb.cpp | 2 +- 36 files changed, 54 insertions(+), 48 deletions(-) diff --git a/common/classes.cpp b/common/classes.cpp index f849a5bfd..d983edc7a 100644 --- a/common/classes.cpp +++ b/common/classes.cpp @@ -15,7 +15,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include +#include #include "../common/global_define.h" #include "../common/classes.h" #include "data_verification.h" diff --git a/common/cli/eqemu_command_handler.cpp b/common/cli/eqemu_command_handler.cpp index 9017adbb3..6f06e848b 100644 --- a/common/cli/eqemu_command_handler.cpp +++ b/common/cli/eqemu_command_handler.cpp @@ -18,7 +18,7 @@ * */ -#include +#include #include "eqemu_command_handler.h" #include "terminal_color.hpp" #include "../platform.h" diff --git a/common/eqemu_config.h b/common/eqemu_config.h index ff8788f3e..4d3896320 100644 --- a/common/eqemu_config.h +++ b/common/eqemu_config.h @@ -22,7 +22,7 @@ #include "linked_list.h" #include "path_manager.h" #include -#include +#include struct LoginConfig { std::string LoginHost; diff --git a/common/eqemu_logsys.h b/common/eqemu_logsys.h index d158fbc36..16450f5b6 100644 --- a/common/eqemu_logsys.h +++ b/common/eqemu_logsys.h @@ -33,7 +33,8 @@ #endif #endif -#include +//#define FMT_HEADER_ONLY +#include #include "types.h" namespace Logs { diff --git a/common/events/player_event_discord_formatter.cpp b/common/events/player_event_discord_formatter.cpp index 791c6c02d..c0f0c2fff 100644 --- a/common/events/player_event_discord_formatter.cpp +++ b/common/events/player_event_discord_formatter.cpp @@ -2,7 +2,7 @@ #include "../repositories/character_data_repository.h" #include "../json/json_archive_single_line.h" #include -#include +#include #include #include diff --git a/common/expedition_lockout_timer.cpp b/common/expedition_lockout_timer.cpp index 6422ad55a..a9802a82d 100644 --- a/common/expedition_lockout_timer.cpp +++ b/common/expedition_lockout_timer.cpp @@ -22,6 +22,7 @@ #include "../common/strings.h" #include "../common/rulesys.h" #include "../common/util/uuid.h" +#include #include const char* const DZ_REPLAY_TIMER_NAME = "Replay Timer"; // see December 14, 2016 patch notes diff --git a/common/file.cpp b/common/file.cpp index 632d1696b..94f1de5d8 100644 --- a/common/file.cpp +++ b/common/file.cpp @@ -35,7 +35,7 @@ #endif -#include +#include #include #include diff --git a/common/ip_util.cpp b/common/ip_util.cpp index 4bb906bb5..a41e4d9d9 100644 --- a/common/ip_util.cpp +++ b/common/ip_util.cpp @@ -19,7 +19,7 @@ */ #include -#include +#include #include #include #include "ip_util.h" diff --git a/common/net/console_server.cpp b/common/net/console_server.cpp index a5276f4cf..b3854fc2f 100644 --- a/common/net/console_server.cpp +++ b/common/net/console_server.cpp @@ -1,6 +1,6 @@ #include "console_server.h" #include "../strings.h" -#include +#include EQ::Net::ConsoleServer::ConsoleServer(const std::string &addr, int port) { diff --git a/common/net/console_server_connection.cpp b/common/net/console_server_connection.cpp index e53058f67..72eb540da 100644 --- a/common/net/console_server_connection.cpp +++ b/common/net/console_server_connection.cpp @@ -4,7 +4,7 @@ #include "../eqemu_logsys.h" #include "../servertalk.h" #include "../rulesys.h" -#include +#include EQ::Net::ConsoleServerConnection::ConsoleServerConnection(ConsoleServer *parent, std::shared_ptr connection) { @@ -21,7 +21,7 @@ EQ::Net::ConsoleServerConnection::ConsoleServerConnection(ConsoleServer *parent, m_connection->OnDisconnect(std::bind(&ConsoleServerConnection::OnDisconnect, this, std::placeholders::_1)); m_connection->Start(); ClearBuffer(); - + auto addr = m_connection->RemoteIP(); 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 { std::string cmd(m_line, m_line + m_cursor); - + size_t len = m_user.length() + 2 + cmd.length(); for (size_t i = 0; i < len; ++i) { Send("\x08"); } - + if (msg.length() < cmd.length()) { Send(msg); size_t blank_spaces = 2 + cmd.length() - msg.length(); diff --git a/common/net/daybreak_connection.cpp b/common/net/daybreak_connection.cpp index 0fefc9982..d7a06742c 100644 --- a/common/net/daybreak_connection.cpp +++ b/common/net/daybreak_connection.cpp @@ -5,7 +5,7 @@ #include "crc32.h" #include "../eqemu_logsys.h" #include -#include +#include #include EQ::Net::DaybreakConnectionManager::DaybreakConnectionManager() diff --git a/common/net/packet.cpp b/common/net/packet.cpp index 1ae959e62..15bb3c8d0 100644 --- a/common/net/packet.cpp +++ b/common/net/packet.cpp @@ -1,7 +1,7 @@ #include "packet.h" #include "endian.h" #include -#include +#include void EQ::Net::Packet::PutInt8(size_t offset, int8_t value) { diff --git a/common/net/websocket_server.cpp b/common/net/websocket_server.cpp index f74f437ba..f78ebb503 100644 --- a/common/net/websocket_server.cpp +++ b/common/net/websocket_server.cpp @@ -1,7 +1,7 @@ #include "websocket_server.h" #include "../event/event_loop.h" #include "../event/timer.h" -#include +#include #include #include #include @@ -50,7 +50,7 @@ EQ::Net::WebsocketServer::WebsocketServer(const std::string &addr, int port) if (iter != _impl->connections.end()) { iter->second->GetTCPConnection()->Write(data, size); } - + 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) { WebsocketLoginStatus ret; ret.account_name = "admin"; - + if (connection->RemoteIP() == "127.0.0.1" || connection->RemoteIP() == "::") { ret.logged_in = true; 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) { //Reserved method names - if (method == "subscribe" || - method == "unsubscribe" || + if (method == "subscribe" || + method == "unsubscribe" || method == "login") { return; } @@ -171,7 +171,7 @@ Json::Value EQ::Net::WebsocketServer::Login(WebsocketServerConnection *connectio auto user = params[0].asString(); auto pass = params[1].asString(); - + auto r = _impl->login_handler(connection, user, pass); if (r.logged_in) { diff --git a/common/net/websocket_server_connection.cpp b/common/net/websocket_server_connection.cpp index 3c1271518..8687d8d8c 100644 --- a/common/net/websocket_server_connection.cpp +++ b/common/net/websocket_server_connection.cpp @@ -3,7 +3,7 @@ #include "../timer.h" #include "../util/uuid.h" #include -#include +#include struct EQ::Net::WebsocketServerConnection::Impl { WebsocketServer *parent; @@ -16,7 +16,7 @@ struct EQ::Net::WebsocketServerConnection::Impl { int status; }; -EQ::Net::WebsocketServerConnection::WebsocketServerConnection(WebsocketServer *parent, +EQ::Net::WebsocketServerConnection::WebsocketServerConnection(WebsocketServer *parent, std::shared_ptr connection, std::shared_ptr ws_connection) { @@ -34,7 +34,7 @@ EQ::Net::WebsocketServerConnection::WebsocketServerConnection(WebsocketServer *p connection->OnDisconnect([this](EQ::Net::TCPConnection *connection) { _impl->parent->ReleaseConnection(this); }); - + 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); }); diff --git a/common/pch/pch.h b/common/pch/pch.h index 28e1913f1..2a6b3f51b 100644 --- a/common/pch/pch.h +++ b/common/pch/pch.h @@ -27,7 +27,7 @@ // fmt -#include +#include //# include //# define FMT_STRING(s) s diff --git a/common/profanity_manager.h b/common/profanity_manager.h index 311ca19e0..3d7d378f7 100644 --- a/common/profanity_manager.h +++ b/common/profanity_manager.h @@ -1,17 +1,17 @@ /* EQEMu: Everquest Server Emulator - + Copyright (C) 2001-2019 EQEMu Development Team (http://eqemulator.net) 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 the Free Software Foundation; version 2 of the License. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY except by those people which sell it, which are required to give you total support for your newly bought product; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA @@ -22,7 +22,7 @@ #include #include -#include +#include class DBcore; @@ -37,7 +37,7 @@ namespace EQ static bool AddProfanity(DBcore *db, std::string profanity); static bool RemoveProfanity(DBcore *db, std::string profanity); - + static void RedactMessage(char *message); static void RedactMessage(std::string &message); @@ -54,7 +54,7 @@ namespace EQ static bool load_database_entries(DBcore *db); static bool clear_database_entries(DBcore *db); static bool check_for_existing_entry(const std::string& profanity); - + }; } /*EQEmu*/ diff --git a/common/rulesys.cpp b/common/rulesys.cpp index 0fbd2fa89..91f442ee0 100644 --- a/common/rulesys.cpp +++ b/common/rulesys.cpp @@ -22,7 +22,7 @@ #include "strings.h" #include #include -#include +#include #include "../common/repositories/rule_sets_repository.h" #include "../common/repositories/rule_values_repository.h" diff --git a/common/shareddb.cpp b/common/shareddb.cpp index d75081945..f89a45b06 100644 --- a/common/shareddb.cpp +++ b/common/shareddb.cpp @@ -18,7 +18,7 @@ #include #include -#include +#include #if defined(_MSC_VER) && _MSC_VER >= 1800 #include diff --git a/common/strings.cpp b/common/strings.cpp index 49bf98560..22584207f 100644 --- a/common/strings.cpp +++ b/common/strings.cpp @@ -34,7 +34,7 @@ */ #include "strings.h" -#include +#include #include #include diff --git a/common/strings.h b/common/strings.h index 896e18d1f..20a2344c7 100644 --- a/common/strings.h +++ b/common/strings.h @@ -44,7 +44,7 @@ #include #include -#include +#include #ifndef _WIN32 // 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 " }; -// _WIN32 builds require that #include be included in whatever code file the invocation is made from (no header files) +// _WIN32 builds require that #include be included in whatever code file the invocation is made from (no header files) template std::vector join_pair( const std::string &glue, @@ -239,7 +239,7 @@ std::vector join_pair( return output; } -// _WIN32 builds require that #include be included in whatever code file the invocation is made from (no header files) +// _WIN32 builds require that #include be included in whatever code file the invocation is made from (no header files) template std::vector join_tuple( const std::string &glue, diff --git a/common/strings_legacy.cpp b/common/strings_legacy.cpp index e1d324d45..a0b1edee8 100644 --- a/common/strings_legacy.cpp +++ b/common/strings_legacy.cpp @@ -1,6 +1,6 @@ #include #include "strings.h" -#include +#include #include #include #include diff --git a/common/strings_misc.cpp b/common/strings_misc.cpp index 08355e15e..6570ddb42 100644 --- a/common/strings_misc.cpp +++ b/common/strings_misc.cpp @@ -1,6 +1,6 @@ #include #include "strings.h" -#include +#include #include #include diff --git a/common/util/uuid.cpp b/common/util/uuid.cpp index 7acd1517f..700b42657 100644 --- a/common/util/uuid.cpp +++ b/common/util/uuid.cpp @@ -1,7 +1,7 @@ #include "uuid.h" #include -#include +#include #ifdef _WIN32 #include diff --git a/world/clientlist.cpp b/world/clientlist.cpp index 57b2c8f98..b0f2fe1f5 100644 --- a/world/clientlist.cpp +++ b/world/clientlist.cpp @@ -35,6 +35,7 @@ #include "wguild_mgr.h" #include "../common/zone_store.h" #include +#include extern WebInterfaceList web_interface; diff --git a/world/console.cpp b/world/console.cpp index 24778e02e..25dc5494f 100644 --- a/world/console.cpp +++ b/world/console.cpp @@ -31,7 +31,7 @@ #include "../common/md5.h" #include "eqemu_api_world_data_service.h" #include "../common/zone_store.h" -#include +#include extern ClientList client_list; extern ZSList zoneserver_list; diff --git a/world/eqemu_api_world_data_service.cpp b/world/eqemu_api_world_data_service.cpp index 9ef402383..c8ae73ab1 100644 --- a/world/eqemu_api_world_data_service.cpp +++ b/world/eqemu_api_world_data_service.cpp @@ -18,7 +18,7 @@ * */ -#include +#include #include "clientlist.h" #include "cliententry.h" #include "eqemu_api_world_data_service.h" diff --git a/world/expedition_database.cpp b/world/expedition_database.cpp index 995be8c6e..2fc8133d1 100644 --- a/world/expedition_database.cpp +++ b/world/expedition_database.cpp @@ -23,6 +23,7 @@ #include "../common/repositories/expeditions_repository.h" #include "../common/repositories/expedition_lockouts_repository.h" #include "../common/repositories/dynamic_zone_members_repository.h" +#include void ExpeditionDatabase::PurgeExpiredExpeditions() { diff --git a/world/shared_task_manager.cpp b/world/shared_task_manager.cpp index 42e0a41fa..e5455d23f 100644 --- a/world/shared_task_manager.cpp +++ b/world/shared_task_manager.cpp @@ -16,6 +16,7 @@ #include "../common/repositories/completed_shared_task_activity_state_repository.h" #include "../common/repositories/shared_task_dynamic_zones_repository.h" #include +#include extern ClientList client_list; extern ZSList zoneserver_list; diff --git a/world/zonelist.cpp b/world/zonelist.cpp index c2db3676e..133313b85 100644 --- a/world/zonelist.cpp +++ b/world/zonelist.cpp @@ -28,6 +28,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include "../common/event_sub.h" #include "web_interface.h" #include "../common/zone_store.h" +#include extern uint32 numzones; extern EQ::Random emu_random; diff --git a/zone/bot_command.cpp b/zone/bot_command.cpp index cc4e8a03b..0e879e84e 100644 --- a/zone/bot_command.cpp +++ b/zone/bot_command.cpp @@ -65,7 +65,7 @@ #include "dialogue_window.h" #include "mob.h" -#include +#include extern QueryServ* QServ; extern WorldServer worldserver; diff --git a/zone/bot_database.cpp b/zone/bot_database.cpp index 43f7a6ede..bb861821b 100644 --- a/zone/bot_database.cpp +++ b/zone/bot_database.cpp @@ -29,7 +29,7 @@ #include "bot.h" #include "client.h" -#include +#include bool BotDatabase::LoadBotCommandSettings(std::map>> &bot_command_settings) diff --git a/zone/command.cpp b/zone/command.cpp index bec051a3f..ac24d33cc 100644 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -1,7 +1,7 @@ #include #include #include -#include +#include #include "../common/repositories/command_subsettings_repository.h" #ifdef _WINDOWS diff --git a/zone/pathfinder_interface.cpp b/zone/pathfinder_interface.cpp index 74209703c..8712ab407 100644 --- a/zone/pathfinder_interface.cpp +++ b/zone/pathfinder_interface.cpp @@ -2,7 +2,7 @@ #include "client.h" #include "pathfinder_null.h" #include "pathfinder_nav_mesh.h" -#include +#include #include IPathfinder *IPathfinder::Load(const std::string &zone) { diff --git a/zone/pch.h b/zone/pch.h index fcee3ff1e..e62c63b38 100644 --- a/zone/pch.h +++ b/zone/pch.h @@ -27,7 +27,7 @@ // fmt -//#include +//#include //# include //# define FMT_STRING(s) s diff --git a/zone/spawngroup.cpp b/zone/spawngroup.cpp index acf03f071..3dec03dd4 100644 --- a/zone/spawngroup.cpp +++ b/zone/spawngroup.cpp @@ -16,7 +16,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include +#include #include "../common/global_define.h" #include "../common/types.h" diff --git a/zone/zonedb.cpp b/zone/zonedb.cpp index f49bd6e9e..152bd442d 100755 --- a/zone/zonedb.cpp +++ b/zone/zonedb.cpp @@ -25,7 +25,7 @@ #include #include -#include +#include extern Zone* zone;