Index: code/branches/consolecommands3/src/libraries/core/XMLPort.h
===================================================================
--- code/branches/consolecommands3/src/libraries/core/XMLPort.h	(revision 7227)
+++ code/branches/consolecommands3/src/libraries/core/XMLPort.h	(revision 7228)
@@ -394,7 +394,7 @@
                         {
                             COUT(5) << this->owner_->getLoaderIndentation() << "Loading parameter " << this->paramname_ << " in " << this->identifier_->getName() << " (objectname " << this->owner_->getName() << ")." << std::endl << this->owner_->getLoaderIndentation();
-                            bool success;
-                            this->loadexecutor_->parse(object, attributeValue, &success, ",");
-                            if (success || (mode  == XMLPort::ExpandObject))
+                            int error;
+                            this->loadexecutor_->parse(object, attributeValue, &error, ",");
+                            if (!error || (mode  == XMLPort::ExpandObject))
                                 this->parseResult_ = PR_finished;
                             else
Index: code/branches/consolecommands3/src/libraries/core/command/ArgumentCompletionFunctions.cc
===================================================================
--- code/branches/consolecommands3/src/libraries/core/command/ArgumentCompletionFunctions.cc	(revision 7227)
+++ code/branches/consolecommands3/src/libraries/core/command/ArgumentCompletionFunctions.cc	(revision 7228)
@@ -39,4 +39,5 @@
 #include "core/ConfigValueContainer.h"
 #include "TclThreadManager.h"
+#include "ConsoleCommand.h"
 
 // Boost 1.36 has some issues with deprecated functions that have been omitted
@@ -54,4 +55,47 @@
         {
             return ArgumentCompletionList();
+        }
+
+        ARGUMENT_COMPLETION_FUNCTION_IMPLEMENTATION(groupsandcommands)()
+        {
+            ArgumentCompletionList groupList;
+
+            const std::map<std::string, std::map<std::string, _ConsoleCommand*> >& commands = _ConsoleCommand::getCommands();
+            for (std::map<std::string, std::map<std::string, _ConsoleCommand*> >::const_iterator it_group = commands.begin(); it_group != commands.end(); ++it_group)
+                // todo: check if active / not hidden / not denied
+                groupList.push_back(ArgumentCompletionListElement(it_group->first, getLowercase(it_group->first)));
+
+            std::map<std::string, std::map<std::string, _ConsoleCommand*> >::const_iterator it_group = commands.find("");
+            if (it_group != commands.end())
+            {
+                groupList.push_back(ArgumentCompletionListElement("\n"));
+
+                for (std::map<std::string, _ConsoleCommand*>::const_iterator it_command = it_group->second.begin(); it_command != it_group->second.end(); ++it_command)
+                    // todo: check if active / not hidden / not denied
+                    groupList.push_back(ArgumentCompletionListElement(it_command->first, getLowercase(it_command->first)));
+            }
+
+            return groupList;
+        }
+
+        ARGUMENT_COMPLETION_FUNCTION_IMPLEMENTATION(subcommands)(const std::string& fragment, const std::string& group)
+        {
+            ArgumentCompletionList commandList;
+
+            std::string groupLC = getLowercase(group);
+
+            std::map<std::string, std::map<std::string, _ConsoleCommand*> >::const_iterator it_group = _ConsoleCommand::getCommands().begin();
+            for ( ; it_group != _ConsoleCommand::getCommands().end(); ++it_group)
+                if (getLowercase(it_group->first) == groupLC)
+                    break;
+
+            if (it_group != _ConsoleCommand::getCommands().end())
+            {
+                for (std::map<std::string, _ConsoleCommand*>::const_iterator it_command = it_group->second.begin(); it_command != it_group->second.end(); ++it_command)
+                    // todo: check if active / not hidden / not denied
+                    commandList.push_back(ArgumentCompletionListElement(it_command->first, getLowercase(it_command->first)));
+            }
+
+            return commandList;
         }
 
Index: code/branches/consolecommands3/src/libraries/core/command/ArgumentCompletionFunctions.h
===================================================================
--- code/branches/consolecommands3/src/libraries/core/command/ArgumentCompletionFunctions.h	(revision 7227)
+++ code/branches/consolecommands3/src/libraries/core/command/ArgumentCompletionFunctions.h	(revision 7228)
@@ -53,4 +53,6 @@
     {
         ARGUMENT_COMPLETION_FUNCTION_DECLARATION(fallback)();
+        ARGUMENT_COMPLETION_FUNCTION_DECLARATION(groupsandcommands)();
+        ARGUMENT_COMPLETION_FUNCTION_DECLARATION(subcommands)(const std::string& fragment, const std::string& group);
         ARGUMENT_COMPLETION_FUNCTION_DECLARATION(files)(const std::string& fragment);
         ARGUMENT_COMPLETION_FUNCTION_DECLARATION(settingssections)();
Index: code/branches/consolecommands3/src/libraries/core/command/ArgumentCompletionListElement.h
===================================================================
--- code/branches/consolecommands3/src/libraries/core/command/ArgumentCompletionListElement.h	(revision 7227)
+++ code/branches/consolecommands3/src/libraries/core/command/ArgumentCompletionListElement.h	(revision 7228)
@@ -38,5 +38,5 @@
 {
     const int ACL_MODE_NORMAL    = 1;
-    const int ACL_MODE_LOWERCASE = 2;
+    const int ACL_MODE_COMPARABLE = 2;
     const int ACL_MODE_DISPLAY   = 4;
 
@@ -46,17 +46,19 @@
     {
         public:
-            ArgumentCompletionListElement(const std::string& normalcase) : mode_(ACL_MODE_NORMAL), normalCase_(normalcase) {}
-            ArgumentCompletionListElement(const std::string& normalcase, const std::string& lowercase) : mode_(ACL_MODE_NORMAL | ACL_MODE_LOWERCASE), normalCase_(normalcase), lowerCase_(lowercase) {}
-            ArgumentCompletionListElement(const std::string& normalcase, const std::string& lowercase, const std::string& display) : mode_(ACL_MODE_NORMAL | ACL_MODE_LOWERCASE | ACL_MODE_DISPLAY), normalCase_(normalcase), lowerCase_(lowercase), display_(display) {}
+            ArgumentCompletionListElement(const std::string& normalcase) : mode_(ACL_MODE_NORMAL), normal_(normalcase) {}
+            ArgumentCompletionListElement(const std::string& normalcase, const std::string& lowercase) : mode_(ACL_MODE_NORMAL | ACL_MODE_COMPARABLE), normal_(normalcase), comparable_(lowercase) {}
+            ArgumentCompletionListElement(const std::string& normalcase, const std::string& lowercase, const std::string& display) : mode_(ACL_MODE_NORMAL | ACL_MODE_COMPARABLE | ACL_MODE_DISPLAY), normal_(normalcase), comparable_(lowercase), display_(display) {}
 
             const std::string& getString() const
-                { return this->normalCase_; }
+                { return this->normal_; }
             const std::string& getComparable() const
-                { if (this->mode_ & ACL_MODE_LOWERCASE) { return this->lowerCase_; } else { return this->normalCase_; } }
+                { return (this->mode_ & ACL_MODE_COMPARABLE) ? this->comparable_ : this->normal_; }
             const std::string& getDisplay() const
-                { if (this->mode_ & ACL_MODE_DISPLAY) { return this->display_; } else { return this->normalCase_; } }
+                { return (this->mode_ & ACL_MODE_DISPLAY) ? this->display_ : this->normal_; }
 
-            bool lowercaseComparison() const
-                { return (this->mode_ & ACL_MODE_LOWERCASE); }
+            bool hasComparable() const
+                { return (this->mode_ & ACL_MODE_COMPARABLE); }
+            bool hasDisplay() const
+                { return (this->mode_ & ACL_MODE_DISPLAY); }
 
             bool operator<(const ArgumentCompletionListElement& other) const
@@ -65,6 +67,6 @@
         private:
             unsigned char mode_;
-            std::string normalCase_;
-            std::string lowerCase_;
+            std::string normal_;
+            std::string comparable_;
             std::string display_;
     };
Index: code/branches/consolecommands3/src/libraries/core/command/CommandEvaluation.cc
===================================================================
--- code/branches/consolecommands3/src/libraries/core/command/CommandEvaluation.cc	(revision 7227)
+++ code/branches/consolecommands3/src/libraries/core/command/CommandEvaluation.cc	(revision 7228)
@@ -29,7 +29,6 @@
 #include "CommandEvaluation.h"
 
-#include "util/Debug.h"
 #include "util/StringUtils.h"
-#include "core/Identifier.h"
+#include "CommandExecutor.h"
 #include "ConsoleCommand.h"
 
@@ -39,241 +38,201 @@
     {
         this->initialize("");
-        this->state_ = CommandState::Uninitialized;
     }
 
     void CommandEvaluation::initialize(const std::string& command)
     {
-        this->bNewCommand_ = true;
-        this->bCommandChanged_ = false;
-        this->originalCommand_ = command;
-        this->command_ = command;
-        this->commandTokens_.split(command, " ", SubString::WhiteSpaces, false, '\\', false, '"', false, '(', ')', false, '\0');
-
-        this->additionalParameter_.clear();
-
-        this->bEvaluatedParams_ = false;
-
-        this->listOfPossibleIdentifiers_.clear();
-        this->listOfPossibleFunctions_.clear();
-        this->listOfPossibleArguments_.clear();
-
-        this->functionclass_ = 0;
-        this->function_ = 0;
-        this->possibleArgument_.clear();
-        this->argument_.clear();
-
-        this->errorMessage_.clear();
-        this->state_ = CommandState::Empty;
-    }
-
-    bool CommandEvaluation::execute() const
-    {
-        bool success;
-        this->query(&success);
-        return success;
-    }
-
-    MultiType CommandEvaluation::query(bool* success) const
-    {
-        if (success)
-            *success = false;
-
-        if (!this->function_ || !this->function_->isActive())
+        this->execCommand_ = 0;
+        this->hintCommand_ = 0;
+        this->string_ = command;
+        this->execArgumentsOffset_ = 0;
+        this->hintArgumentsOffset_ = 0;
+        this->bPossibleArgumentsRetrieved_ = false;
+        this->possibleArguments_.clear();
+
+        this->tokens_.split(command, " ", SubString::WhiteSpaces, false, '\\', false, '"', false, '(', ')', false, '\0');
+    }
+
+    unsigned int CommandEvaluation::getNumberOfArguments() const
+    {
+        unsigned int count = this->tokens_.size();
+        if (count > 0 && this->string_[this->string_.size() - 1] != ' ')
+            return count;
+        else
+            return count + 1;
+    }
+
+    const std::string& CommandEvaluation::getLastArgument() const
+    {
+        if (this->tokens_.size() > 0 && this->string_[this->string_.size() - 1] != ' ')
+            return this->tokens_.back();
+        else
+            return BLANKSTRING;
+    }
+
+    const std::string& CommandEvaluation::getToken(unsigned int i) const
+    {
+        if (i < this->tokens_.size())
+            return this->tokens_[i];
+        else
+            return BLANKSTRING;
+    }
+
+    int CommandEvaluation::execute() const
+    {
+        int error;
+        this->query(&error);
+        return error;
+    }
+
+    MultiType CommandEvaluation::query(int* error) const
+    {
+        if (error)
+        {
+            *error = CommandExecutor::Success;
+
+            if (!this->execCommand_)
+                *error = CommandExecutor::Error;
+            else if (!this->execCommand_->isActive())
+                *error = CommandExecutor::Deactivated;
+            else if (!this->execCommand_->hasAccess())
+                *error = CommandExecutor::Denied;
+
+            if (*error != CommandExecutor::Success)
+                return MT_Type::Null;
+        }
+
+        if (this->execCommand_ && this->execCommand_->isActive() && this->execCommand_->hasAccess())
+            return this->execCommand_->getExecutor()->parse(this->tokens_.subSet(this->execArgumentsOffset_).join(), error, " ", false);
+        else
             return MT_Type::Null;
-
-        if (this->bEvaluatedParams_ && this->function_)
-        {
-            if (success)
-                *success = true;
-            COUT(6) << "CE_execute (evaluation): " << this->function_->getName() << ' ' << this->param_[0] << ' ' << this->param_[1] << ' ' << this->param_[2] << ' ' << this->param_[3] << ' ' << this->param_[4] << std::endl;
-            return (*this->function_->getExecutor())(this->param_[0], this->param_[1], this->param_[2], this->param_[3], this->param_[4]);
-        }
-
-        if (!this->bCommandChanged_ || nocaseCmp(removeTrailingWhitespaces(this->command_), removeTrailingWhitespaces(this->originalCommand_)) == 0)
-        {
-            COUT(4) << "CE_execute: " << this->command_ << "\n";
-
-            unsigned int startindex = this->getStartindex();
-            if (this->commandTokens_.size() > startindex)
-                return this->function_->getExecutor()->parse(removeSlashes(this->commandTokens_.subSet(startindex).join() + this->getAdditionalParameter()), success);
-            else
-                return this->function_->getExecutor()->parse(removeSlashes(this->additionalParameter_), success);
-        }
-
-        return MT_Type::Null;
-    }
-
-    const std::string& CommandEvaluation::complete()
-    {
-        if (!this->bNewCommand_)
-        {
-            switch (this->state_)
-            {
-                case CommandState::Uninitialized:
-                    break;
-                case CommandState::Empty:
-                    break;
-                case CommandState::ShortcutOrIdentifier:
-                    if (this->function_)
+    }
+
+    std::string CommandEvaluation::complete() const
+    {
+        if (!this->hintCommand_ || !this->hintCommand_->isActive())
+            return this->string_;
+
+        if (!this->bPossibleArgumentsRetrieved_)
+            this->retrievePossibleArguments();
+
+        if (this->possibleArguments_.empty())
+        {
+            return this->string_;
+        }
+        else
+        {
+            std::string output;
+            for (unsigned int i = 0; i < this->getNumberOfArguments() - 1; ++i)
+                output += this->getToken(i) + ' ';
+
+            output += CommandEvaluation::getCommonBegin(this->possibleArguments_);
+            return output;
+        }
+    }
+
+    std::string CommandEvaluation::hint() const
+    {
+        if (!this->hintCommand_ || !this->hintCommand_->isActive())
+            return "";
+
+        if (!this->bPossibleArgumentsRetrieved_)
+            this->retrievePossibleArguments();
+
+        if (!this->possibleArguments_.empty())
+            return CommandEvaluation::dump(this->possibleArguments_);
+
+        if (this->isValid())
+        {
+            return CommandEvaluation::dump(this->hintCommand_);
+        }
+        else
+        {
+            if (this->getNumberOfArguments() > 2)
+            {
+                return std::string("Error: There is no command with name \"") + this->getToken(0) + " " + this->getToken(1) + "\".";
+            }
+            else
+            {
+                std::string groupLC = getLowercase(this->getToken(0));
+                std::map<std::string, std::map<std::string, _ConsoleCommand*> >::const_iterator it_group = _ConsoleCommand::getCommands().begin();
+                for ( ; it_group != _ConsoleCommand::getCommands().end(); ++it_group)
+                    if (getLowercase(it_group->first) == groupLC)
+                        return std::string("Error: There is no command in group \"") + this->getToken(0) + "\" starting with \"" + this->getToken(1) + "\".";
+
+                return std::string("Error: There is no command starting with \"") + this->getToken(0) + "\".";
+            }
+        }
+    }
+
+    void CommandEvaluation::retrievePossibleArguments() const
+    {
+        this->bPossibleArgumentsRetrieved_ = true;
+        unsigned int argumentID = std::min(this->getNumberOfArguments() - this->hintArgumentsOffset_, this->hintCommand_->getExecutor()->getParamCount());
+        ArgumentCompleter* ac = this->hintCommand_->getArgumentCompleter(argumentID - 1);
+
+COUT(0) << "hint: args: " << this->getNumberOfArguments() << ", aID: " << argumentID << ", offset: " << this->hintArgumentsOffset_ << ", ac: " << ac << std::endl;
+        if (ac)
+        {
+            MultiType param[MAX_FUNCTOR_ARGUMENTS];
+
+            for (size_t i = 0; i < argumentID; ++i)
+            {
+                param[i] = this->getToken(this->getNumberOfArguments() - i - 1);
+COUT(0) << i << ": " << (this->getNumberOfArguments() - i - 1) << " -> " << this->getToken(this->getNumberOfArguments() - i - 1) << " / " << param[i] << std::endl;
+            }
+
+COUT(0) << "hint: 1: " << param[0] << ", 2: " << param[1] << ", 3: " << param[2] << ", 4: " << param[3] << ", 5: " << param[4] << std::endl;
+            this->possibleArguments_ = (*ac)(param[0], param[1], param[2], param[3], param[4]);
+
+            CommandEvaluation::strip(this->possibleArguments_, param[0]);
+        }
+    }
+
+    /* static */ void CommandEvaluation::strip(ArgumentCompletionList& list, const std::string& fragment)
+    {
+        std::string fragmentLC = getLowercase(fragment);
+
+        for (ArgumentCompletionList::iterator it = list.begin(); it != list.end(); )
+        {
+            const std::string& entry = it->getComparable();
+
+            if (entry.size() < fragmentLC.size())
+            {
+                list.erase(it++);
+            }
+            else
+            {
+                bool bErase = false;
+                for (size_t i = 0; i < fragmentLC.size(); ++i)
+                {
+                    if (fragmentLC[i] != entry[i])
                     {
-                        if (this->function_->getExecutor()->getParamCount() == 0)
-                            return (this->command_ = this->function_->getName());
-                        else
-                            return (this->command_ = this->function_->getName() + ' ');
+                        bErase = true;
+                        break;
                     }
-                    else if (this->functionclass_)
-                        return (this->command_ = this->functionclass_->getName() + ' ');
-                    break;
-                case CommandState::Function:
-                    if (this->function_)
-                    {
-                        if (this->function_->getExecutor()->getParamCount() == 0)
-                            return (this->command_ = this->functionclass_->getName() + ' ' + this->function_->getName());
-                        else
-                            return (this->command_ = this->functionclass_->getName() + ' ' + this->function_->getName() + ' ');
-                    }
-                    break;
-                case CommandState::ParamPreparation:
-                case CommandState::Params:
-                {
-                    if (this->argument_.empty() && this->possibleArgument_.empty())
-                        break;
-
-                    unsigned int maxIndex = this->commandTokens_.size();
-                    if (this->command_[this->command_.size() - 1] != ' ')
-                        maxIndex -= 1;
-                    std::string whitespace;
-
-                    if (!this->possibleArgument_.empty())
-                    {
-                        this->argument_ = this->possibleArgument_;
-                        if (this->function_->getExecutor()->getParamCount() > (maxIndex + 1 - this->getStartindex()))
-                            whitespace = " ";
-                    }
-
-                    return (this->command_ = this->commandTokens_.subSet(0, maxIndex).join() + ' ' + this->argument_ + whitespace);
-                    break;
                 }
-                case CommandState::Finished:
-                    break;
-                case CommandState::Error:
-                    break;
-            }
-        }
-        this->bNewCommand_ = false;
-        return this->command_;
-    }
-
-    std::string CommandEvaluation::hint() const
-    {
-        switch (this->state_)
-        {
-            case CommandState::Uninitialized:
-                break;
-            case CommandState::Empty:
-            case CommandState::ShortcutOrIdentifier:
-                if (this->listOfPossibleFunctions_.size() == 0)
-                    return CommandEvaluation::dump(this->listOfPossibleIdentifiers_);
-                else if (this->listOfPossibleIdentifiers_.size() == 0)
-                    return CommandEvaluation::dump(this->listOfPossibleFunctions_);
+
+                if (bErase)
+                    list.erase(it++);
                 else
-                    return (CommandEvaluation::dump(this->listOfPossibleFunctions_) + "\n" + CommandEvaluation::dump(this->listOfPossibleIdentifiers_));
-                break;
-            case CommandState::Function:
-                return CommandEvaluation::dump(this->listOfPossibleFunctions_);
-                break;
-            case CommandState::ParamPreparation:
-            case CommandState::Params:
-                if (this->listOfPossibleArguments_.size() > 0)
-                    return CommandEvaluation::dump(this->listOfPossibleArguments_);
-                else
-                    return CommandEvaluation::dump(this->function_);
-            case CommandState::Finished:
-                if (this->function_)
-                    return CommandEvaluation::dump(this->function_);
-                break;
-            case CommandState::Error:
-                return this->errorMessage_;
-                break;
-        }
-
-        return "";
-    }
-
-    void CommandEvaluation::evaluateParams()
-    {
-        this->bEvaluatedParams_ = false;
-
-        for (unsigned int i = 0; i < MAX_FUNCTOR_ARGUMENTS; i++)
-            this->param_[i] = MT_Type::Null;
-
-        if (!this->function_)
-            return;
-
-        unsigned int startindex = this->getStartindex();
-
-        if (this->commandTokens_.size() <= startindex)
-        {
-            if (this->function_->getBaseExecutor()->evaluate(this->getAdditionalParameter(), this->param_, " "))
-                this->bEvaluatedParams_ = true;
-        }
-        else if (this->commandTokens_.size() > startindex)
-        {
-            if (this->function_->getBaseExecutor()->evaluate(this->commandTokens_.subSet(startindex).join() + this->getAdditionalParameter(), this->param_, " "))
-                this->bEvaluatedParams_ = true;
-        }
-    }
-
-    void CommandEvaluation::setEvaluatedParameter(unsigned int index, MultiType param)
-    {
-        if (index < MAX_FUNCTOR_ARGUMENTS)
-            this->param_[index] = param;
-    }
-
-    MultiType CommandEvaluation::getEvaluatedParameter(unsigned int index) const
-    {
-        if (index < MAX_FUNCTOR_ARGUMENTS)
-            return this->param_[index];
-
-        return MT_Type::Null;
-    }
-
-    unsigned int CommandEvaluation::getStartindex() const
-    {
-        if (this->functionclass_ && this->function_)
-            return 2;
-        else if (this->function_)
-            return 1;
-        else
-            return 0;
-    }
-
-    std::string CommandEvaluation::dump(const std::list<std::pair<const std::string*, const std::string*> >& list)
+                    ++it;
+            }
+        }
+    }
+
+    /* static */ std::string CommandEvaluation::dump(const ArgumentCompletionList& list)
     {
         std::string output;
-        for (std::list<std::pair<const std::string*, const std::string*> >::const_iterator it = list.begin(); it != list.end(); ++it)
+        for (ArgumentCompletionList::const_iterator it = list.begin(); it != list.end(); ++it)
         {
             if (it != list.begin())
                 output += ' ';
 
-            output += *(it->second);
+            output += it->getDisplay();
         }
         return output;
     }
 
-    std::string CommandEvaluation::dump(const ArgumentCompletionList& list)
-    {
-        std::string output;
-        for (ArgumentCompletionList::const_iterator it = list.begin(); it != list.end(); ++it)
-        {
-            if (it != list.begin())
-                output += ' ';
-
-            output += it->getDisplay();
-        }
-        return output;
-    }
-
-    std::string CommandEvaluation::dump(const _ConsoleCommand* command)
+    /* static */ std::string CommandEvaluation::dump(const _ConsoleCommand* command)
     {
         std::string output = command->getName();
@@ -300,3 +259,53 @@
         return output;
     }
+
+    /* static */ std::string CommandEvaluation::getCommonBegin(const ArgumentCompletionList& list)
+    {
+        if (list.size() == 0)
+        {
+            return "";
+        }
+        else if (list.size() == 1)
+        {
+            if (list.begin()->hasDisplay())
+                return (list.begin()->getString());
+            else
+                return (list.begin()->getString() + ' ');
+        }
+        else
+        {
+            std::string output;
+            for (unsigned int i = 0; true; i++)
+            {
+                char tempComparable = 0;
+                char temp = 0;
+                for (ArgumentCompletionList::const_iterator it = list.begin(); it != list.end(); ++it)
+                {
+                    const std::string& argumentComparable = it->getComparable();
+                    const std::string& argument = it->getString();
+                    if (argument.size() > i)
+                    {
+                        if (it == list.begin())
+                        {
+                            tempComparable = argumentComparable[i];
+                            temp = argument[i];
+                        }
+                        else
+                        {
+                            if (tempComparable != argumentComparable[i])
+                                return output;
+                            else if (temp != argument[i])
+                                temp = tempComparable;
+                        }
+                    }
+                    else
+                    {
+                        return output;
+                    }
+                }
+                output += temp;
+            }
+            return output;
+        }
+    }
 }
Index: code/branches/consolecommands3/src/libraries/core/command/CommandEvaluation.h
===================================================================
--- code/branches/consolecommands3/src/libraries/core/command/CommandEvaluation.h	(revision 7227)
+++ code/branches/consolecommands3/src/libraries/core/command/CommandEvaluation.h	(revision 7228)
@@ -33,5 +33,4 @@
 
 #include <string>
-#include <list>
 
 #include "ArgumentCompletionListElement.h"
@@ -41,19 +40,4 @@
 namespace orxonox
 {
-    namespace CommandState
-    {
-        enum Value
-        {
-            Uninitialized,
-            Empty,
-            ShortcutOrIdentifier,
-            Function,
-            ParamPreparation,
-            Params,
-            Finished,
-            Error
-        };
-    }
-
     class _CoreExport CommandEvaluation
     {
@@ -63,60 +47,43 @@
             CommandEvaluation();
 
+            int execute() const;
+            MultiType query(int* error = 0) const;
+
+            std::string complete() const;
+            std::string hint() const;
+
+            inline bool isValid() const
+                { return (this->execCommand_ != 0); }
+
+            inline _ConsoleCommand* getConsoleCommand() const
+                { return this->execCommand_; }
+
+//            void setEvaluatedParameter(unsigned int index, MultiType param);
+//            MultiType getEvaluatedParameter(unsigned int index) const;
+
+        private:
             void initialize(const std::string& command);
 
-            bool execute() const;
-            MultiType query(bool* success = 0) const;
+            unsigned int getNumberOfArguments() const;
+            const std::string& getLastArgument() const;
+            const std::string& getToken(unsigned int i) const;
 
-            const std::string& complete();
-            std::string hint() const;
-            void evaluateParams();
+            void retrievePossibleArguments() const;
 
-            bool isValid() const
-                { return this->function_; }
+            static void strip(ArgumentCompletionList& list, const std::string& fragment);
 
-            inline _ConsoleCommand* getConsoleCommand() const
-                { return this->function_; }
-            inline const std::string& getOriginalCommand() const
-                { return this->originalCommand_; }
-            inline const std::string& getCommand() const
-                { return this->command_; }
-
-            inline void setAdditionalParameter(const std::string& param)
-                { this->additionalParameter_ = param; this->bEvaluatedParams_ = false; }
-            inline std::string getAdditionalParameter() const
-                { return (!this->additionalParameter_.empty()) ? (' ' + this->additionalParameter_) : ""; }
-
-            void setEvaluatedParameter(unsigned int index, MultiType param);
-            MultiType getEvaluatedParameter(unsigned int index) const;
-
-        private:
-            unsigned int getStartindex() const;
-            static std::string dump(const std::list<std::pair<const std::string*, const std::string*> >& list);
             static std::string dump(const ArgumentCompletionList& list);
             static std::string dump(const _ConsoleCommand* command);
 
+            static std::string getCommonBegin(const ArgumentCompletionList& list);
 
-            bool bNewCommand_;
-            bool bCommandChanged_;
-
-            std::string originalCommand_;
-            std::string command_;
-            SubString commandTokens_;
-            std::string additionalParameter_;
-
-            std::list<std::pair<const std::string*, const std::string*> > listOfPossibleIdentifiers_;
-            std::list<std::pair<const std::string*, const std::string*> > listOfPossibleFunctions_;
-            ArgumentCompletionList listOfPossibleArguments_;
-
-            Identifier* functionclass_;
-            _ConsoleCommand* function_;
-            std::string possibleArgument_;
-            std::string argument_;
-
-            std::string errorMessage_;
-            CommandState::Value state_;
-
-            bool bEvaluatedParams_;
-            MultiType param_[5];
+            _ConsoleCommand* execCommand_;
+            _ConsoleCommand* hintCommand_;
+            SubString tokens_;
+            std::string string_;
+            unsigned int execArgumentsOffset_;
+            unsigned int hintArgumentsOffset_;
+            mutable bool bPossibleArgumentsRetrieved_;
+            mutable ArgumentCompletionList possibleArguments_;
     };
 }
Index: code/branches/consolecommands3/src/libraries/core/command/CommandExecutor.cc
===================================================================
--- code/branches/consolecommands3/src/libraries/core/command/CommandExecutor.cc	(revision 7227)
+++ code/branches/consolecommands3/src/libraries/core/command/CommandExecutor.cc	(revision 7228)
@@ -29,14 +29,19 @@
 #include "CommandExecutor.h"
 
-#include "util/Debug.h"
-#include "util/StringUtils.h"
-#include "core/Identifier.h"
-#include "core/Language.h"
 #include "ConsoleCommand.h"
 #include "TclBind.h"
+#include "Shell.h"
 
 namespace orxonox
 {
-    CommandExecutor& CommandExecutor::getInstance()
+    static const std::string __CC_CommandExecutor_name = "CommandExecutor";
+    static const std::string __CC_autocomplete_name = "autocomplete";
+
+    _SetConsoleCommand(__CC_CommandExecutor_name, __CC_autocomplete_name, &CommandExecutor::_autocomplete)
+        .hide()
+        .argumentCompleter(0, autocompletion::groupsandcommands())
+        .argumentCompleter(1, autocompletion::subcommands());
+
+    /* static */ CommandExecutor& CommandExecutor::getInstance()
     {
         static CommandExecutor instance;
@@ -44,609 +49,51 @@
     }
 
-    CommandEvaluation& CommandExecutor::getEvaluation()
+    /* static */ int CommandExecutor::execute(const std::string& command, bool useTcl)
     {
-        return CommandExecutor::getInstance().evaluation_;
+        int error;
+        CommandExecutor::queryMT(command, &error, useTcl);
+        return error;
     }
 
-    bool CommandExecutor::execute(const std::string& command, bool useTcl)
+    /* static */ MultiType CommandExecutor::queryMT(const std::string& command, int* error, bool useTcl)
     {
         if (useTcl)
-        {
-            bool success;
-            TclBind::eval(command, &success);
-            return success;
-        }
+            return TclBind::eval(command, error);
         else
-        {
-            CommandExecutor::parseIfNeeded(command);
-            return CommandExecutor::getEvaluation().execute();
-        }
+            return CommandExecutor::evaluate(command).query(error);
     }
 
-    MultiType CommandExecutor::queryMT(const std::string& command, bool* success, bool useTcl)
+    /* static */ std::string CommandExecutor::query(const std::string& command, int* error, bool useTcl)
     {
-        if (useTcl)
-        {
-            return TclBind::eval(command, success);
-        }
-        else
-        {
-            CommandExecutor::parseIfNeeded(command);
-            return CommandExecutor::getEvaluation().query(success);
-        }
+        return CommandExecutor::queryMT(command, error, useTcl).getString();
     }
 
-    std::string CommandExecutor::query(const std::string& command, bool* success, bool useTcl)
+    /* static */ CommandEvaluation CommandExecutor::evaluate(const std::string& command)
     {
-        if (useTcl)
+        CommandEvaluation evaluation;
+        evaluation.initialize(command);
+
+        evaluation.hintCommand_ = _ConsoleCommand::getCommand(__CC_CommandExecutor_name, __CC_autocomplete_name);
+
+        if (evaluation.getNumberOfArguments() >= 1)
         {
-            return TclBind::eval(command, success);
-        }
-        else
-        {
-            CommandExecutor::parseIfNeeded(command);
-            return CommandExecutor::getEvaluation().query(success).getString();
-        }
-    }
-
-    std::string CommandExecutor::complete(const std::string& command)
-    {
-        CommandExecutor::parseIfNeeded(command);
-        return CommandExecutor::getEvaluation().complete();
-    }
-
-    std::string CommandExecutor::hint(const std::string& command)
-    {
-        CommandExecutor::parseIfNeeded(command);
-        return CommandExecutor::getEvaluation().hint();
-    }
-
-    CommandEvaluation CommandExecutor::evaluate(const std::string& command)
-    {
-        CommandExecutor::parse(command);
-        CommandExecutor::getEvaluation().evaluateParams();
-        return CommandExecutor::getEvaluation();
-    }
-
-    void CommandExecutor::parseIfNeeded(const std::string& command)
-    {
-        if (CommandExecutor::getEvaluation().state_ == CommandState::Uninitialized)
-        {
-            CommandExecutor::parse(command);
-        }
-        else if (CommandExecutor::getEvaluation().originalCommand_ != command)
-        {
-            if (CommandExecutor::getEvaluation().command_ == command)
+            evaluation.execCommand_ = _ConsoleCommand::getCommandLC(evaluation.getToken(0));
+            if (evaluation.execCommand_)
+                evaluation.execArgumentsOffset_ = 1;
+            else if (evaluation.getNumberOfArguments() >= 2)
             {
-                CommandExecutor::parse(command);
-                CommandExecutor::getEvaluation().bNewCommand_ = false;
-            }
-            else
-            {
-                CommandExecutor::parse(command);
+                evaluation.execCommand_ = _ConsoleCommand::getCommandLC(evaluation.getToken(0), evaluation.getToken(1));
+                if (evaluation.execCommand_)
+                    evaluation.execArgumentsOffset_ = 2;
             }
         }
-    }
 
-    void CommandExecutor::parse(const std::string& command, bool bInitialize)
-    {
-        if (bInitialize)
-            CommandExecutor::getEvaluation().initialize(command);
-
-        CommandExecutor::getEvaluation().commandTokens_.split(command, " ", SubString::WhiteSpaces, false, '\\', false, '"', false, '(', ')', false, '\0');
-        CommandExecutor::getEvaluation().command_ = command;
-
-        switch (CommandExecutor::getEvaluation().state_)
+        if (evaluation.execCommand_ && evaluation.getNumberOfArguments() > evaluation.execArgumentsOffset_)
         {
-            case CommandState::Uninitialized:
-            {
-                // Impossible
-                break;
-            }
-            case CommandState::Empty:
-            {
-                if (CommandExecutor::argumentsGiven() == 0)
-                {
-                    CommandExecutor::createListOfPossibleFunctions("");
-                    CommandExecutor::createListOfPossibleIdentifiers("");
-                    break;
-                }
-                else
-                {
-                    CommandExecutor::getEvaluation().state_ = CommandState::ShortcutOrIdentifier;
-                    // Move on to next case
-                }
-            }
-            case CommandState::ShortcutOrIdentifier:
-            {
-                if (CommandExecutor::argumentsGiven() > 1)
-                {
-                    // There's a finished first argument - check if it's a shortcut or a classname
-                    CommandExecutor::getEvaluation().function_ = CommandExecutor::getPossibleCommand(CommandExecutor::getArgument(0));
-                    CommandExecutor::getEvaluation().functionclass_ = CommandExecutor::getPossibleIdentifier(CommandExecutor::getArgument(0));
-
-                    if (CommandExecutor::getEvaluation().function_)
-                    {
-                        // It's a shortcut
-                        CommandExecutor::getEvaluation().state_ = CommandState::ParamPreparation;
-                        CommandExecutor::getEvaluation().functionclass_ = 0;
-                        // Move on to next case
-                    }
-                    else if (CommandExecutor::getEvaluation().functionclass_)
-                    {
-                        // It's a functionname
-                        CommandExecutor::getEvaluation().state_ = CommandState::Function;
-                        CommandExecutor::getEvaluation().function_ = 0;
-                        // Move on to next case
-                    }
-                    else
-                    {
-                        // The first argument is bad
-                        CommandExecutor::getEvaluation().state_ = CommandState::Error;
-                        AddLanguageEntry("commandexecutorunknownfirstargument", "is not a shortcut nor a classname");
-                        CommandExecutor::getEvaluation().errorMessage_ = "Error: " + CommandExecutor::getArgument(0) + ' ' + GetLocalisation("commandexecutorunknownfirstargument") + '.';
-                        return;
-                    }
-                }
-                else
-                {
-                    // There's no finished first argument - search possible shortcuts or classnames
-                    CommandExecutor::createListOfPossibleFunctions(CommandExecutor::getArgument(0));
-                    CommandExecutor::createListOfPossibleIdentifiers(CommandExecutor::getArgument(0));
-
-                    unsigned int num_functions = CommandExecutor::getEvaluation().listOfPossibleFunctions_.size();
-                    unsigned int num_identifiers = CommandExecutor::getEvaluation().listOfPossibleIdentifiers_.size();
-
-                    if (num_functions == 1 && num_identifiers == 0)
-                    {
-                        // It's a shortcut
-                        const std::string& functionname = *CommandExecutor::getEvaluation().listOfPossibleFunctions_.begin()->first;
-                        CommandExecutor::getEvaluation().function_ = CommandExecutor::getPossibleCommand(functionname);
-                        if (getLowercase(functionname) != getLowercase(CommandExecutor::getArgument(0)))
-                        {
-                            // Unfinished shortcut
-                            CommandExecutor::getEvaluation().bCommandChanged_ = true;
-                        }
-                        CommandExecutor::getEvaluation().state_ = CommandState::ParamPreparation;
-                        CommandExecutor::getEvaluation().functionclass_ = 0;
-                        CommandExecutor::getEvaluation().command_ = CommandExecutor::getEvaluation().function_->getName();
-                        if (CommandExecutor::getEvaluation().function_->getExecutor()->getParamCount() > 0)
-                        {
-                            CommandExecutor::getEvaluation().command_ += ' ';
-                            CommandExecutor::getEvaluation().bCommandChanged_ = true;
-                        }
-                        // Move on to next case
-                    }
-                    else if (num_identifiers == 1 && num_functions == 0)
-                    {
-                        // It's a classname
-                        const std::string& classname = *CommandExecutor::getEvaluation().listOfPossibleIdentifiers_.begin()->first;
-                        CommandExecutor::getEvaluation().functionclass_ = CommandExecutor::getPossibleIdentifier(classname);
-                        if (getLowercase(classname) != getLowercase(CommandExecutor::getArgument(0)))
-                        {
-                            // Unfinished classname
-                            CommandExecutor::getEvaluation().bCommandChanged_ = true;
-                        }
-                        CommandExecutor::getEvaluation().state_ = CommandState::Function;
-                        CommandExecutor::getEvaluation().function_ = 0;
-                        CommandExecutor::getEvaluation().command_ = CommandExecutor::getEvaluation().functionclass_->getName() + ' ';
-                        // Move on to next case
-                    }
-                    else if (num_identifiers == 0 && num_functions == 0)
-                    {
-                        // No possibilities
-                        CommandExecutor::getEvaluation().state_ = CommandState::Error;
-                        AddLanguageEntry("commandexecutorunknownfirstargumentstart", "There is no command or classname starting with");
-                        CommandExecutor::getEvaluation().errorMessage_ = "Error: " + GetLocalisation("commandexecutorunknownfirstargumentstart") + ' ' + CommandExecutor::getArgument(0) + '.';
-                        return;
-                    }
-                    else
-                    {
-                        // There are several possiblilities
-                        std::list<std::pair<const std::string*, const std::string*> > temp;
-                        temp.insert(temp.end(), CommandExecutor::getEvaluation().listOfPossibleFunctions_.begin(), CommandExecutor::getEvaluation().listOfPossibleFunctions_.end());
-                        temp.insert(temp.end(), CommandExecutor::getEvaluation().listOfPossibleIdentifiers_.begin(), CommandExecutor::getEvaluation().listOfPossibleIdentifiers_.end());
-                        CommandExecutor::getEvaluation().command_ = CommandExecutor::getCommonBegin(temp);
-                        CommandExecutor::getEvaluation().function_ = CommandExecutor::getPossibleCommand(CommandExecutor::getArgument(0));
-                        CommandExecutor::getEvaluation().functionclass_ = CommandExecutor::getPossibleIdentifier(CommandExecutor::getArgument(0));
-                        CommandExecutor::getEvaluation().bCommandChanged_ = true;
-                        return;
-                    }
-                }
-            }
-            case CommandState::Function:
-            {
-                if (CommandExecutor::getEvaluation().functionclass_)
-                {
-                    // There is a classname - search for the commandname
-                    if (CommandExecutor::argumentsGiven() > 2)
-                    {
-                        // There is a finished second argument - check if it's a commandname
-                        CommandExecutor::getEvaluation().function_ = CommandExecutor::getPossibleCommand(CommandExecutor::getArgument(1), CommandExecutor::getEvaluation().functionclass_);
-
-                        if (CommandExecutor::getEvaluation().function_)
-                        {
-                            // It's a function
-                            CommandExecutor::getEvaluation().state_ = CommandState::ParamPreparation;
-                            // Move on to next case
-                        }
-                        else
-                        {
-                            // The second argument is bad
-                            CommandExecutor::getEvaluation().state_ = CommandState::Error;
-                            AddLanguageEntry("commandexecutorunknownsecondargument", "is not a function of");
-                            CommandExecutor::getEvaluation().errorMessage_ = "Error: " + CommandExecutor::getArgument(1) + " " + GetLocalisation("commandexecutorunknownsecondargument") + " " + CommandExecutor::getEvaluation().functionclass_->getName() + ".";
-                            return;
-                        }
-                    }
-                    else
-                    {
-                        // There is no finished second argument - search for possibilities
-                        CommandExecutor::createListOfPossibleFunctions(CommandExecutor::getArgument(1), CommandExecutor::getEvaluation().functionclass_);
-                        unsigned int num_functions = CommandExecutor::getEvaluation().listOfPossibleFunctions_.size();
-
-                        if (num_functions == 1)
-                        {
-                            // It's a function
-                            const std::string& functionname = *CommandExecutor::getEvaluation().listOfPossibleFunctions_.begin()->first;
-                            CommandExecutor::getEvaluation().function_ = CommandExecutor::getPossibleCommand(functionname, CommandExecutor::getEvaluation().functionclass_);
-                            if (getLowercase(functionname) != getLowercase(CommandExecutor::getArgument(1)))
-                            {
-                                // Unfinished function
-                                CommandExecutor::getEvaluation().bCommandChanged_ = true;
-                            }
-                            CommandExecutor::getEvaluation().state_ = CommandState::ParamPreparation;
-                            CommandExecutor::getEvaluation().command_ = CommandExecutor::getEvaluation().functionclass_->getName() + ' ' + CommandExecutor::getEvaluation().function_->getName();
-                            if (CommandExecutor::getEvaluation().function_->getExecutor()->getParamCount() > 0)
-                            {
-                                CommandExecutor::getEvaluation().command_ += ' ';
-                                CommandExecutor::getEvaluation().bCommandChanged_ = true;
-                            }
-                            // Move on to next case
-                        }
-                        else if (num_functions == 0)
-                        {
-                            // No possibilities
-                            CommandExecutor::getEvaluation().state_ = CommandState::Error;
-                            AddLanguageEntry("commandexecutorunknownsecondargumentstart", "has no function starting with");
-                            CommandExecutor::getEvaluation().errorMessage_ = "Error: " + CommandExecutor::getEvaluation().functionclass_->getName() + ' ' + GetLocalisation("commandexecutorunknownsecondargumentstart") + ' ' + CommandExecutor::getArgument(1) + '.';
-                            return;
-                        }
-                        else
-                        {
-                            // There are several possibilities
-                            CommandExecutor::getEvaluation().command_ = CommandExecutor::getEvaluation().functionclass_->getName() + ' ' + CommandExecutor::getCommonBegin(CommandExecutor::getEvaluation().listOfPossibleFunctions_);
-                            CommandExecutor::getEvaluation().function_ = CommandExecutor::getPossibleCommand(CommandExecutor::getArgument(1), CommandExecutor::getEvaluation().functionclass_);
-                            CommandExecutor::getEvaluation().bCommandChanged_ = true;
-                            return;
-                        }
-                    }
-                }
-                else
-                {
-                    // There is no classname - move on to CommandState::ParamPreparation
-                }
-            }
-            case CommandState::ParamPreparation:
-            {
-                if (CommandExecutor::getEvaluation().function_->getExecutor()->getParamCount() == 0 || CommandExecutor::enoughArgumentsGiven(CommandExecutor::getEvaluation().function_))
-                {
-                    CommandExecutor::getEvaluation().state_ = CommandState::Finished;
-                    return;
-                }
-                else
-                {
-                    unsigned int argumentNumber = CommandExecutor::argumentsGiven() - 2;
-                    if (CommandExecutor::getEvaluation().functionclass_)
-                        argumentNumber -= 1;
-
-                    CommandExecutor::createListOfPossibleArguments(CommandExecutor::getLastArgument(), CommandExecutor::getEvaluation().function_, argumentNumber);
-                    CommandExecutor::getEvaluation().state_ = CommandState::Params;
-
-                    if (CommandExecutor::getEvaluation().bCommandChanged_)
-                    {
-                        // Don't do more than one change
-                        return;
-                    }
-                }
-            }
-            case CommandState::Params:
-            {
-                if (CommandExecutor::getEvaluation().listOfPossibleArguments_.size() == 1)
-                {
-                    // There is exactly one possible argument
-                    CommandExecutor::getEvaluation().argument_ = CommandExecutor::getEvaluation().listOfPossibleArguments_.begin()->getString();
-                    CommandExecutor::getEvaluation().possibleArgument_ = CommandExecutor::getEvaluation().listOfPossibleArguments_.begin()->getString();
-                    CommandExecutor::getEvaluation().state_ = CommandState::ParamPreparation;
-                    return;
-                }
-                else if (CommandExecutor::getEvaluation().listOfPossibleArguments_.size() == 0)
-                {
-                    // The user tries something new - we let him do
-                    CommandExecutor::getEvaluation().state_ = CommandState::ParamPreparation;
-                    CommandExecutor::getEvaluation().argument_ = CommandExecutor::getLastArgument();
-                    return;
-                }
-                else
-                {
-                    // There are several possibilities
-                    unsigned int argumentNumber = CommandExecutor::argumentsGiven();
-                    if (argumentNumber > 0)
-                        --argumentNumber;
-                    if (CommandExecutor::getEvaluation().functionclass_ && argumentNumber > 0)
-                        --argumentNumber;
-
-                    CommandExecutor::getEvaluation().argument_ = CommandExecutor::getCommonBegin(CommandExecutor::getEvaluation().listOfPossibleArguments_);
-                    CommandExecutor::getEvaluation().possibleArgument_ = CommandExecutor::getPossibleArgument(CommandExecutor::getLastArgument(), CommandExecutor::getEvaluation().function_, argumentNumber);
-                    CommandExecutor::getEvaluation().state_ = CommandState::ParamPreparation;
-                    return;
-                }
-            }
-            case CommandState::Finished:
-            {
-                // Nothing more to do
-                break;
-            }
-            case CommandState::Error:
-            {
-                // Bad, very bad
-                break;
-            }
-        }
-    }
-
-    unsigned int CommandExecutor::argumentsFinished()
-    {
-        unsigned int argumentsGiven = CommandExecutor::argumentsGiven();
-        if (argumentsGiven > 0)
-            return argumentsGiven - 1;
-        else
-            return 0;
-    }
-
-    unsigned int CommandExecutor::argumentsGiven()
-    {
-        if (CommandExecutor::getEvaluation().command_.size() > 0 && CommandExecutor::getEvaluation().command_[CommandExecutor::getEvaluation().command_.size() - 1] == ' ')
-            return CommandExecutor::getEvaluation().commandTokens_.size() + 1;
-        else
-            return CommandExecutor::getEvaluation().commandTokens_.size();
-    }
-
-    bool CommandExecutor::enoughArgumentsGiven(_ConsoleCommand* command)
-    {
-        if (CommandExecutor::getEvaluation().functionclass_)
-            return (CommandExecutor::argumentsGiven() > (2 + command->getExecutor()->getParamCount()));
-        else
-            return (CommandExecutor::argumentsGiven() > (1 + command->getExecutor()->getParamCount()));
-    }
-
-    const std::string& CommandExecutor::getArgument(unsigned int index)
-    {
-        if (index < (CommandExecutor::getEvaluation().commandTokens_.size()))
-            return CommandExecutor::getEvaluation().commandTokens_[index];
-        else
-            return BLANKSTRING;
-    }
-
-    const std::string& CommandExecutor::getLastArgument()
-    {
-        return CommandExecutor::getArgument(CommandExecutor::argumentsGiven() - 1);
-    }
-
-    void CommandExecutor::createListOfPossibleIdentifiers(const std::string& fragment)
-    {
-/*
-        CommandExecutor::getEvaluation().listOfPossibleIdentifiers_.clear();
-        const std::string& lowercase = getLowercase(fragment);
-        for (std::map<std::string, Identifier*>::const_iterator it = Identifier::getLowercaseStringIdentifierMapBegin(); it != Identifier::getLowercaseStringIdentifierMapEnd(); ++it)
-            if (it->second->hasConsoleCommands())
-                if (it->first.find(lowercase) == 0 || fragment.empty())
-                    CommandExecutor::getEvaluation().listOfPossibleIdentifiers_.push_back(std::pair<const std::string*, const std::string*>(&it->first, &it->second->getName()));
-*/
-    }
-
-    void CommandExecutor::createListOfPossibleFunctions(const std::string& fragment, Identifier* identifier)
-    {
-/*
-        CommandExecutor::getEvaluation().listOfPossibleFunctions_.clear();
-        const std::string& lowercase = getLowercase(fragment);
-        if (!identifier)
-        {
-            for (std::map<std::string, _ConsoleCommand*>::const_iterator it = CommandExecutor::getLowercaseConsoleCommandShortcutMapBegin(); it != CommandExecutor::getLowercaseConsoleCommandShortcutMapEnd(); ++it)
-                if (it->first.find(lowercase) == 0 || fragment.empty())
-                    CommandExecutor::getEvaluation().listOfPossibleFunctions_.push_back(std::pair<const std::string*, const std::string*>(&it->first, &it->second->getName()));
-        }
-        else
-        {
-            for (std::map<std::string, _ConsoleCommand*>::const_iterator it = identifier->getLowercaseConsoleCommandMapBegin(); it != identifier->getLowercaseConsoleCommandMapEnd(); ++it)
-                if (it->first.find(lowercase) == 0 || fragment.empty())
-                    CommandExecutor::getEvaluation().listOfPossibleFunctions_.push_back(std::pair<const std::string*, const std::string*>(&it->first, &it->second->getName()));
-        }
-*/
-    }
-
-    void CommandExecutor::createListOfPossibleArguments(const std::string& fragment, _ConsoleCommand* command, unsigned int param)
-    {
-/*
-        CommandExecutor::createArgumentCompletionList(command, param);
-
-        CommandExecutor::getEvaluation().listOfPossibleArguments_.clear();
-        const std::string& lowercase = getLowercase(fragment);
-        for (ArgumentCompletionList::const_iterator it = command->getArgumentCompletionListBegin(); it != command->getArgumentCompletionListEnd(); ++it)
-        {
-            if (it->lowercaseComparison())
-            {
-                if (it->getComparable().find(lowercase) == 0 || fragment.empty())
-                    CommandExecutor::getEvaluation().listOfPossibleArguments_.push_back(*it);
-            }
-            else
-            {
-                if (it->getComparable().find(fragment) == 0 || fragment.empty())
-                    CommandExecutor::getEvaluation().listOfPossibleArguments_.push_back(*it);
-            }
-        }
-*/
-    }
-
-    Identifier* CommandExecutor::getPossibleIdentifier(const std::string& name)
-    {
-/*
-        const std::string& lowercase = getLowercase(name);
-        std::map<std::string, Identifier*>::const_iterator it = Identifier::getLowercaseStringIdentifierMap().find(lowercase);
-        if ((it != Identifier::getLowercaseStringIdentifierMapEnd()) && it->second->hasConsoleCommands())
-            return it->second;
-*/
-        return 0;
-    }
-
-    _ConsoleCommand* CommandExecutor::getPossibleCommand(const std::string& name, Identifier* identifier)
-    {
-/*
-        const std::string& lowercase = getLowercase(name);
-        if (!identifier)
-        {
-            std::map<std::string, _ConsoleCommand*>::const_iterator it = CommandExecutor::getLowercaseConsoleCommandShortcutMap().find(lowercase);
-            if (it != CommandExecutor::getLowercaseConsoleCommandShortcutMapEnd())
-                return it->second;
-        }
-        else
-        {
-            std::map<std::string, _ConsoleCommand*>::const_iterator it = identifier->getLowercaseConsoleCommandMap().find(lowercase);
-            if (it != identifier->getLowercaseConsoleCommandMapEnd())
-                return it->second;
-        }
-*/
-        return 0;
-    }
-
-    const std::string& CommandExecutor::getPossibleArgument(const std::string& name, _ConsoleCommand* command, unsigned int param)
-    {
-/*
-        CommandExecutor::createArgumentCompletionList(command, param);
-
-        const std::string& lowercase = getLowercase(name);
-        for (ArgumentCompletionList::const_iterator it = command->getArgumentCompletionListBegin(); it != command->getArgumentCompletionListEnd(); ++it)
-        {
-            if (it->lowercaseComparison())
-            {
-                if (it->getComparable() == lowercase)
-                    return it->getString();
-            }
-            else
-            {
-                if (it->getComparable() == name)
-                    return it->getString();
-            }
-        }
-*/
-        return BLANKSTRING;
-    }
-
-    void CommandExecutor::createArgumentCompletionList(_ConsoleCommand* command, unsigned int param)
-    {
-/*
-        std::string params[5];
-
-        unsigned int index = 0;
-        unsigned int lowestIndex = 1 + (CommandExecutor::getEvaluation().functionclass_ != 0);
-
-        for (unsigned int i = CommandExecutor::argumentsGiven() - 1; i >= lowestIndex; --i)
-        {
-            params[index] = CommandExecutor::getArgument(i);
-            ++index;
-            if (index >= 5)
-                break;
+            evaluation.hintCommand_ = evaluation.execCommand_;
+            evaluation.hintArgumentsOffset_ = evaluation.execArgumentsOffset_;
         }
 
-        command->createArgumentCompletionList(param, params[0], params[1], params[2], params[3], params[4]);
-*/
-    }
-
-    std::string CommandExecutor::getCommonBegin(const std::list<std::pair<const std::string*, const std::string*> >& list)
-    {
-        if (list.size() == 0)
-        {
-            return "";
-        }
-        else if (list.size() == 1)
-        {
-            return ((*list.begin()->first) + ' ');
-        }
-        else
-        {
-            std::string output;
-            for (unsigned int i = 0; true; i++)
-            {
-                char temp = 0;
-                for (std::list<std::pair<const std::string*, const std::string*> >::const_iterator it = list.begin(); it != list.end(); ++it)
-                {
-                    if (it->first->size() > i)
-                    {
-                        if (it == list.begin())
-                        {
-                            temp = (*it->first)[i];
-                        }
-                        else
-                        {
-                            if (temp != (*it->first)[i])
-                                return output;
-                        }
-                    }
-                    else
-                    {
-                        return output;
-                    }
-                }
-                output += temp;
-            }
-            return output;
-        }
-    }
-
-    std::string CommandExecutor::getCommonBegin(const ArgumentCompletionList& list)
-    {
-        if (list.size() == 0)
-        {
-            return "";
-        }
-        else if (list.size() == 1)
-        {
-            return (list.begin()->getComparable() + ' ');
-        }
-        else
-        {
-            std::string output;
-            for (unsigned int i = 0; true; i++)
-            {
-                char tempComparable = 0;
-                char temp = 0;
-                for (ArgumentCompletionList::const_iterator it = list.begin(); it != list.end(); ++it)
-                {
-                    const std::string& argumentComparable = it->getComparable();
-                    const std::string& argument = it->getString();
-                    if (argument.size() > i)
-                    {
-                        if (it == list.begin())
-                        {
-                            tempComparable = argumentComparable[i];
-                            temp = argument[i];
-                        }
-                        else
-                        {
-                            if (tempComparable != argumentComparable[i])
-                                return output;
-                            else if (temp != argument[i])
-                                temp = tempComparable;
-                        }
-                    }
-                    else
-                    {
-                        return output;
-                    }
-                }
-                output += temp;
-            }
-            return output;
-        }
+        return evaluation;
     }
 }
Index: code/branches/consolecommands3/src/libraries/core/command/CommandExecutor.h
===================================================================
--- code/branches/consolecommands3/src/libraries/core/command/CommandExecutor.h	(revision 7227)
+++ code/branches/consolecommands3/src/libraries/core/command/CommandExecutor.h	(revision 7228)
@@ -32,6 +32,4 @@
 #include "core/CorePrereqs.h"
 
-#include <map>
-#include <set>
 #include <string>
 
@@ -46,13 +44,18 @@
 // tolua_end
         public:
-            static bool execute(const std::string& command, bool useTcl = true); // tolua_export
+            static int execute(const std::string& command, bool useTcl = true); // tolua_export
 
-            static MultiType queryMT(const std::string& command, bool* success = 0, bool useTcl = true);
-            static std::string query(const std::string& command, bool* success = 0, bool useTcl = true); // tolua_export
-
-            static std::string complete(const std::string& command);
-            static std::string hint(const std::string& command);
+            static MultiType queryMT(const std::string& command, int* error = 0, bool useTcl = true);
+            static std::string query(const std::string& command, int* error = 0, bool useTcl = true); // tolua_export
 
             static CommandEvaluation evaluate(const std::string& command);
+
+            static const int Success = 0;
+            static const int Error = 1;
+            static const int Incomplete = 2;
+            static const int Deactivated = 3;
+            static const int Denied = 4;
+
+            static void _autocomplete(const std::string& group, const std::string& name) {}
 
         private:
@@ -62,28 +65,4 @@
 
             static CommandExecutor& getInstance();
-            static CommandEvaluation& getEvaluation();
-
-            static void parseIfNeeded(const std::string& command);
-            static void parse(const std::string& command, bool bInitialize = true);
-
-            static unsigned int argumentsFinished();
-            static unsigned int argumentsGiven();
-            static bool enoughArgumentsGiven(_ConsoleCommand* command);
-            static const std::string& getArgument(unsigned int index);
-            static const std::string& getLastArgument();
-
-            static void createListOfPossibleIdentifiers(const std::string& fragment);
-            static void createListOfPossibleFunctions(const std::string& fragment, Identifier* identifier = 0);
-            static void createListOfPossibleArguments(const std::string& fragment, _ConsoleCommand* command, unsigned int param);
-
-            static Identifier* getPossibleIdentifier(const std::string& name);
-            static _ConsoleCommand* getPossibleCommand(const std::string& name, Identifier* identifier = 0);
-            static const std::string& getPossibleArgument(const std::string& name, _ConsoleCommand* command, unsigned int param);
-
-            static void createArgumentCompletionList(_ConsoleCommand* command, unsigned int param);
-            static std::string getCommonBegin(const std::list<std::pair<const std::string*, const std::string*> >& list);
-            static std::string getCommonBegin(const ArgumentCompletionList& list);
-
-            CommandEvaluation evaluation_;
     }; // tolua_export
 } // tolua_export
