aboutsummaryrefslogtreecommitdiffstats
path: root/modules/disable.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2024-08-22 10:26:43 +0100
committerGravatar Sadie Powell2024-08-22 11:12:52 +0100
commit6b123d4bc61c2db8e379dd5e681834c4053e661d (patch)
tree77621bb30f54b0c444e31a78b2c5c9a67955b723 /modules/disable.cpp
parentMerge branch 'insp4' into master. (diff)
Use C++20 <format> instead of fmtlib when available.
Diffstat (limited to 'modules/disable.cpp')
-rw-r--r--modules/disable.cpp10
1 files changed, 5 insertions, 5 deletions
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 <disabled:{}> at {}",
+ throw ModuleException(this, FMT::format("Invalid mode '{}' was specified in <disabled:{}> 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 <disabled:{}> at {}",
+ throw ModuleException(this, FMT::format("Nonexistent mode '{}' was specified in <disabled:{}> 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 <disabled:commands> at {}",
+ throw ModuleException(this, FMT::format("Nonexistent command '{}' was specified in <disabled:commands> 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;
}