diff options
Diffstat (limited to 'src/coremods')
-rw-r--r-- | src/coremods/core_channel/cmd_names.cpp | 12 | ||||
-rw-r--r-- | src/coremods/core_channel/core_channel.h | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/coremods/core_channel/cmd_names.cpp b/src/coremods/core_channel/cmd_names.cpp index a179cf9dc..b5cd98ec8 100644 --- a/src/coremods/core_channel/cmd_names.cpp +++ b/src/coremods/core_channel/cmd_names.cpp @@ -20,12 +20,14 @@ #include "inspircd.h" #include "core_channel.h" +#include "modules/names.h" CommandNames::CommandNames(Module* parent) : SplitCommand(parent, "NAMES", 0, 0) , secretmode(parent, "secret") , privatemode(parent, "private") , invisiblemode(parent, "invisible") + , namesevprov(parent, "event/names") { syntax = "<channel>[,<channel>]+"; } @@ -100,13 +102,9 @@ void CommandNames::SendNames(LocalUser* user, Channel* chan, bool show_invisible nick = i->first->nick; ModResult res; - FIRST_MOD_RESULT(OnNamesListItem, res, (user, memb, prefixlist, nick)); - - // See if a module wants us to exclude this user from NAMES - if (res == MOD_RES_DENY) - continue; - - reply.Add(prefixlist, nick); + FIRST_MOD_RESULT_CUSTOM(namesevprov, Names::EventListener, OnNamesListItem, res, (user, memb, prefixlist, nick)); + if (res != MOD_RES_DENY) + reply.Add(prefixlist, nick); } reply.Flush(); diff --git a/src/coremods/core_channel/core_channel.h b/src/coremods/core_channel/core_channel.h index 096db8c0d..c054d5265 100644 --- a/src/coremods/core_channel/core_channel.h +++ b/src/coremods/core_channel/core_channel.h @@ -116,9 +116,11 @@ class CommandTopic : public SplitCommand */ class CommandNames : public SplitCommand { + private: ChanModeReference secretmode; ChanModeReference privatemode; UserModeReference invisiblemode; + Events::ModuleEventProvider namesevprov; public: /** Constructor for names. |