summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-07-21 16:40:22 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-07-21 16:40:22 +0000
commit165b4d196c97d25aad2b23f8c118f86f79ea6ae1 (patch)
tree0b7329e5248cf9110bd2d9e17dbb566d171c5776
parent3e0c1531322d8997a7f912ac1e70c4093414f3f9 (diff)
Add extban +b T:, prevents /notice to channel, same as chmode +T
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10061 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/modules/m_nonotice.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/modules/m_nonotice.cpp b/src/modules/m_nonotice.cpp
index 8424be897..ba513efb7 100644
--- a/src/modules/m_nonotice.cpp
+++ b/src/modules/m_nonotice.cpp
@@ -34,17 +34,21 @@ class ModuleNoNotice : public Module
nt = new NoNotice(ServerInstance);
if (!ServerInstance->Modes->AddMode(nt))
throw ModuleException("Could not add new modes!");
- Implementation eventlist[] = { I_OnUserPreNotice };
- ServerInstance->Modules->Attach(eventlist, this, 1);
+ Implementation eventlist[] = { I_OnUserPreNotice, I_On005Numeric };
+ ServerInstance->Modules->Attach(eventlist, this, 2);
}
+ virtual void On005Numeric(std::string &output)
+ {
+ ServerInstance->AddExtBanChar('T');
+ }
virtual int OnUserPreNotice(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
{
if ((target_type == TYPE_CHANNEL) && (IS_LOCAL(user)))
{
Channel* c = (Channel*)dest;
- if (c->IsModeSet('T'))
+ if (c->IsModeSet('T') || c->IsExtBanned(user, 'T'))
{
if (ServerInstance->ULine(user->server))
{