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/disable.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'modules/disable.cpp') diff --git a/modules/disable.cpp b/modules/disable.cpp index 75c6a0627..dd064947a 100644 --- a/modules/disable.cpp +++ b/modules/disable.cpp @@ -47,13 +47,13 @@ private: { // Check that the character is a valid mode letter. if (!ModeParser::IsModeChar(chr)) - throw ModuleException(this, fmt::format("Invalid mode '{}' was specified in at {}", + throw ModuleException(this, FMT::format("Invalid mode '{}' was specified in at {}", chr, field, tag->source.str())); // Check that the mode actually exists. ModeHandler* mh = ServerInstance->Modes.FindMode(chr, type); if (!mh) - throw ModuleException(this, fmt::format("Nonexistent mode '{}' was specified in at {}", + throw ModuleException(this, FMT::format("Nonexistent mode '{}' was specified in at {}", chr, field, tag->source.str())); // Disable the mode. @@ -90,7 +90,7 @@ public: // Check that the command actually exists. Command* handler = ServerInstance->Parser.GetHandler(command); if (!handler) - throw ModuleException(this, fmt::format("Nonexistent command '{}' was specified in at {}", + throw ModuleException(this, FMT::format("Nonexistent command '{}' was specified in at {}", command, tag->source.str())); // Prevent admins from disabling MODULES for transparency reasons. @@ -186,12 +186,12 @@ public: // treated as if they do not exist. int numeric = (change.mh->GetModeType() == MODETYPE_CHANNEL ? ERR_UNKNOWNMODE : ERR_UNKNOWNSNOMASK); const char* typestr = (change.mh->GetModeType() == MODETYPE_CHANNEL ? "channel" : "user"); - user->WriteNumeric(numeric, change.mh->GetModeChar(), fmt::format("is not a recognised {} mode.", typestr)); + user->WriteNumeric(numeric, change.mh->GetModeChar(), FMT::format("is not a recognised {} mode.", typestr)); return MOD_RES_DENY; } // Inform the user that the mode they changed has been disabled. - user->WriteNumeric(ERR_NOPRIVILEGES, fmt::format("Permission Denied - {} mode {} ({}) is disabled", + user->WriteNumeric(ERR_NOPRIVILEGES, FMT::format("Permission Denied - {} mode {} ({}) is disabled", what, change.mh->GetModeChar(), change.mh->name)); return MOD_RES_DENY; } -- cgit v1.3.1-10-gc9f91