From ef3fba43349ca83b7a72051218eb233ba3dc2162 Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 26 Oct 2007 20:34:30 +0000 Subject: Damnit! this should fix :p git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8375 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_delayjoin.cpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'src/modules') diff --git a/src/modules/m_delayjoin.cpp b/src/modules/m_delayjoin.cpp index 1b631033a..d968f34a2 100644 --- a/src/modules/m_delayjoin.cpp +++ b/src/modules/m_delayjoin.cpp @@ -81,23 +81,29 @@ class ModuleDelayJoin : public Module virtual int OnUserList(User* user, Channel* Ptr, CUList* &nameslist) { - if (!nameslist) - return 0; + CUList* newlist = nameslist ? nameslist : Ptr->GetUsers(); + + nl.clear(); /* For +D channels ... */ if (Ptr->IsModeSet('D')) { std::string key("delayjoin_"); key.append(Ptr->name); - + ServerInstance->Log(DEBUG,"Key: %s", key.c_str()); /* Modify the names list, erasing users with the delay join metadata * for this channel (havent spoken yet) */ - for (CUListIter n = nameslist->begin(); n != nameslist->end(); ++n) - { + for (CUListIter n = newlist->begin(); n != newlist->end(); ++n) + { + ServerInstance->Log(DEBUG,"Item: %s", n->first->nick); if (!n->first->GetExt(key)) + { nl.insert(*n); + ServerInstance->Log(DEBUG,"Spoken: %s", n->first->nick); + } } + ServerInstance->Log(DEBUG,"Insert self"); nl[user] = user->nick; nameslist = &nl; } -- cgit v1.2.3