From 259b1113944a01aeb450265f03fb97a283e8ef15 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Sat, 5 Dec 2015 15:29:01 +0100 Subject: Add rewritten m_cap module - Caps are now managed by m_cap - Each cap uses one bit in an extension item shared with other caps --- src/modules/m_uhnames.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/modules/m_uhnames.cpp') diff --git a/src/modules/m_uhnames.cpp b/src/modules/m_uhnames.cpp index 90bac54f5..ce9c517f4 100644 --- a/src/modules/m_uhnames.cpp +++ b/src/modules/m_uhnames.cpp @@ -24,9 +24,9 @@ class ModuleUHNames : public Module { - public: - GenericCap cap; + Cap::Capability cap; + public: ModuleUHNames() : cap(this, "userhost-in-names") { } @@ -52,7 +52,7 @@ class ModuleUHNames : public Module { if ((parameters.size()) && (!strcasecmp(parameters[0].c_str(),"UHNAMES"))) { - cap.ext.set(user, 1); + cap.set(user, true); return MOD_RES_DENY; } } @@ -61,7 +61,7 @@ class ModuleUHNames : public Module ModResult OnNamesListItem(User* issuer, Membership* memb, std::string& prefixes, std::string& nick) CXX11_OVERRIDE { - if (cap.ext.get(issuer)) + if (cap.get(issuer)) nick = memb->user->GetFullHost(); return MOD_RES_PASSTHRU; -- cgit v1.2.3