summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2019-01-28 22:19:33 +0000
committerPeter Powell <petpow@saberuk.com>2019-01-28 22:19:33 +0000
commit26a80ed2c783bda2bc7abca9dd435b86f3ce2eeb (patch)
tree2bc020028394d58726557f8b49fbb44fb16a72ed /src/modules
parent4a99e25569b3de10c936748f068ef8cdbfdf987d (diff)
Read the muteban config in ReadConfig().
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_muteban.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/modules/m_muteban.cpp b/src/modules/m_muteban.cpp
index 7698835b1..61d592b2b 100644
--- a/src/modules/m_muteban.cpp
+++ b/src/modules/m_muteban.cpp
@@ -22,7 +22,16 @@
class ModuleQuietBan : public Module
{
+ private:
+ bool notifyuser;
+
public:
+ void ReadConfig(ConfigStatus& status) CXX11_OVERRIDE
+ {
+ ConfigTag* tag = ServerInstance->Config->ConfValue("muteban");
+ notifyuser = tag->getBool("notifyuser", true);
+ }
+
Version GetVersion() CXX11_OVERRIDE
{
return Version("Implements extban +b m: - mute bans",VF_OPTCOMMON|VF_VENDOR);
@@ -36,7 +45,6 @@ class ModuleQuietBan : public Module
Channel* chan = target.Get<Channel>();
if (chan->GetExtBanStatus(user, 'm') == MOD_RES_DENY && chan->GetPrefixValue(user) < VOICE_VALUE)
{
- bool notifyuser = ServerInstance->Config->ConfValue("muteban")->getBool("notifyuser", true);
if (!notifyuser)
{
details.echo_original = true;