]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_delayjoin.cpp
m_spanningtree Remove declaration for nonexistent function: OnLine()
[user/henk/code/inspircd.git] / src / modules / m_delayjoin.cpp
index dd07710bdf3e695a7acec82ff256a5977c433b49..b3165c7bec221bf221ab93f0a74387f2c6d73548 100644 (file)
@@ -45,7 +45,7 @@ class ModuleDelayJoin : public Module
        }
 
        Version GetVersion() CXX11_OVERRIDE;
-       void OnNamesListItem(User* issuer, Membership*, std::string &prefixes, std::string &nick) CXX11_OVERRIDE;
+       ModResult OnNamesListItem(User* issuer, Membership*, std::string& prefixes, std::string& nick) CXX11_OVERRIDE;
        void OnUserJoin(Membership*, bool, bool, CUList&) CXX11_OVERRIDE;
        void CleanUser(User* user);
        void OnUserPart(Membership*, std::string &partmessage, CUList&) CXX11_OVERRIDE;
@@ -80,15 +80,17 @@ Version ModuleDelayJoin::GetVersion()
        return Version("Allows for delay-join channels (+D) where users don't appear to join until they speak", VF_VENDOR);
 }
 
-void ModuleDelayJoin::OnNamesListItem(User* issuer, Membership* memb, std::string &prefixes, std::string &nick)
+ModResult ModuleDelayJoin::OnNamesListItem(User* issuer, Membership* memb, std::string& prefixes, std::string& nick)
 {
        /* don't prevent the user from seeing themself */
        if (issuer == memb->user)
-               return;
+               return MOD_RES_PASSTHRU;
 
        /* If the user is hidden by delayed join, hide them from the NAMES list */
        if (unjoined.get(memb))
-               nick.clear();
+               return MOD_RES_DENY;
+
+       return MOD_RES_PASSTHRU;
 }
 
 static void populate(CUList& except, Membership* memb)