From a95616f608aefc38250a620087639dcc6407567f Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 2 Oct 2008 22:27:03 +0000 Subject: Fix for bug #601 git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10614 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_auditorium.cpp | 9 +++++++++ src/modules/m_delayjoin.cpp | 6 ++++++ src/modules/m_invisible.cpp | 6 ++++++ 3 files changed, 21 insertions(+) (limited to 'src/modules') diff --git a/src/modules/m_auditorium.cpp b/src/modules/m_auditorium.cpp index 023cb7adf..f898c19c9 100644 --- a/src/modules/m_auditorium.cpp +++ b/src/modules/m_auditorium.cpp @@ -157,6 +157,15 @@ class ModuleAuditorium : public Module } } + bool OnHostCycle(User* user) + { + for (UCListIter f = user->chans.begin(); f != user->chans.end(); f++) + if (f->first->IsModeSet('u')) + return true; + + return false; + } + void OnUserQuit(User* user, const std::string &reason, const std::string &oper_message) { Command* parthandler = ServerInstance->Parser->GetHandler("PART"); diff --git a/src/modules/m_delayjoin.cpp b/src/modules/m_delayjoin.cpp index 613fe6f37..23e6317ad 100644 --- a/src/modules/m_delayjoin.cpp +++ b/src/modules/m_delayjoin.cpp @@ -43,6 +43,7 @@ class ModuleDelayJoin : public Module virtual Version GetVersion(); virtual void OnNamesListItem(User* issuer, User* user, Channel* channel, std::string &prefixes, std::string &nick); virtual void OnUserJoin(User* user, Channel* channel, bool sync, bool &silent); + bool OnHostCycle(User* user); void OnUserPart(User* user, Channel* channel, std::string &partmessage, bool &silent); void OnUserKick(User* source, User* user, Channel* chan, const std::string &reason, bool &silent); void OnUserQuit(User* user, const std::string &reason, const std::string &oper_message); @@ -155,6 +156,11 @@ void ModuleDelayJoin::OnUserKick(User* source, User* user, Channel* chan, const } } +bool ModuleDelayJoin::OnHostCycle(User* user) +{ + return user->GetExt("delayjoin"); +} + void ModuleDelayJoin::OnUserQuit(User* user, const std::string &reason, const std::string &oper_message) { Command* parthandler = ServerInstance->Parser->GetHandler("PART"); diff --git a/src/modules/m_invisible.cpp b/src/modules/m_invisible.cpp index 836369b8f..6a1dd700d 100644 --- a/src/modules/m_invisible.cpp +++ b/src/modules/m_invisible.cpp @@ -187,6 +187,7 @@ class ModuleInvisible : public Module virtual void OnRehash(User* user, const std::string ¶meter); void OnUserPart(User* user, Channel* channel, std::string &partmessage, bool &silent); void OnUserQuit(User* user, const std::string &reason, const std::string &oper_message); + bool OnHostCycle(User* user); /* No privmsg response when hiding - submitted by Eric at neowin */ virtual int OnUserPreNotice(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list); virtual int OnUserPreMessage(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list); @@ -250,6 +251,11 @@ void ModuleInvisible::OnUserQuit(User* user, const std::string &reason, const st } } +bool ModuleInvisible::OnHostCycle(User* user) +{ + return user->IsModeSet('Q'); +} + /* No privmsg response when hiding - submitted by Eric at neowin */ int ModuleInvisible::OnUserPreNotice(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list) { -- cgit v1.2.3