X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fcoremods%2Fcore_channel%2Fcmd_names.cpp;h=bf13fac65a82a7fdaa32464fd014da4230259e57;hb=d38595e7e14e7509e744d33df657d50d00cc201f;hp=28273c90394ce80567eadd98b24af23bc1b2e4e0;hpb=b2ac8cc0a6405946a388b80df3be21bc276a61f3;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/coremods/core_channel/cmd_names.cpp b/src/coremods/core_channel/cmd_names.cpp index 28273c903..bf13fac65 100644 --- a/src/coremods/core_channel/cmd_names.cpp +++ b/src/coremods/core_channel/cmd_names.cpp @@ -1,8 +1,16 @@ /* * InspIRCd -- Internet Relay Chat Daemon * + * Copyright (C) 2018-2019 Sadie Powell + * Copyright (C) 2018 Dylan Frank + * Copyright (C) 2017 B00mX0r + * Copyright (C) 2013-2016 Attila Molnar + * Copyright (C) 2012, 2019 Robby + * Copyright (C) 2009 Uli Schlachter * Copyright (C) 2009 Daniel De Graaf * Copyright (C) 2007 Robin Burchell + * Copyright (C) 2007 Dennis Friis + * Copyright (C) 2006, 2008, 2010 Craig Edwards * * This file is part of InspIRCd. InspIRCd is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public @@ -20,14 +28,16 @@ #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 = "{{,}}"; + syntax = "[[,]+]"; } /** Handle /NAMES @@ -100,13 +110,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();