From f00094febf62beb74fb45a765a9fccd1ba4c8b8b Mon Sep 17 00:00:00 2001 From: w00t Date: Fri, 4 Apr 2008 21:43:21 +0000 Subject: 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 --- src/modules/m_foobar.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/modules') 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; + } }; -- cgit v1.2.3