aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_disable.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2022-01-07 17:12:42 +0000
committerGravatar Sadie Powell2022-01-07 17:16:50 +0000
commit52cc8a418307ae7a551d23e6bd2d367b544e7bf9 (patch)
tree9fff020964190f33174e78ff6201381be577d0b3 /src/modules/m_disable.cpp
parentMerge branch 'insp3' into master. (diff)
Refactor CoreException and ModuleException.
Diffstat (limited to 'src/modules/m_disable.cpp')
-rw-r--r--src/modules/m_disable.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/modules/m_disable.cpp b/src/modules/m_disable.cpp
index fc9ae90e9..a49e487ff 100644
--- a/src/modules/m_disable.cpp
+++ b/src/modules/m_disable.cpp
@@ -48,13 +48,13 @@ class ModuleDisable final
{
// Check that the character is a valid mode letter.
if (!ModeParser::IsModeChar(chr))
- throw ModuleException(InspIRCd::Format("Invalid mode '%c' was specified in <disabled:%s> at %s",
+ throw ModuleException(this, InspIRCd::Format("Invalid mode '%c' was specified in <disabled:%s> at %s",
chr, field.c_str(), tag->source.str().c_str()));
// Check that the mode actually exists.
ModeHandler* mh = ServerInstance->Modes.FindMode(chr, type);
if (!mh)
- throw ModuleException(InspIRCd::Format("Nonexistent mode '%c' was specified in <disabled:%s> at %s",
+ throw ModuleException(this, InspIRCd::Format("Nonexistent mode '%c' was specified in <disabled:%s> at %s",
chr, field.c_str(), tag->source.str().c_str()));
// Disable the mode.
@@ -93,7 +93,7 @@ class ModuleDisable final
// Check that the command actually exists.
Command* handler = ServerInstance->Parser.GetHandler(command);
if (!handler)
- throw ModuleException(InspIRCd::Format("Nonexistent command '%s' was specified in <disabled:commands> at %s",
+ throw ModuleException(this, InspIRCd::Format("Nonexistent command '%s' was specified in <disabled:commands> at %s",
command.c_str(), tag->source.str().c_str()));
// Prevent admins from disabling MODULES for transparency reasons.