diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-10-26 20:34:30 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-10-26 20:34:30 +0000 |
commit | ef3fba43349ca83b7a72051218eb233ba3dc2162 (patch) | |
tree | cb7ac58bb2cee71609a33e26996cc4b2dbb579c5 /src | |
parent | 703ff062904cefd60420282cb5f25f22576b7932 (diff) |
Damnit! this should fix :p
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8375 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_delayjoin.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
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; } |