From 6b123d4bc61c2db8e379dd5e681834c4053e661d Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Thu, 22 Aug 2024 10:26:43 +0100 Subject: Use C++20 instead of fmtlib when available. --- src/configreader.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/configreader.cpp') diff --git a/src/configreader.cpp b/src/configreader.cpp index 37a180ec6..a40a5ad16 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -31,6 +31,8 @@ # include #endif +#include + #include "inspircd.h" #include "configparser.h" #include "utility/string.h" @@ -570,7 +572,7 @@ void ServerConfig::ApplyModules(User* user) const if (ServerInstance->Modules.Unload(mod)) { - const std::string message = fmt::format("The {} module was unloaded.", modname); + const std::string message = FMT::format("The {} module was unloaded.", modname); if (user) user->WriteNumeric(RPL_UNLOADEDMODULE, modname, message); @@ -578,7 +580,7 @@ void ServerConfig::ApplyModules(User* user) const } else { - const std::string message = fmt::format("Failed to unload the {} module: {}", modname, ServerInstance->Modules.LastError()); + const std::string message = FMT::format("Failed to unload the {} module: {}", modname, ServerInstance->Modules.LastError()); if (user) user->WriteNumeric(ERR_CANTUNLOADMODULE, modname, message); @@ -594,7 +596,7 @@ void ServerConfig::ApplyModules(User* user) const if (ServerInstance->Modules.Load(modname)) { - const std::string message = fmt::format("The {} module was loaded.", modname); + const std::string message = FMT::format("The {} module was loaded.", modname); if (user) user->WriteNumeric(RPL_LOADEDMODULE, modname, message); @@ -602,7 +604,7 @@ void ServerConfig::ApplyModules(User* user) const } else { - const std::string message = fmt::format("Failed to load the {} module: {}", modname, ServerInstance->Modules.LastError()); + const std::string message = FMT::format("Failed to load the {} module: {}", modname, ServerInstance->Modules.LastError()); if (user) user->WriteNumeric(ERR_CANTLOADMODULE, modname, message); -- cgit v1.3.1-10-gc9f91