diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-01-10 22:43:10 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-01-10 22:43:10 +0000 |
commit | a43360712496124e1530f18c5d9bbf6e0f103e8d (patch) | |
tree | adcfa23db07292db70da3c310a729a983dfbd485 /src/modules | |
parent | e4acbc95b8b6cd5b28d38a2242c02e8ff4991e4a (diff) |
Add goodchan tags for m_denychans: Allows the use case of forbidding *warez*, and allowing #thisreallyisntwarez, or whatever.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8696 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_denychans.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/modules/m_denychans.cpp b/src/modules/m_denychans.cpp index 641a1625b..7daf225ca 100644 --- a/src/modules/m_denychans.cpp +++ b/src/modules/m_denychans.cpp @@ -62,6 +62,15 @@ class ModuleDenyChannels : public Module else { std::string reason = Conf->ReadValue("badchan","reason",j); + + for (int j = 0; j < Conf->Enumerate("goodchan"); j++) + { + if (match(cname, Conf->ReadValue("goodchan", "name", j).c_str())) + { + return 0; + } + } + user->WriteServ("926 %s %s :Channel %s is forbidden: %s",user->nick,cname,cname,reason.c_str()); return 1; } |