aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/m_disable.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2024-06-07 14:12:59 +0100
committerGravatar Sadie Powell2024-06-07 14:12:59 +0100
commitb918f4906a21d6f37de5c7d503c8da1770df966d (patch)
treecb061bf6249cc9a0ce86fcc646a157edd058db76 /src/modules/m_disable.cpp
parentMerge branch 'insp4' into master. (diff)
Always use fmtlib directly.
Diffstat (limited to 'src/modules/m_disable.cpp')
-rw-r--r--src/modules/m_disable.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/modules/m_disable.cpp b/src/modules/m_disable.cpp
index 20092ae75..75c6a0627 100644
--- a/src/modules/m_disable.cpp
+++ b/src/modules/m_disable.cpp
@@ -47,13 +47,13 @@ private:
{
// Check that the character is a valid mode letter.
if (!ModeParser::IsModeChar(chr))
- throw ModuleException(this, INSP_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, INSP_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, INSP_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(), INSP_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, INSP_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;
}