]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_delayjoin.cpp
Fix a number of commands to have max_params field. This means in practice, that colon...
[user/henk/code/inspircd.git] / src / modules / m_delayjoin.cpp
index 613fe6f372afb7d1b71d28bf8d226fba6ddff8bd..7ecc81a0e5482f5c680b626955e9541cfd2bd822 100644 (file)
@@ -36,13 +36,14 @@ class ModuleDelayJoin : public Module
                djm = new DelayJoinMode(ServerInstance, this);
                if (!ServerInstance->Modes->AddMode(djm))
                        throw ModuleException("Could not add new modes!");
-               Implementation eventlist[] = { I_OnUserJoin, I_OnUserPart, I_OnUserKick, I_OnUserQuit, I_OnNamesListItem, I_OnText };
-               ServerInstance->Modules->Attach(eventlist, this, 6);
+               Implementation eventlist[] = { I_OnUserJoin, I_OnUserPart, I_OnUserKick, I_OnUserQuit, I_OnNamesListItem, I_OnText, I_OnHostCycle };
+               ServerInstance->Modules->Attach(eventlist, this, 7);
        }
        virtual ~ModuleDelayJoin();
        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");