]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
When we silence the event, not even the user whos leaving/joining gets the output...
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Fri, 4 May 2007 12:31:53 +0000 (12:31 +0000)
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Fri, 4 May 2007 12:31:53 +0000 (12:31 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6863 e03df62e-2008-0410-955e-edbf42e46eb7

src/modules/m_auditorium.cpp

index c60bed9b9e6151f14b4a10732842f2651cbfcc01..67670134e8fedfa0c932981581a1eb9256ba8424 100644 (file)
@@ -95,13 +95,23 @@ class ModuleAuditorium : public Module
        virtual void OnUserJoin(userrec* user, chanrec* channel, bool &silent)
        {
                if (channel->IsModeSet('u'))
+               {
                        silent = true;
+                       /* Because we silenced the event, make sure it reaches the user whos joining (but only them of course) */
+                       user->WriteFrom(user, "JOIN %s", channel->name);
+               }
        }
 
        void OnUserPart(userrec* user, chanrec* channel, const std::string &partmessage, bool &silent)
        {
                if (channel->IsModeSet('u'))
+               {
                        silent = true;
+                       /* Because we silenced the event, make sure it reaches the user whos leaving (but only them of course) */
+                       user->WriteFrom(user, "PART %s%s%s", channel->name,
+                                       partmessage.empty() ? "" : " :",
+                                       partmessage.empty() ? "" : partmessage.c_str());
+               }
        }
 
        void OnUserKick(userrec* source, userrec* user, chanrec* chan, const std::string &reason, bool &silent)