diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-05-04 12:31:53 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-05-04 12:31:53 +0000 |
commit | 8f833415a32147da9c8e68d560d3d88ae91b9941 (patch) | |
tree | 7593eb91009353ce35b962390a1885aa37196825 /src | |
parent | bb6a9af0cf3ce7c66bc131f4ba37d6c0f7008841 (diff) |
When we silence the event, not even the user whos leaving/joining gets the output, make sure we send it to them in the module
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6863 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_auditorium.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/modules/m_auditorium.cpp b/src/modules/m_auditorium.cpp index c60bed9b9..67670134e 100644 --- a/src/modules/m_auditorium.cpp +++ b/src/modules/m_auditorium.cpp @@ -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) |