]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_delayjoin.cpp
Dont echo the JOIN to the user whos speaking
[user/henk/code/inspircd.git] / src / modules / m_delayjoin.cpp
index ff6f7966fe0840c0dd145e8096c78c97f88b4269..ef7d96f5adfe7d59221834dfdaa94eb5fae16321 100644 (file)
@@ -220,11 +220,15 @@ class ModuleDelayJoin : public Module
 
                for (CUList::iterator i = ulist->begin(); i != ulist->end(); i++)
                {
-                       /* User only appears to vanish for non-opers */
-                       if (user->Visibility && user->Visibility->VisibleTo(i->first))
-                       {
-                               i->first->Write(std::string(tb));
-                       }
+                       /* User doesnt get a JOIN sent to themselves */
+                       if (user == i->first)
+                               continue;
+
+                       /* Users with a visibility state that hides them dont appear */
+                       if (user->Visibility && !user->Visibility->VisibleTo(i->first))
+                               continue;
+
+                       i->first->Write(std::string(tb));
                }
        }