Index: code/branches/consolecommands3/src/libraries/core/command/ConsoleCommand.cc
===================================================================
--- code/branches/consolecommands3/src/libraries/core/command/ConsoleCommand.cc	(revision 7227)
+++ code/branches/consolecommands3/src/libraries/core/command/ConsoleCommand.cc	(revision 7228)
@@ -30,4 +30,5 @@
 
 #include "util/Convert.h"
+#include "util/StringUtils.h"
 #include "core/Language.h"
 #include "core/GameMode.h"
@@ -398,5 +399,5 @@
     }
 
-    /* static */ const _ConsoleCommand* _ConsoleCommand::getCommand(const std::string& group, const std::string& name, bool bPrintError)
+    /* static */ _ConsoleCommand* _ConsoleCommand::getCommand(const std::string& group, const std::string& name, bool bPrintError)
     {
         std::map<std::string, std::map<std::string, _ConsoleCommand*> >::const_iterator it_group = _ConsoleCommand::getCommandMap().find(group);
@@ -419,8 +420,38 @@
     }
 
+    /* static */ _ConsoleCommand* _ConsoleCommand::getCommandLC(const std::string& group, const std::string& name, bool bPrintError)
+    {
+        std::string groupLC = getLowercase(group);
+        std::string nameLC = getLowercase(name);
+
+        std::map<std::string, std::map<std::string, _ConsoleCommand*> >::const_iterator it_group = _ConsoleCommand::getCommandMapLC().find(groupLC);
+        if (it_group != _ConsoleCommand::getCommandMapLC().end())
+        {
+            std::map<std::string, _ConsoleCommand*>::const_iterator it_name = it_group->second.find(nameLC);
+            if (it_name != it_group->second.end())
+            {
+                return it_name->second;
+            }
+        }
+        if (bPrintError)
+        {
+            if (group == "")
+                COUT(1) << "Error: Couldn't find console command with shortcut \"" << name << "\"" << std::endl;
+            else
+                COUT(1) << "Error: Couldn't find console command with group \"" << group << "\" and name \"" << name << "\"" << std::endl;
+        }
+        return 0;
+    }
+
     /* static */ std::map<std::string, std::map<std::string, _ConsoleCommand*> >& _ConsoleCommand::getCommandMap()
     {
         static std::map<std::string, std::map<std::string, _ConsoleCommand*> > commandMap;
         return commandMap;
+    }
+
+    /* static */ std::map<std::string, std::map<std::string, _ConsoleCommand*> >& _ConsoleCommand::getCommandMapLC()
+    {
+        static std::map<std::string, std::map<std::string, _ConsoleCommand*> > commandMapLC;
+        return commandMapLC;
     }
 
