From 5ebb49de65a3f53730177665b5922dc3a62a94eb Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Sun, 20 Apr 2014 14:05:21 +0200 Subject: Change the OnNamesListItem() hook to return ModResult Return MOD_RES_DENY to exclude the user from the NAMES list --- src/modules/m_namesx.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'src/modules/m_namesx.cpp') diff --git a/src/modules/m_namesx.cpp b/src/modules/m_namesx.cpp index 4dc5ff468..f211b01d8 100644 --- a/src/modules/m_namesx.cpp +++ b/src/modules/m_namesx.cpp @@ -59,16 +59,12 @@ class ModuleNamesX : public Module return MOD_RES_PASSTHRU; } - 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 { - if (!cap.ext.get(issuer)) - return; - - /* Some module hid this from being displayed, dont bother */ - if (nick.empty()) - return; + if (cap.ext.get(issuer)) + prefixes = memb->GetAllPrefixChars(); - prefixes = memb->GetAllPrefixChars(); + return MOD_RES_PASSTHRU; } void OnSendWhoLine(User* source, const std::vector& params, User* user, Membership* memb, std::string& line) CXX11_OVERRIDE -- cgit v1.3.1-10-gc9f91