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. --- modules/dccallow.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'modules/dccallow.cpp') diff --git a/modules/dccallow.cpp b/modules/dccallow.cpp index 823f8419b..734fec6bc 100644 --- a/modules/dccallow.cpp +++ b/modules/dccallow.cpp @@ -258,7 +258,7 @@ public: if (i->nickname == target->nick) { dl->erase(i); - user->WriteNumeric(RPL_DCCALLOWREMOVED, user->nick, fmt::format("Removed {} from your DCCALLOW list", target->nick)); + user->WriteNumeric(RPL_DCCALLOWREMOVED, user->nick, FMT::format("Removed {} from your DCCALLOW list", target->nick)); break; } } @@ -291,7 +291,7 @@ public: { if (dccallow.nickname == target->nick) { - user->WriteNumeric(ERR_DCCALLOWINVALID, user->nick, fmt::format("{} is already on your DCCALLOW list", target->nick)); + user->WriteNumeric(ERR_DCCALLOWINVALID, user->nick, FMT::format("{} is already on your DCCALLOW list", target->nick)); return CmdResult::FAILURE; } } @@ -304,7 +304,7 @@ public: } else if (!Duration::IsValid(parameters[1])) { - user->WriteNumeric(ERR_DCCALLOWINVALID, user->nick, fmt::format("{} is not a valid DCCALLOW duration", parameters[1])); + user->WriteNumeric(ERR_DCCALLOWINVALID, user->nick, FMT::format("{} is not a valid DCCALLOW duration", parameters[1])); return CmdResult::FAILURE; } else @@ -325,11 +325,11 @@ public: if (length > 0) { - user->WriteNumeric(RPL_DCCALLOWTIMED, user->nick, fmt::format("Added {} to DCCALLOW list for {}", target->nick, Duration::ToString(length))); + user->WriteNumeric(RPL_DCCALLOWTIMED, user->nick, FMT::format("Added {} to DCCALLOW list for {}", target->nick, Duration::ToString(length))); } else { - user->WriteNumeric(RPL_DCCALLOWPERMANENT, user->nick, fmt::format("Added {} to DCCALLOW list for this session", target->nick)); + user->WriteNumeric(RPL_DCCALLOWPERMANENT, user->nick, FMT::format("Added {} to DCCALLOW list for this session", target->nick)); } /* route it. */ @@ -373,7 +373,7 @@ public: { for (const auto& dccallow : *dl) { - user->WriteNumeric(RPL_DCCALLOWLIST, user->nick, fmt::format("{} ({})", + user->WriteNumeric(RPL_DCCALLOWLIST, user->nick, FMT::format("{} ({})", dccallow.nickname, dccallow.hostmask)); } } @@ -539,7 +539,7 @@ public: time_t expires = iter2->set_on + iter2->length; if (iter2->length != 0 && expires <= ServerInstance->Time()) { - u->WriteNumeric(RPL_DCCALLOWEXPIRED, u->nick, fmt::format("DCCALLOW entry for {} has expired", iter2->nickname)); + u->WriteNumeric(RPL_DCCALLOWEXPIRED, u->nick, FMT::format("DCCALLOW entry for {} has expired", iter2->nickname)); iter2 = dl->erase(iter2); } else @@ -574,7 +574,7 @@ public: { u->WriteNotice(i->nickname + " left the network or changed their nickname and has been removed from your DCCALLOW list"); - u->WriteNumeric(RPL_DCCALLOWREMOVED, u->nick, fmt::format("Removed {} from your DCCALLOW list", i->nickname)); + u->WriteNumeric(RPL_DCCALLOWREMOVED, u->nick, FMT::format("Removed {} from your DCCALLOW list", i->nickname)); dl->erase(i); break; } -- cgit v1.3.1-10-gc9f91