@@ -440,4 +471,5 @@
         {
             _ConsoleCommand::getCommandMap()[group][name] = command;
+            _ConsoleCommand::getCommandMapLC()[getLowercase(group)][getLowercase(name)] = command;
         }
     }
@@ -460,4 +492,20 @@
                 ++it_group;
         }
+
+        for (std::map<std::string, std::map<std::string, _ConsoleCommand*> >::iterator it_group = _ConsoleCommand::getCommandMapLC().begin(); it_group != _ConsoleCommand::getCommandMapLC().end(); )
+        {
+            for (std::map<std::string, _ConsoleCommand*>::iterator it_name = it_group->second.begin(); it_name != it_group->second.end(); )
+            {
+                if (it_name->second == command)
+                    it_group->second.erase(it_name++);
+                else
+                    ++it_name;
+            }
+
+            if (it_group->second.empty())
+                _ConsoleCommand::getCommandMapLC().erase(it_group++);
+            else
+                ++it_group;
+        }
     }
 
Index: code/branches/consolecommands3/src/libraries/core/command/ConsoleCommand.h
===================================================================
--- code/branches/consolecommands3/src/libraries/core/command/ConsoleCommand.h	(revision 7227)
+++ code/branches/consolecommands3/src/libraries/core/command/ConsoleCommand.h	(revision 7228)
@@ -329,8 +329,14 @@
             static inline const std::map<std::string, std::map<std::string, _ConsoleCommand*> >& getCommands()
                 { return _ConsoleCommand::getCommandMap(); }
