inspircd

A modular C++ IRC daemon (ircd). https://www.inspircd.org/
Log | Files | Refs | README

commit 26a80ed2c783bda2bc7abca9dd435b86f3ce2eeb
parent 4a99e25569b3de10c936748f068ef8cdbfdf987d
Author: Peter Powell <petpow@saberuk.com>
Date:   Mon, 28 Jan 2019 22:19:33 +0000

Read the muteban config in ReadConfig().

Diffstat:
Msrc/modules/m_muteban.cpp | 10+++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)

diff --git 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;