diff options
Diffstat (limited to 'src/modules/m_foobar.cpp')
-rw-r--r-- | src/modules/m_foobar.cpp | 11 |
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; + } }; |