-
-            static inline const _ConsoleCommand* getCommand(const std::string& name, bool bPrintError = false)
+            static inline const std::map<std::string, std::map<std::string, _ConsoleCommand*> >& getCommandsLC()
+                { return _ConsoleCommand::getCommandMapLC(); }
+
+            static inline _ConsoleCommand* getCommand(const std::string& name, bool bPrintError = false)
                 { return _ConsoleCommand::getCommand("", name, bPrintError); }
-            static const _ConsoleCommand* getCommand(const std::string& group, const std::string& name, bool bPrintError = false);
+            static inline _ConsoleCommand* getCommandLC(const std::string& name, bool bPrintError = false)
+                { return _ConsoleCommand::getCommandLC("", name, bPrintError); }
+
+            static _ConsoleCommand* getCommand(const std::string& group, const std::string& name, bool bPrintError = false);
+            static _ConsoleCommand* getCommandLC(const std::string& group, const std::string& name, bool bPrintError = false);
 
             static void destroyAll();
@@ -338,4 +344,6 @@
         private:
             static std::map<std::string, std::map<std::string, _ConsoleCommand*> >& getCommandMap();
+            static std::map<std::string, std::map<std::string, _ConsoleCommand*> >& getCommandMapLC();
+
             static void registerCommand(const std::string& group, const std::string& name, _ConsoleCommand* command);
             static void unregisterCommand(_ConsoleCommand* command);
