diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-09-02 15:37:53 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-09-02 15:37:53 +0000 |
commit | 7f88980dd2ea3c6a835cec42b96563e4c7828cdc (patch) | |
tree | 00ee5cca5e838857defa43fe2e4c5f8bf5fe5f10 | |
parent | b1002b7df55f1aec5bfce48ecd07d6d326174c95 (diff) |
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
-rw-r--r-- | src/modules/m_taxonomy.cpp | 83 |
1 files changed, 0 insertions, 83 deletions
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 = "<nickname>"; - } - - CmdResult Handle (const std::vector<std::string> ¶meters, User *user) - { - User* dest = ServerInstance->FindNick(parameters[0]); - if (dest) - { - std::deque<std::string> 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<User*>(item); - Channel* c = dynamic_cast<Channel*>(item); - if (u) - return u->nick; - if (c) - return c->name; - return "?"; - } -}; - -MODULE_INIT(ModuleTaxonomy) |