diff options
author | Attila Molnar <attilamolnar@hush.com> | 2014-04-20 14:05:21 +0200 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2014-04-20 14:05:21 +0200 |
commit | 5ebb49de65a3f53730177665b5922dc3a62a94eb (patch) | |
tree | da4aa808e0ede345e26e28cd9a39e1509b83ca25 /src/modules/m_auditorium.cpp | |
parent | 67e0e32b86885df705a92cdc971a6085c4a7c1ba (diff) |
Change the OnNamesListItem() hook to return ModResult
Return MOD_RES_DENY to exclude the user from the NAMES list
Diffstat (limited to 'src/modules/m_auditorium.cpp')
-rw-r--r-- | src/modules/m_auditorium.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/modules/m_auditorium.cpp b/src/modules/m_auditorium.cpp index 8ec80ef46..60bdd2582 100644 --- a/src/modules/m_auditorium.cpp +++ b/src/modules/m_auditorium.cpp @@ -85,19 +85,16 @@ class ModuleAuditorium : public Module return false; } - void OnNamesListItem(User* issuer, Membership* memb, std::string &prefixes, std::string &nick) CXX11_OVERRIDE + ModResult OnNamesListItem(User* issuer, Membership* memb, std::string& prefixes, std::string& nick) CXX11_OVERRIDE { - // Some module already hid this from being displayed, don't bother - if (nick.empty()) - return; - if (IsVisible(memb)) - return; + return MOD_RES_PASSTHRU; if (CanSee(issuer, memb)) - return; + return MOD_RES_PASSTHRU; - nick.clear(); + // Don't display this user in the NAMES list + return MOD_RES_DENY; } /** Build CUList for showing this join/part/kick */ |