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/services.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'modules/services.cpp') diff --git a/modules/services.cpp b/modules/services.cpp index ad0120798..fbfd8bcb6 100644 --- a/modules/services.cpp +++ b/modules/services.cpp @@ -121,7 +121,7 @@ public: { if (IS_LOCAL(source)) { - source->WriteNumeric(ERR_NOPRIVILEGES, fmt::format("Only a server may modify the +{} channel mode", GetModeChar())); + source->WriteNumeric(ERR_NOPRIVILEGES, FMT::format("Only a server may modify the +{} channel mode", GetModeChar())); return false; } @@ -145,7 +145,7 @@ public: { if (IS_LOCAL(source)) { - source->WriteNumeric(ERR_NOPRIVILEGES, fmt::format("Only a server may modify the +{} user mode", GetModeChar())); + source->WriteNumeric(ERR_NOPRIVILEGES, FMT::format("Only a server may modify the +{} user mode", GetModeChar())); return false; } @@ -202,7 +202,7 @@ public: void Apply(User* u) override { - u->WriteNumeric(RPL_SAVENICK, u->nick, fmt::format("Services reserved nickname: {}", reason)); + u->WriteNumeric(RPL_SAVENICK, u->nick, FMT::format("Services reserved nickname: {}", reason)); u->ChangeNick(u->uuid); } @@ -615,7 +615,7 @@ private: if (mlock->find(change.mh->GetModeChar()) == std::string::npos) return true; // Mode is not locked. - user->WriteNumeric(ERR_MLOCKRESTRICTED, chan->name, change.mh->GetModeChar(), *mlock, fmt::format("Mode cannot be changed as it has been locked {} by services!", + user->WriteNumeric(ERR_MLOCKRESTRICTED, chan->name, change.mh->GetModeChar(), *mlock, FMT::format("Mode cannot be changed as it has been locked {} by services!", chan->IsModeSet(change.mh) ? "on" : "off")); return false; } @@ -640,7 +640,7 @@ private: if (!target->IsModeSet(servprotectmode)) return true; // Target is not a protected service. - user->WriteNumeric(ERR_RESTRICTED, chan->name, fmt::format("You are not permitted to remove privileges from {} services!", ServerInstance->Config->Network)); + user->WriteNumeric(ERR_RESTRICTED, chan->name, FMT::format("You are not permitted to remove privileges from {} services!", ServerInstance->Config->Network)); return false; } @@ -707,7 +707,7 @@ public: if (dest->IsModeSet(servprotectmode)) { - source->WriteNumeric(ERR_KILLDENY, fmt::format("You are not permitted to kill {} services!", ServerInstance->Config->Network)); + source->WriteNumeric(ERR_KILLDENY, FMT::format("You are not permitted to kill {} services!", ServerInstance->Config->Network)); return MOD_RES_DENY; } return MOD_RES_PASSTHRU; @@ -749,7 +749,7 @@ public: { if (memb->user->IsModeSet(servprotectmode)) { - source->WriteNumeric(ERR_RESTRICTED, memb->chan->name, fmt::format("You are not permitted to kick {} services!", ServerInstance->Config->Network)); + source->WriteNumeric(ERR_RESTRICTED, memb->chan->name, FMT::format("You are not permitted to kick {} services!", ServerInstance->Config->Network)); return MOD_RES_DENY; } return MOD_RES_PASSTHRU; @@ -772,7 +772,7 @@ public: } } - user->WriteNumeric(ERR_ERRONEUSNICKNAME, newnick, fmt::format("Services reserved nickname: {}", svshold->reason)); + user->WriteNumeric(ERR_ERRONEUSNICKNAME, newnick, FMT::format("Services reserved nickname: {}", svshold->reason)); return MOD_RES_DENY; } -- cgit v1.3.1-10-gc9f91