diff options
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_auditorium.cpp | 7 | ||||
-rw-r--r-- | src/modules/m_delayjoin.cpp | 7 | ||||
-rw-r--r-- | src/modules/m_namesx.cpp | 7 | ||||
-rw-r--r-- | src/modules/m_uhnames.cpp | 12 |
4 files changed, 24 insertions, 9 deletions
diff --git a/src/modules/m_auditorium.cpp b/src/modules/m_auditorium.cpp index 818242795..6f47c5743 100644 --- a/src/modules/m_auditorium.cpp +++ b/src/modules/m_auditorium.cpp @@ -22,6 +22,7 @@ #include "inspircd.h" #include "modules/exemption.h" +#include "modules/names.h" #include "modules/who.h" class AuditoriumMode : public SimpleChannelModeHandler @@ -58,6 +59,7 @@ class JoinHook : public ClientProtocol::EventHook class ModuleAuditorium : public Module + , public Names::EventListener , public Who::EventListener { CheckExemption::EventProvider exemptionprov; @@ -69,7 +71,8 @@ class ModuleAuditorium public: ModuleAuditorium() - : Who::EventListener(this) + : Names::EventListener(this) + , Who::EventListener(this) , exemptionprov(this) , aum(this) , joinhook(this) @@ -118,7 +121,7 @@ class ModuleAuditorium return false; } - ModResult OnNamesListItem(User* issuer, Membership* memb, std::string& prefixes, std::string& nick) CXX11_OVERRIDE + ModResult OnNamesListItem(LocalUser* issuer, Membership* memb, std::string& prefixes, std::string& nick) CXX11_OVERRIDE { if (IsVisible(memb)) return MOD_RES_PASSTHRU; diff --git a/src/modules/m_delayjoin.cpp b/src/modules/m_delayjoin.cpp index 469f33439..40a585909 100644 --- a/src/modules/m_delayjoin.cpp +++ b/src/modules/m_delayjoin.cpp @@ -22,6 +22,7 @@ #include "inspircd.h" #include "modules/ctctags.h" +#include "modules/names.h" class DelayJoinMode : public ModeHandler { @@ -76,6 +77,7 @@ class JoinHook : public ClientProtocol::EventHook class ModuleDelayJoin : public Module , public CTCTags::EventListener + , public Names::EventListener { public: LocalIntExt unjoined; @@ -84,6 +86,7 @@ class ModuleDelayJoin ModuleDelayJoin() : CTCTags::EventListener(this) + , Names::EventListener(this) , unjoined("delayjoin", ExtensionItem::EXT_MEMBERSHIP, this) , joinhook(this, unjoined) , djm(this, unjoined) @@ -91,7 +94,7 @@ class ModuleDelayJoin } Version GetVersion() CXX11_OVERRIDE; - ModResult OnNamesListItem(User* issuer, Membership*, std::string& prefixes, std::string& nick) CXX11_OVERRIDE; + ModResult OnNamesListItem(LocalUser* issuer, Membership*, std::string& prefixes, std::string& nick) CXX11_OVERRIDE; void OnUserJoin(Membership*, bool, bool, CUList&) CXX11_OVERRIDE; void CleanUser(User* user); void OnUserPart(Membership*, std::string &partmessage, CUList&) CXX11_OVERRIDE; @@ -127,7 +130,7 @@ Version ModuleDelayJoin::GetVersion() return Version("Allows for delay-join channels (+D) where users don't appear to join until they speak", VF_VENDOR); } -ModResult ModuleDelayJoin::OnNamesListItem(User* issuer, Membership* memb, std::string& prefixes, std::string& nick) +ModResult ModuleDelayJoin::OnNamesListItem(LocalUser* issuer, Membership* memb, std::string& prefixes, std::string& nick) { /* don't prevent the user from seeing themself */ if (issuer == memb->user) diff --git a/src/modules/m_namesx.cpp b/src/modules/m_namesx.cpp index ac15c9723..ffece5cb4 100644 --- a/src/modules/m_namesx.cpp +++ b/src/modules/m_namesx.cpp @@ -22,10 +22,12 @@ #include "inspircd.h" #include "modules/cap.h" +#include "modules/names.h" #include "modules/who.h" class ModuleNamesX : public Module + , public Names::EventListener , public Who::EventListener { private: @@ -33,7 +35,8 @@ class ModuleNamesX public: ModuleNamesX() - : Who::EventListener(this) + : Names::EventListener(this) + , Who::EventListener(this) , cap(this, "multi-prefix") { } @@ -66,7 +69,7 @@ class ModuleNamesX return MOD_RES_PASSTHRU; } - ModResult OnNamesListItem(User* issuer, Membership* memb, std::string& prefixes, std::string& nick) CXX11_OVERRIDE + ModResult OnNamesListItem(LocalUser* issuer, Membership* memb, std::string& prefixes, std::string& nick) CXX11_OVERRIDE { if (cap.get(issuer)) prefixes = memb->GetAllPrefixChars(); diff --git a/src/modules/m_uhnames.cpp b/src/modules/m_uhnames.cpp index a8814b343..f750c1a6e 100644 --- a/src/modules/m_uhnames.cpp +++ b/src/modules/m_uhnames.cpp @@ -21,13 +21,19 @@ #include "inspircd.h" #include "modules/cap.h" +#include "modules/names.h" -class ModuleUHNames : public Module +class ModuleUHNames + : public Module + , public Names::EventListener { + private: Cap::Capability cap; public: - ModuleUHNames() : cap(this, "userhost-in-names") + ModuleUHNames() + : Names::EventListener(this) + , cap(this, "userhost-in-names") { } @@ -59,7 +65,7 @@ class ModuleUHNames : public Module return MOD_RES_PASSTHRU; } - ModResult OnNamesListItem(User* issuer, Membership* memb, std::string& prefixes, std::string& nick) CXX11_OVERRIDE + ModResult OnNamesListItem(LocalUser* issuer, Membership* memb, std::string& prefixes, std::string& nick) CXX11_OVERRIDE { if (cap.get(issuer)) nick = memb->user->GetFullHost(); |