From c8602a49931e31593efefa45f141a06ce8e9a90f Mon Sep 17 00:00:00 2001 From: 0x277F <0x277F@gmail.com> Date: Fri, 22 Jul 2016 04:12:05 -0600 Subject: stripcolor now strips from part messages (#1175) --- src/modules/m_stripcolor.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/modules/m_stripcolor.cpp b/src/modules/m_stripcolor.cpp index 0d4bdb877..592aeda90 100644 --- a/src/modules/m_stripcolor.cpp +++ b/src/modules/m_stripcolor.cpp @@ -83,6 +83,23 @@ class ModuleStripColor : public Module return MOD_RES_PASSTHRU; } + void OnUserPart(Membership* memb, std::string& partmessage, CUList& except_list) CXX11_OVERRIDE + { + User* user = memb->user; + Channel* channel = memb->chan; + + if (!IS_LOCAL(user)) + return; + + bool active = channel->GetExtBanStatus(user, 'S').check(!user->IsModeSet(csc)) + && ServerInstance->OnCheckExemption(user, channel, "stripcolor") != MOD_RES_ALLOW; + + if (active) + { + InspIRCd::StripColor(partmessage); + } + } + Version GetVersion() CXX11_OVERRIDE { return Version("Provides channel +S mode (strip ansi color)", VF_VENDOR); -- cgit v1.2.3