summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-07-21 16:42:16 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-07-21 16:42:16 +0000
commit9bc29e32cbe9c660e502f711092261f5716883bc (patch)
tree09918a5103ebf31e0f55ba69ae0794e25169a313
parent165b4d196c97d25aad2b23f8c118f86f79ea6ae1 (diff)
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
-rw-r--r--src/modules/m_nokicks.cpp10
1 files changed, 7 insertions, 3 deletions
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))
{