X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_uhnames.cpp;h=70036d5a2da2e92b78bfc91530ea95b9749ed298;hb=8085aa879bd989b526791797910295944a364084;hp=882acefc90488b7e8f0a39e6a49bbca5a1579045;hpb=d185decae97752368d5cf62311cbc0d1a52aa22c;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_uhnames.cpp b/src/modules/m_uhnames.cpp index 882acefc9..70036d5a2 100644 --- a/src/modules/m_uhnames.cpp +++ b/src/modules/m_uhnames.cpp @@ -2,8 +2,8 @@ * | Inspire Internet Relay Chat Daemon | * +------------------------------------+ * - * InspIRCd: (C) 2002-2008 InspIRCd Development Team - * See: http://www.inspircd.org/wiki/index.php/Credits + * InspIRCd: (C) 2002-2009 InspIRCd Development Team + * See: http://wiki.inspircd.org/Credits * * This program is free but copyrighted software; see * the file COPYING for details. @@ -24,7 +24,7 @@ class ModuleUHNames : public Module ModuleUHNames(InspIRCd* Me) : Module(Me) { - Implementation eventlist[] = { I_OnEvent, I_OnSyncUserMetaData, I_OnPreCommand, I_OnNamesListItem, I_On005Numeric }; + Implementation eventlist[] = { I_OnEvent, I_OnSyncUser, I_OnPreCommand, I_OnNamesListItem, I_On005Numeric }; ServerInstance->Modules->Attach(eventlist, this, 5); } @@ -32,15 +32,15 @@ class ModuleUHNames : public Module { } - 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 == "UHNAMES")) - proto->ProtoSendMetaData(opaque, TYPE_USER, user, extname, "Enabled"); + if (proto->ProtoTranslate(NULL) == "?" && user->GetExt("UHNAMES")) + proto->ProtoSendMetaData(opaque, user, "UHNAMES", "Enabled"); } virtual Version GetVersion() { - return Version(1,2,0,1,VF_VENDOR,API_VERSION); + return Version("$Id$",VF_VENDOR,API_VERSION); } virtual void On005Numeric(std::string &output)