diff options
| author | 2014-04-20 14:05:21 +0200 | |
|---|---|---|
| committer | 2014-04-20 14:05:21 +0200 | |
| commit | 5ebb49de65a3f53730177665b5922dc3a62a94eb (patch) | |
| tree | da4aa808e0ede345e26e28cd9a39e1509b83ca25 /src/channels.cpp | |
| parent | m_spanningtree Add ServerCommand::ExtractTS() to convert string to raw TS (diff) | |
| download | inspircd++-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/channels.cpp')
| -rw-r--r-- | src/channels.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/channels.cpp b/src/channels.cpp index 46f9cfe89..a98b4ff87 100644 --- a/src/channels.cpp +++ b/src/channels.cpp @@ -653,10 +653,11 @@ void Channel::UserList(User* user, bool has_user) prefixlist.push_back(prefix); nick = i->first->nick; - FOREACH_MOD(OnNamesListItem, (user, memb, prefixlist, nick)); + ModResult res; + FIRST_MOD_RESULT(OnNamesListItem, res, (user, memb, prefixlist, nick)); - /* Nick was nuked, a module wants us to skip it */ - if (nick.empty()) + // See if a module wants us to exclude this user from NAMES + if (res == MOD_RES_DENY) continue; if (list.size() + prefixlist.length() + nick.length() + 1 > maxlen) |
