From 165b4d196c97d25aad2b23f8c118f86f79ea6ae1 Mon Sep 17 00:00:00 2001 From: w00t Date: Mon, 21 Jul 2008 16:40:22 +0000 Subject: 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 --- src/modules/m_nonotice.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/modules') 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)) { -- cgit v1.2.3