From 5ec0078659c33a290829804b3147b3047bb42f28 Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 10 Apr 2008 21:56:45 +0000 Subject: Add correct stuff so that /taxonomy can show the cloaked hosts for users in their metadata git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9452 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_cloaking.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/modules/m_cloaking.cpp b/src/modules/m_cloaking.cpp index a0318df86..e5cf64988 100644 --- a/src/modules/m_cloaking.cpp +++ b/src/modules/m_cloaking.cpp @@ -289,10 +289,21 @@ class ModuleCloaking : public Module ServerInstance->Modules->UseInterface("HashRequest"); - Implementation eventlist[] = { I_OnRehash, I_OnUserDisconnect, I_OnCleanup, I_OnCheckBan, I_OnUserConnect }; - ServerInstance->Modules->Attach(eventlist, this, 5); + Implementation eventlist[] = { I_OnRehash, I_OnUserDisconnect, I_OnCleanup, I_OnCheckBan, I_OnUserConnect, I_OnSyncUserMetaData }; + ServerInstance->Modules->Attach(eventlist, this, 6); } + void OnSyncUserMetaData(User* user, Module* proto,void* opaque, const std::string &extname, bool displayable) + { + if ((displayable) && (extname == "cloaked_host")) + { + std::string* cloak; + if (user->GetExt("cloaked_host", cloak)) + proto->ProtoSendMetaData(opaque, TYPE_USER, user, extname, *cloak); + } + } + + virtual int OnCheckBan(User* user, Channel* chan) { char mask[MAXBUF]; -- cgit v1.2.3