aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/m_hidemode.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_hidemode.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_hidemode.cpp')
-rw-r--r--src/modules/m_hidemode.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/m_hidemode.cpp b/src/modules/m_hidemode.cpp
index f5d7c0c6a..b303b1841 100644
--- a/src/modules/m_hidemode.cpp
+++ b/src/modules/m_hidemode.cpp
@@ -38,7 +38,7 @@ class Settings final
return 0;
}
- void Load()
+ void Load(const Module* mod)
{
RanksToSeeMap newranks;
@@ -46,11 +46,11 @@ class Settings final
{
const std::string modename = tag->getString("mode");
if (modename.empty())
- throw ModuleException("<hidemode:mode> is empty at " + tag->source.str());
+ throw ModuleException(mod, "<hidemode:mode> is empty at " + tag->source.str());
unsigned long rank = tag->getUInt("rank", 0);
if (!rank)
- throw ModuleException("<hidemode:rank> must be greater than 0 at " + tag->source.str());
+ throw ModuleException(mod, "<hidemode:rank> must be greater than 0 at " + tag->source.str());
ServerInstance->Logs.Log(MODNAME, LOG_DEBUG, "Hiding the %s mode from users below rank %lu", modename.c_str(), rank);
newranks.emplace(modename, rank);
@@ -197,7 +197,7 @@ class ModuleHideMode final
void ReadConfig(ConfigStatus& status) override
{
- modehook.settings.Load();
+ modehook.settings.Load(this);
}
};