]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_taxonomy.cpp
Commit patch from danieldg that makes a ton of stuff const-safe for latest warn-happy...
[user/henk/code/inspircd.git] / src / modules / m_taxonomy.cpp
index ca88d1c4a58ecb0186e16faae6471fb3d05fc03e..1490d90efad08a58a54e111b23795f3135d31b88 100644 (file)
@@ -2,7 +2,7 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2007 InspIRCd Development Team
+ *  InspIRCd: (C) 2002-2008 InspIRCd Development Team
  * See: http://www.inspircd.org/wiki/index.php/Credits
  *
  * This program is free but copyrighted software; see
@@ -23,7 +23,7 @@ class CommandTaxonomy : public Command
        bool& claimed;
  public:
        /* Command 'taxonomy', takes no parameters and needs no special modes */
-       CommandTaxonomy (InspIRCd* Instance, Module* maker, bool &claim) : Command(Instance,"TAXONOMY", 'o', 1), Creator(maker), claimed(claim)
+       CommandTaxonomy (InspIRCd* Instance, Module* maker, bool &claim) : Command(Instance,"TAXONOMY", "o", 1), Creator(maker), claimed(claim)
        {
                this->source = "m_taxonomy.so";
                syntax = "<nickname>";
@@ -35,8 +35,7 @@ class CommandTaxonomy : public Command
                if (dest)
                {
                        std::deque<std::string> list;
-                       list.clear();
-                       user->GetExtList(list);
+                       dest->GetExtList(list);
                        user->WriteServ("304 " + std::string(user->nick) + ":TAXONOMY ITEMS " + std::string(dest->nick) + " " +ConvToStr(list.size()));
                        for (unsigned int j = 0; j < list.size(); j++)
                        {
@@ -74,9 +73,9 @@ class ModuleTaxonomy : public Module
        {
                if (target_type == TYPE_USER)
                {
-                       User* spool = (User*)opaque;
-                       std::string taxstr = "304 " + std::string(spool->nick) + ":TAXONOMY METADATA "+extname+" = "+extdata;
-                       spool->WriteServ(taxstr);
+                       User* spoolto = (User*)target;
+                       std::string taxstr = "304 " + std::string(spoolto->nick) + ":TAXONOMY METADATA "+extname+" = "+extdata;
+                       spoolto->WriteServ(taxstr);
                        claimed = true;
                }
        }