summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-07-21 16:45:34 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-07-21 16:45:34 +0000
commit33d11457b46d8757142b3ab4bcac890619183c98 (patch)
tree6ef2c97a853374ea0c486e17465a4583712521b4
parent9bc29e32cbe9c660e502f711092261f5716883bc (diff)
Add extban +b S:, strips colours, same as chmode +S
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10063 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/modules/m_stripcolor.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/modules/m_stripcolor.cpp b/src/modules/m_stripcolor.cpp
index c3c274dff..9ba8775b9 100644
--- a/src/modules/m_stripcolor.cpp
+++ b/src/modules/m_stripcolor.cpp
@@ -46,11 +46,10 @@ class ModuleStripColor : public Module
if (!ServerInstance->Modes->AddMode(usc) || !ServerInstance->Modes->AddMode(csc))
throw ModuleException("Could not add new modes!");
- Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice };
- ServerInstance->Modules->Attach(eventlist, this, 2);
+ Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice, I_On005Numeric };
+ ServerInstance->Modules->Attach(eventlist, this, 3);
}
-
virtual ~ModuleStripColor()
{
ServerInstance->Modes->DelMode(usc);
@@ -59,6 +58,11 @@ class ModuleStripColor : public Module
delete csc;
}
+ virtual void On005Numeric(std::string &output)
+ {
+ ServerInstance->AddExtBanChar('S');
+ }
+
virtual void ReplaceLine(std::string &sentence)
{
/* refactor this completely due to SQUIT bug since the old code would strip last char and replace with \0 --peavey */
@@ -121,7 +125,7 @@ class ModuleStripColor : public Module
return 0;
}
- active = t->IsModeSet('S');
+ active = t->IsModeSet('S') || t->IsExtBanned(user, 'S');
}
if (active)