From f25c4b7a2263f5f3ce9bb41ba56b43c0d3a6d124 Mon Sep 17 00:00:00 2001 From: danieldg Date: Wed, 2 Sep 2009 00:45:37 +0000 Subject: MetaData rework git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11607 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_cloaking.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'src/modules/m_cloaking.cpp') diff --git a/src/modules/m_cloaking.cpp b/src/modules/m_cloaking.cpp index a236300f1..458d833df 100644 --- a/src/modules/m_cloaking.cpp +++ b/src/modules/m_cloaking.cpp @@ -282,20 +282,17 @@ class ModuleCloaking : public Module ServerInstance->Modules->UseInterface("HashRequest"); - Implementation eventlist[] = { I_OnRehash, I_OnUserDisconnect, I_OnCleanup, I_OnCheckBan, I_OnUserConnect, I_OnSyncUserMetaData, I_OnCleanup }; + Implementation eventlist[] = { I_OnRehash, I_OnUserDisconnect, I_OnCleanup, I_OnCheckBan, I_OnUserConnect, I_OnSyncUser, I_OnCleanup }; ServerInstance->Modules->Attach(eventlist, this, 6); CloakExistingUsers(); } - void OnSyncUserMetaData(User* user, Module* proto,void* opaque, const std::string &extname, bool displayable) + void OnSyncUser(User* user, Module* proto,void* opaque) { - if ((displayable) && (extname == "cloaked_host")) - { - std::string* cloak; - if (user->GetExt("cloaked_host", cloak)) - proto->ProtoSendMetaData(opaque, TYPE_USER, user, extname, *cloak); - } + std::string* cloak; + if (user->GetExt("cloaked_host", cloak) && proto->ProtoTranslate(NULL) == "?") + proto->ProtoSendMetaData(opaque, user, "cloaked_host", *cloak); } void CloakExistingUsers() -- cgit v1.2.3