summaryrefslogtreecommitdiff
path: root/src/modules/m_cloaking.cpp
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-02 00:45:37 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-02 00:45:37 +0000
commitf25c4b7a2263f5f3ce9bb41ba56b43c0d3a6d124 (patch)
tree43fba09e698269cd4c22c68be7ecb4a5875f55f3 /src/modules/m_cloaking.cpp
parent6e85701ecb09604f2c87010683638ec0446cc515 (diff)
MetaData rework
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11607 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_cloaking.cpp')
-rw-r--r--src/modules/m_cloaking.cpp13
1 files changed, 5 insertions, 8 deletions
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()