diff options
Diffstat (limited to 'src/modules/m_banexception.cpp')
| -rw-r--r-- | src/modules/m_banexception.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/modules/m_banexception.cpp b/src/modules/m_banexception.cpp index b81a67b5a..b975ab7c9 100644 --- a/src/modules/m_banexception.cpp +++ b/src/modules/m_banexception.cpp @@ -39,12 +39,23 @@ enum class BanException final : public ListModeBase { +private: + ExtBan::ManagerRef extbanmgr; + public: BanException(Module* Creator) - : ListModeBase(Creator, "banexception", 'e', RPL_EXCEPTLIST, RPL_ENDOFEXCEPTLIST, true) + : ListModeBase(Creator, "banexception", 'e', RPL_EXCEPTLIST, RPL_ENDOFEXCEPTLIST) + , extbanmgr(Creator) { syntax = "<mask>"; } + + bool CanonicalizeParam(LocalUser* user, Channel* channel, std::string& parameter) override + { + if (!extbanmgr || !extbanmgr->Canonicalize(parameter)) + ModeParser::CleanMask(parameter); + return true; + } }; class ModuleBanException final |
