From 7f88980dd2ea3c6a835cec42b96563e4c7828cdc Mon Sep 17 00:00:00 2001 From: danieldg Date: Wed, 2 Sep 2009 15:37:53 +0000 Subject: Remove TAXONOMY as its functionality is duplicated by CHECK git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11665 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_taxonomy.cpp | 83 ---------------------------------------------- 1 file changed, 83 deletions(-) delete mode 100644 src/modules/m_taxonomy.cpp diff --git a/src/modules/m_taxonomy.cpp b/src/modules/m_taxonomy.cpp deleted file mode 100644 index 7be719bd3..000000000 --- a/src/modules/m_taxonomy.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/* +------------------------------------+ - * | Inspire Internet Relay Chat Daemon | - * +------------------------------------+ - * - * 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. - * - * --------------------------------------------------- - */ - -#include "inspircd.h" - -/* $ModDesc: Provides the /TAXONOMY command, used to view all metadata attached to a user */ - -/** Handle /TAXONOMY - */ -class CommandTaxonomy : public Command -{ - public: - /* Command 'taxonomy', takes no parameters and needs no special modes */ - CommandTaxonomy (InspIRCd* Instance, Module* maker) : Command(Instance,maker,"TAXONOMY", "o", 1) - { - syntax = ""; - } - - CmdResult Handle (const std::vector ¶meters, User *user) - { - User* dest = ServerInstance->FindNick(parameters[0]); - if (dest) - { - std::deque list; - dest->GetExtList(list); - user->WriteNumeric(304, "" + std::string(user->nick) + ":TAXONOMY ITEMS " + std::string(dest->nick) + " " +ConvToStr(list.size())); - FOREACH_MOD(I_OnSyncUser, OnSyncUser(dest, creator, user)); - user->WriteNumeric(304, "" + std::string(user->nick) + ":TAXONOMY END"); - } - return CMD_LOCALONLY; - } -}; - -class ModuleTaxonomy : public Module -{ - CommandTaxonomy cmd; - public: - ModuleTaxonomy(InspIRCd* Me) - : Module(Me), cmd(Me, this) - { - ServerInstance->AddCommand(&cmd); - } - - - void ProtoSendMetaData(void* opaque, Extensible* target, const std::string &extname, const std::string &extdata) - { - User* spoolto = (User*)opaque; - std::string taxstr = "304 " + std::string(spoolto->nick) + ":TAXONOMY METADATA "+extname+" = "+extdata; - spoolto->WriteServ(taxstr); - } - - virtual ~ModuleTaxonomy() - { - } - - virtual Version GetVersion() - { - return Version("$Id$", VF_VENDOR, API_VERSION); - } - - virtual std::string ProtoTranslate(Extensible* item) - { - User* u = dynamic_cast(item); - Channel* c = dynamic_cast(item); - if (u) - return u->nick; - if (c) - return c->name; - return "?"; - } -}; - -MODULE_INIT(ModuleTaxonomy) -- cgit v1.2.3