summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-14 17:09:09 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-14 17:09:09 +0000
commit7c8a2de390271eb39248e12c925238725504f74d (patch)
tree1b85a0867ecbc6d375237eeda6e4536f021a0d29 /src/modules
parent55ec1a40e5f103737baaa16d098087e54aa7bca7 (diff)
Fix OnHostCycle in m_delayjoin [patch by dKingston]
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11720 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_delayjoin.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/modules/m_delayjoin.cpp b/src/modules/m_delayjoin.cpp
index a7a8575b4..c79fa0381 100644
--- a/src/modules/m_delayjoin.cpp
+++ b/src/modules/m_delayjoin.cpp
@@ -128,8 +128,17 @@ void ModuleDelayJoin::OnUserKick(User* source, Membership* memb, const std::stri
ModResult ModuleDelayJoin::OnHostCycle(User* user)
{
- // TODO
- return MOD_RES_DENY;
+ for (UCListIter f = user->chans.begin(); f != user->chans.end(); f++)
+ {
+ Channel* chan = *f;
+ Membership* memb = chan->GetUser(user);
+
+ if (memb && unjoined.get(memb))
+ {
+ return MOD_RES_DENY;
+ }
+ }
+ return MOD_RES_PASSTHRU;
}
void ModuleDelayJoin::OnUserQuit(User* user, const std::string &reason, const std::string &oper_message)