]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_invisible.cpp
Correct this error message to confuse people less.
[user/henk/code/inspircd.git] / src / modules / m_invisible.cpp
index 836369b8f398036d3c2abcf56a0f55a378e1dee0..aa69d1b8570e3399e3b353830de35ed7077c0fae 100644 (file)
@@ -55,9 +55,6 @@ class InvisibleMode : public ModeHandler
 
        ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding, bool)
        {
-               if (source != dest)
-                       return MODEACTION_DENY;
-
                if (dest->IsModeSet('Q') != adding)
                {
                        bool ok = false;
@@ -169,8 +166,8 @@ class ModuleInvisible : public Module
 
                /* Yeah i know people can take this out. I'm not about to obfuscate code just to be a pain in the ass. */
                ServerInstance->Users->ServerNoticeAll("*** m_invisible.so has just been loaded on this network. For more information, please visit http://inspircd.org/wiki/Modules/invisible");
-               Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice, I_OnUserJoin, I_OnUserPart, I_OnUserQuit, I_OnRehash };
-               ServerInstance->Modules->Attach(eventlist, this, 6);
+               Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice, I_OnUserJoin, I_OnUserPart, I_OnUserQuit, I_OnRehash, I_OnHostCycle };
+               ServerInstance->Modules->Attach(eventlist, this, 7);
        };
 
        virtual ~ModuleInvisible()
@@ -187,6 +184,7 @@ class ModuleInvisible : public Module
        virtual void OnRehash(User* user, const std::string &parameter);
        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 +248,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)
 {