X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_namesx.cpp;h=f211b01d88a75af838c527b283ef68c81517750d;hb=7cb79020b7a9d7431d3038953c8e05ec0f2158c7;hp=2e206003271838f2398479e0ef55c87be0ed08ae;hpb=1db0e984be491125d8f954aa22f17cad1d4c453f;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_namesx.cpp b/src/modules/m_namesx.cpp index 2e2060032..f211b01d8 100644 --- a/src/modules/m_namesx.cpp +++ b/src/modules/m_namesx.cpp @@ -59,21 +59,17 @@ 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->chan->GetAllPrefixChars(memb->user); + return MOD_RES_PASSTHRU; } - void OnSendWhoLine(User* source, const std::vector& params, User* user, Channel* chan, std::string& line) CXX11_OVERRIDE + void OnSendWhoLine(User* source, const std::vector& params, User* user, Membership* memb, std::string& line) CXX11_OVERRIDE { - if ((!chan) || (!cap.ext.get(source))) + if ((!memb) || (!cap.ext.get(source))) return; // Channel names can contain ":", and ":" as a 'start-of-token' delimiter is @@ -91,7 +87,7 @@ class ModuleNamesX : public Module // pos // Don't do anything if the user has only one prefix - std::string prefixes = chan->GetAllPrefixChars(user); + std::string prefixes = memb->GetAllPrefixChars(); if (prefixes.length() <= 1) return;