diff options
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_stripcolor.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
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); |