From 9bc29e32cbe9c660e502f711092261f5716883bc Mon Sep 17 00:00:00 2001 From: w00t Date: Mon, 21 Jul 2008 16:42:16 +0000 Subject: Add extban +b Q: - prevents matching users from kicking git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10062 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_nokicks.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/modules') diff --git a/src/modules/m_nokicks.cpp b/src/modules/m_nokicks.cpp index de6eab1c7..df3a542a9 100644 --- a/src/modules/m_nokicks.cpp +++ b/src/modules/m_nokicks.cpp @@ -35,16 +35,20 @@ class ModuleNoKicks : public Module nk = new NoKicks(ServerInstance); if (!ServerInstance->Modes->AddMode(nk)) throw ModuleException("Could not add new modes!"); - Implementation eventlist[] = { I_OnAccessCheck }; - ServerInstance->Modules->Attach(eventlist, this, 1); + Implementation eventlist[] = { I_OnAccessCheck, I_On005Numeric }; + ServerInstance->Modules->Attach(eventlist, this, 2); } + virtual void On005Numeric(std::string &output) + { + ServerInstance->AddExtBanChar('Q'); + } virtual int OnAccessCheck(User* source,User* dest,Channel* channel,int access_type) { if (access_type == AC_KICK) { - if (channel->IsModeSet('Q')) + if (channel->IsModeSet('Q') || channel->IsExtBanned(source, 'Q')) { if ((ServerInstance->ULine(source->nick.c_str())) || (ServerInstance->ULine(source->server)) || (!*source->server)) { -- cgit v1.2.3