]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_delayjoin.cpp
Add initial query support to m_mysql [patch by Athenon]
[user/henk/code/inspircd.git] / src / modules / m_delayjoin.cpp
index 5f5a95432b1baedeab2dda56430ea11aae8eff5b..9ccb89167a0690c07485c11bc12b486b67668e68 100644 (file)
@@ -21,7 +21,7 @@ class DelayJoinMode : public ModeHandler
  public:
        DelayJoinMode(InspIRCd* Instance, Module* Parent) : ModeHandler(Instance, Parent, 'D', 0, 0, false, MODETYPE_CHANNEL, false, 0, '@') {};
 
-       ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding, bool);
+       ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding);
 };
 
 class ModuleDelayJoin : public Module
@@ -42,7 +42,7 @@ class ModuleDelayJoin : public Module
        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 created);
        void CleanUser(User* user);
-       bool OnHostCycle(User* user);
+       ModResult 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);
@@ -52,7 +52,7 @@ class ModuleDelayJoin : public Module
 
 /* $ModDesc: Allows for delay-join channels (+D) where users dont appear to join until they speak */
 
-ModeAction DelayJoinMode::OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding, bool)
+ModeAction DelayJoinMode::OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
 {
        /* no change */
        if (channel->IsModeSet('D') == adding)
@@ -158,9 +158,9 @@ void ModuleDelayJoin::OnUserKick(User* source, User* user, Channel* chan, const
        }
 }
 
-bool ModuleDelayJoin::OnHostCycle(User* user)
+ModResult ModuleDelayJoin::OnHostCycle(User* user)
 {
-       return user->GetExt("delayjoin");
+       return user->GetExt("delayjoin") ? MOD_RES_DENY : MOD_RES_PASSTHRU;
 }
 
 void ModuleDelayJoin::OnUserQuit(User* user, const std::string &reason, const std::string &oper_message)
@@ -229,10 +229,6 @@ void ModuleDelayJoin::WriteCommonFrom(User *user, Channel* channel, const char*
                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));
        }
 }