Index: code/branches/consolecommands3/src/libraries/core/command/Executor.cc
===================================================================
--- code/branches/consolecommands3/src/libraries/core/command/Executor.cc	(revision 7227)
+++ code/branches/consolecommands3/src/libraries/core/command/Executor.cc	(revision 7228)
@@ -36,4 +36,5 @@
 #include "util/StringUtils.h"
 #include "util/SubString.h"
+#include "CommandExecutor.h"
 
 namespace orxonox
@@ -49,8 +50,8 @@
     }
 
-    MultiType Executor::parse(const std::string& params, bool* success, const std::string& delimiter) const
-    {
-        if (success)
-            *success = true;
+    MultiType Executor::parse(const std::string& params, int* error, const std::string& delimiter, bool bPrintError) const
+    {
+        if (error)
+            *error = CommandExecutor::Success;
 
         unsigned int paramCount = this->functor_->getParamCount();
@@ -76,7 +77,8 @@
             else
             {
-                COUT(2) << "Warning: Can't call executor " << this->name_ << " through parser: Not enough parameters or default values given (input: " << temp << ")." << std::endl;
-                if (success)
-                    *success = false;
+                if (bPrintError)
+                    COUT(2) << "Warning: Can't call executor " << this->name_ << " through parser: Not enough parameters or default values given (input: " << temp << ")." << std::endl;
+                if (error)
+                    *error = CommandExecutor::Incomplete;
                 return MT_Type::Null;
             }
@@ -90,7 +92,8 @@
                 if (this->defaultValue_[i].null())
                 {
-                    COUT(2) << "Warning: Can't call executor " << this->name_ << " through parser: Not enough parameters or default values given (input:" << params << ")." << std::endl;
-                    if (success)
-                        *success = false;
+                    if (bPrintError)
+                        COUT(2) << "Warning: Can't call executor " << this->name_ << " through parser: Not enough parameters or default values given (input: " << params << ")." << std::endl;
+                    if (error)
+                        *error = CommandExecutor::Incomplete;
                     return MT_Type::Null;
                 }
Index: code/branches/consolecommands3/src/libraries/core/command/Executor.h
===================================================================
--- code/branches/consolecommands3/src/libraries/core/command/Executor.h	(revision 7227)
+++ code/branches/consolecommands3/src/libraries/core/command/Executor.h	(revision 7228)
@@ -59,5 +59,5 @@
                 { return (*this->functor_)(param1, param2, param3, param4, param5); }
 
-            MultiType parse(const std::string& params, bool* success = 0, const std::string& delimiter = " ") const;
+            MultiType parse(const std::string& params, int* error = 0, const std::string& delimiter = " ", bool bPrintError = false) const;
 
             bool evaluate(const std::string& params, MultiType param[5], const std::string& delimiter = " ") const;
@@ -164,10 +164,10 @@
             using Executor::parse;
 
-            MultiType parse(T* object, const std::string& params, bool* success = 0, const std::string& delimiter = " ") const
+            MultiType parse(T* object, const std::string& params, int* error = 0, const std::string& delimiter = " ", bool bPrintError = false) const
             {
                 T* oldobject = this->functorMember_->getObject();
 
                 this->functorMember_->setObject(object);
-                const MultiType& result = this->Executor::parse(params, success, delimiter);
+                const MultiType& result = this->Executor::parse(params, error, delimiter, bPrintError);
                 this->functorMember_->setObject(oldobject);
 
@@ -175,10 +175,10 @@
             }
 
-            MultiType parse(const T* object, const std::string& params, bool* success = 0, const std::string& delimiter = " ") const
+            MultiType parse(const T* object, const std::string& params, int* error = 0, const std::string& delimiter = " ", bool bPrintError = false) const
             {
                 T* oldobject = this->functorMember_->getObject();
 
                 this->functorMember_->setObject(object);
-                const MultiType& result = this->Executor::parse(params, success, delimiter);
+                const MultiType& result = this->Executor::parse(params, error, delimiter, bPrintError);
                 this->functorMember_->setObjects(oldobject);
 
Index: code/branches/consolecommands3/src/libraries/core/command/Shell.cc
===================================================================
--- code/branches/consolecommands3/src/libraries/core/command/Shell.cc	(revision 7227)
+++ code/branches/consolecommands3/src/libraries/core/command/Shell.cc	(revision 7228)
@@ -315,9 +315,15 @@
         this->updateListeners<&ShellListener::executed>();
 
-        bool success;
-        const std::string& result = CommandExecutor::query(this->inputBuffer_->get(), &success);
-        if (!success)
-        {
-            this->outputBuffer_ << "Error: Can't execute \"" << this->inputBuffer_->get() << "\"." << std::endl;
+        int error;
+        const std::string& result = CommandExecutor::query(this->inputBuffer_->get(), &error);
+        if (error)
+        {
+            switch (error)
+            {
+                case CommandExecutor::Error:       this->outputBuffer_ << "Error: Can't execute \"" << this->inputBuffer_->get() << "\", command doesn't exist. (S)" << std::endl; break;
+                case CommandExecutor::Incomplete:  this->outputBuffer_ << "Error: Can't execute \"" << this->inputBuffer_->get() << "\", not enough arguments given. (S)" << std::endl; break;
+                case CommandExecutor::Deactivated: this->outputBuffer_ << "Error: Can't execute \"" << this->inputBuffer_->get() << "\", command is not active. (S)" << std::endl; break;
+                case CommandExecutor::Denied:      this->outputBuffer_ << "Error: Can't execute \"" << this->inputBuffer_->get() << "\", access denied. (S)" << std::endl; break;
+            }
             this->outputChanged(Error);
         }
@@ -333,6 +339,6 @@
     void Shell::hintAndComplete()
     {
-        this->inputBuffer_->set(CommandExecutor::complete(this->inputBuffer_->get()));
-        this->outputBuffer_ << CommandExecutor::hint(this->inputBuffer_->get()) << std::endl;
+        this->inputBuffer_->set(CommandExecutor::evaluate(this->inputBuffer_->get()).complete());
+        this->outputBuffer_ << CommandExecutor::evaluate(this->inputBuffer_->get()).hint() << std::endl;
         this->outputChanged(Hint);
 
Index: code/branches/consolecommands3/src/libraries/core/command/TclBind.cc
===================================================================
--- code/branches/consolecommands3/src/libraries/core/command/TclBind.cc	(revision 7227)
+++ code/branches/consolecommands3/src/libraries/core/command/TclBind.cc	(revision 7228)
@@ -134,9 +134,12 @@
         const std::string& command = stripEnclosingBraces(args.get());
 
-        bool success;
-        const std::string& result = CommandExecutor::query(command, &success, false);
-        if (!success)
-        {
-            COUT(1) << "Error: Can't execute command \"" << command << "\"!" << std::endl;
+        int error;
+        const std::string& result = CommandExecutor::query(command, &error, false);
+        switch (error)
+        {
+            case CommandExecutor::Error:       COUT(1) << "Error: Can't execute command \"" << command << "\", command doesn't exist. (B)" << std::endl; break;
+            case CommandExecutor::Incomplete:  COUT(1) << "Error: Can't execute command \"" << command << "\", not enough arguments given. (B)" << std::endl; break;
+            case CommandExecutor::Deactivated: COUT(1) << "Error: Can't execute command \"" << command << "\", command is not active. (B)" << std::endl; break;
+            case CommandExecutor::Denied:      COUT(1) << "Error: Can't execute command \"" << command << "\", access denied. (B)" << std::endl; break;
         }
 
@@ -149,5 +152,5 @@
         const std::string& command = stripEnclosingBraces(args.get());
 
-        if (!CommandExecutor::execute(command, false))
+        if (CommandExecutor::execute(command, false))
         {
             COUT(1) << "Error: Can't execute command \"" << command << "\"!" << std::endl;
@@ -180,8 +183,8 @@
     }
 
-    std::string TclBind::eval(const std::string& tclcode, bool* success)
-    {
-        if (success)
-            *success = true;
+    std::string TclBind::eval(const std::string& tclcode, int* error)
+    {
+        if (error)
+            *error = CommandExecutor::Success;
 
         try
@@ -192,6 +195,6 @@
         {   COUT(1) << "Tcl error: " << e.what() << std::endl;   }
 
-        if (success)
-            *success = false;
+        if (error)
+            *error = CommandExecutor::Error;
         return "";
     }
Index: code/branches/consolecommands3/src/libraries/core/command/TclBind.h
===================================================================
--- code/branches/consolecommands3/src/libraries/core/command/TclBind.h	(revision 7227)
+++ code/branches/consolecommands3/src/libraries/core/command/TclBind.h	(revision 7228)
@@ -59,5 +59,5 @@
             static void tcl_execute(Tcl::object const &args);
 
-            static std::string eval(const std::string& tclcode, bool* success = 0);
+            static std::string eval(const std::string& tclcode, int* error = 0);
 
         private:
Index: code/branches/consolecommands3/src/libraries/core/command/TclThreadManager.cc
===================================================================
--- code/branches/consolecommands3/src/libraries/core/command/TclThreadManager.cc	(revision 7227)
+++ code/branches/consolecommands3/src/libraries/core/command/TclThreadManager.cc	(revision 7228)
@@ -439,8 +439,13 @@
                         // It's a query to the CommandExecutor
                         TclThreadManager::debug("TclThread_query -> CE: " + command);
-                        bool success;
-                        output = CommandExecutor::query(command, &success, false);
-                        if (!success)
-                            TclThreadManager::error("Error: Can't execute command \"" + command + "\"!");
+                        int error;
+                        output = CommandExecutor::query(command, &error, false);
+                        switch (error)
+                        {
+                            case CommandExecutor::Error:       TclThreadManager::error("Error: Can't execute command \"" + command + "\", command doesn't exist. (T)"); break;
+                            case CommandExecutor::Incomplete:  TclThreadManager::error("Error: Can't execute command \"" + command + "\", not enough arguments given. (T)"); break;
+                            case CommandExecutor::Deactivated: TclThreadManager::error("Error: Can't execute command \"" + command + "\", command is not active. (T)"); break;
+                            case CommandExecutor::Denied:      TclThreadManager::error("Error: Can't execute command \"" + command + "\", access denied. (T)"); break;
+                        }
                     }
                     else
Index: code/branches/consolecommands3/src/libraries/core/input/InputCommands.cc
===================================================================
--- code/branches/consolecommands3/src/libraries/core/input/InputCommands.cc	(revision 7227)
+++ code/branches/consolecommands3/src/libraries/core/input/InputCommands.cc	(revision 7228)
@@ -53,5 +53,5 @@
         if (this->abs_ != 0.0f || this->rel_ != 0.0f)
         {
-            evaluation_.setEvaluatedParameter(paramIndex_, Vector2(abs_, rel_));
+//            evaluation_.setEvaluatedParameter(paramIndex_, Vector2(abs_, rel_));
             // reset
             rel_ = 0.0;
