]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Add extban +b Q: - prevents matching users from kicking
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>
Mon, 21 Jul 2008 16:42:16 +0000 (16:42 +0000)
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>
Mon, 21 Jul 2008 16:42:16 +0000 (16:42 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10062 e03df62e-2008-0410-955e-edbf42e46eb7

src/modules/m_nokicks.cpp

index de6eab1c7e9221065605955eea9a0cc15f970331..df3a542a9c578e525e6a2f639979009e41248168 100644 (file)
@@ -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))
                                {