X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_namesx.cpp;h=c701f16bf1b20cf450e9c75583fa2d9e70ae3575;hb=63aa8d0d42f619c52d382bde3e6ba2e5e23b12ac;hp=820963d5b0fe55e76e04c030fe78b2bdd95bb192;hpb=51b5f06c48b98a256eb56ea5f7e4d5d170555e84;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_namesx.cpp b/src/modules/m_namesx.cpp index 820963d5b..c701f16bf 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->chan->GetAllPrefixChars(memb->user); + return MOD_RES_PASSTHRU; } void OnSendWhoLine(User* source, const std::vector& params, User* user, Membership* memb, std::string& line) CXX11_OVERRIDE @@ -91,18 +87,13 @@ class ModuleNamesX : public Module // pos // Don't do anything if the user has only one prefix - std::string prefixes = memb->chan->GetAllPrefixChars(memb->user); + std::string prefixes = memb->GetAllPrefixChars(); if (prefixes.length() <= 1) return; line.erase(pos, 1); line.insert(pos, prefixes); } - - void OnEvent(Event& ev) CXX11_OVERRIDE - { - cap.HandleEvent(ev); - } }; MODULE_INIT(ModuleNamesX)