summaryrefslogtreecommitdiff
path: root/src/modules/m_foobar.cpp
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-04-04 21:43:21 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-04-04 21:43:21 +0000
commitf00094febf62beb74fb45a765a9fccd1ba4c8b8b (patch)
treed532bc5147fc104a75bf75427240dc5056395c97 /src/modules/m_foobar.cpp
parentccea6c12cd10e26c3ccacc91fdc16897d00582de (diff)
The start of extended bans infrastructure: syntax is e.g. +b n:w00tdiff@*, bans of any type can be applied and checked against, but there's more to come with this.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9337 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_foobar.cpp')
-rw-r--r--src/modules/m_foobar.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/modules/m_foobar.cpp b/src/modules/m_foobar.cpp
index 4917dd501..d9254c435 100644
--- a/src/modules/m_foobar.cpp
+++ b/src/modules/m_foobar.cpp
@@ -35,8 +35,8 @@ class ModuleFoobar : public Module
// The constructor just makes a copy of the server class
- Implementation eventlist[] = { I_OnUserConnect, I_OnUserQuit, I_OnUserJoin, I_OnUserPart };
- ServerInstance->Modules->Attach(eventlist, this, 4);
+ Implementation eventlist[] = { I_OnUserConnect, I_OnUserQuit, I_OnUserJoin, I_OnUserPart, I_OnUserPreJoin };
+ ServerInstance->Modules->Attach(eventlist, this, 5);
}
virtual ~ModuleFoobar()
@@ -86,6 +86,13 @@ class ModuleFoobar : public Module
ServerInstance->Logs->Log("m_foobar",DEBUG,"Foobar: User "+b+" parted "+c);
}
+ virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs)
+ {
+ if (chan->IsExtBanned(user, 'n'))
+ return 1;
+
+ return 0;
+ }
};