summaryrefslogtreecommitdiff
path: root/src/modules/m_uhnames.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_uhnames.cpp')
-rw-r--r--src/modules/m_uhnames.cpp12
1 files changed, 9 insertions, 3 deletions
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();