]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_taxonomy.cpp
Remove a few unneeded string copies in the PRIVMSG path
[user/henk/code/inspircd.git] / src / modules / m_taxonomy.cpp
index e9df6221d175628914358c02eda3b043068494d9..6f06b36605558828af65c0b7f0468d25dbacedb8 100644 (file)
@@ -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.
@@ -54,22 +54,17 @@ class CommandTaxonomy : public Command
 
 class ModuleTaxonomy : public Module
 {
-       CommandTaxonomy* newcommand;
+       CommandTaxonomy cmd;
        bool claimed;
  public:
        ModuleTaxonomy(InspIRCd* Me)
-               : Module(Me)
+               : Module(Me), cmd(Me, this, claimed)
        {
-
-               // Create a new command
-               newcommand = new CommandTaxonomy(ServerInstance, this, claimed);
-               ServerInstance->AddCommand(newcommand);
-               Implementation eventlist[] = { I_ProtoSendMetaData };
-               ServerInstance->Modules->Attach(eventlist, this, 1);
+               ServerInstance->AddCommand(&cmd);
        }
 
 
-       void ProtoSendMetaData(void* opaque, int target_type, void* target, const std::string &extname, const std::string &extdata)
+       void ProtoSendMetaData(void* opaque, TargetTypeFlags target_type, void* target, const std::string &extname, const std::string &extdata)
        {
                if (target_type == TYPE_USER)
                {