aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/m_namesx.cpp
diff options
context:
space:
mode:
authorGravatar Attila Molnar2014-04-20 14:05:21 +0200
committerGravatar Attila Molnar2014-04-20 14:05:21 +0200
commit5ebb49de65a3f53730177665b5922dc3a62a94eb (patch)
treeda4aa808e0ede345e26e28cd9a39e1509b83ca25 /src/modules/m_namesx.cpp
parentm_spanningtree Add ServerCommand::ExtractTS() to convert string to raw TS (diff)
downloadinspircd++-5ebb49de65a3f53730177665b5922dc3a62a94eb.tar.gz
inspircd++-5ebb49de65a3f53730177665b5922dc3a62a94eb.tar.bz2
inspircd++-5ebb49de65a3f53730177665b5922dc3a62a94eb.zip
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_namesx.cpp')
-rw-r--r--src/modules/m_namesx.cpp12
1 files changed, 4 insertions, 8 deletions
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<std::string>& params, User* user, Membership* memb, std::string& line) CXX11_OVERRIDE