From 8adda0dca4cb94be6a071e67b3e3c89a22375aca Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Tue, 18 Mar 2025 13:12:28 +0000 Subject: Add a formatting overload of the ModuleException constructor. --- src/modules/m_disable.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/modules/m_disable.cpp') diff --git a/src/modules/m_disable.cpp b/src/modules/m_disable.cpp index 20092ae75..02326a417 100644 --- a/src/modules/m_disable.cpp +++ b/src/modules/m_disable.cpp @@ -47,14 +47,14 @@ private: { // Check that the character is a valid mode letter. if (!ModeParser::IsModeChar(chr)) - throw ModuleException(this, INSP_FORMAT("Invalid mode '{}' was specified in at {}", - chr, field, tag->source.str())); + throw ModuleException(this, "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, INSP_FORMAT("Nonexistent mode '{}' was specified in at {}", - chr, field, tag->source.str())); + throw ModuleException(this, "Nonexistent mode '{}' was specified in at {}", + chr, field, tag->source.str()); // Disable the mode. ServerInstance->Logs.Debug(MODNAME, "The {} ({}) {} mode has been disabled", @@ -90,8 +90,8 @@ 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 at {}", - command, tag->source.str())); + throw ModuleException(this, "Nonexistent command '{}' was specified in at {}", + command, tag->source.str()); // Prevent admins from disabling MODULES for transparency reasons. if (handler->name == "MODULES") -- cgit v1.3.1-10-gc9f91