aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/m_denychans.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_denychans.cpp
parentMerge branch 'insp3' into master. (diff)
downloadinspircd++-52cc8a418307ae7a551d23e6bd2d367b544e7bf9.tar.gz
inspircd++-52cc8a418307ae7a551d23e6bd2d367b544e7bf9.tar.bz2
inspircd++-52cc8a418307ae7a551d23e6bd2d367b544e7bf9.zip
Refactor CoreException and ModuleException.
Diffstat (limited to 'src/modules/m_denychans.cpp')
-rw-r--r--src/modules/m_denychans.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/modules/m_denychans.cpp b/src/modules/m_denychans.cpp
index 30541920b..a2a64d15b 100644
--- a/src/modules/m_denychans.cpp
+++ b/src/modules/m_denychans.cpp
@@ -78,7 +78,7 @@ class ModuleDenyChannels final
// Ensure that we have the <goodchan:name> parameter.
const std::string name = tag->getString("name");
if (name.empty())
- throw ModuleException("<goodchan:name> is a mandatory field, at " + tag->source.str());
+ throw ModuleException(this, "<goodchan:name> is a mandatory field, at " + tag->source.str());
goodchans.push_back(name);
}
@@ -89,19 +89,19 @@ class ModuleDenyChannels final
// Ensure that we have the <badchan:name> parameter.
const std::string name = tag->getString("name");
if (name.empty())
- throw ModuleException("<badchan:name> is a mandatory field, at " + tag->source.str());
+ throw ModuleException(this, "<badchan:name> is a mandatory field, at " + tag->source.str());
// Ensure that we have the <badchan:reason> parameter.
const std::string reason = tag->getString("reason");
if (reason.empty())
- throw ModuleException("<badchan:reason> is a mandatory field, at " + tag->source.str());
+ throw ModuleException(this, "<badchan:reason> is a mandatory field, at " + tag->source.str());
const std::string redirect = tag->getString("redirect");
if (!redirect.empty())
{
// Ensure that <badchan:redirect> contains a channel name.
if (!ServerInstance->Channels.IsChannel(redirect))
- throw ModuleException("<badchan:redirect> is not a valid channel name, at " + tag->source.str());
+ throw ModuleException(this, "<badchan:redirect> is not a valid channel name, at " + tag->source.str());
// We defer the rest of the validation of the redirect channel until we have
// finished parsing all of the badchans.
@@ -136,7 +136,7 @@ class ModuleDenyChannels final
for (const auto& badchanredir : badchans)
{
if (InspIRCd::Match(badchan.redirect, badchanredir.name))
- throw ModuleException("<badchan:redirect> cannot be a blacklisted channel name");
+ throw ModuleException(this, "<badchan:redirect> cannot be a blacklisted channel name");
}
}