Index: /code/branches/core2/src/orxonox/Orxonox.cc
===================================================================
--- /code/branches/core2/src/orxonox/Orxonox.cc	(revision 971)
+++ /code/branches/core2/src/orxonox/Orxonox.cc	(revision 972)
@@ -99,15 +99,15 @@
             void listen() const
             {
-                std::cout << "> -->" << this->ib_->get() << "<--" << std::endl;
+                std::cout << "> " << this->ib_->get() << std::endl;
             }
             void execute() const
             {
-std::cout << "### EXECUTE!" << std::endl;
-                CommandExecutor::execute(this->ib_->get());
+                std::cout << ">> " << this->ib_->get() << std::endl;
+                if (!CommandExecutor::execute(this->ib_->get()))
+                    std::cout << "Error" << std::endl;
                 this->ib_->clear();
             }
             void hintandcomplete() const
             {
-std::cout << "### HINT!" << std::endl;
                 std::cout << CommandExecutor::hint(this->ib_->get()) << std::endl;
                 this->ib_->set(CommandExecutor::complete(this->ib_->get()));
@@ -115,10 +115,8 @@
             void clear() const
             {
-std::cout << "### CLEAR!" << std::endl;
                 this->ib_->clear();
             }
             void removeLast() const
             {
-std::cout << "### REMOVELAST!" << std::endl;
                 this->ib_->removeLast();
             }
Index: /code/branches/core2/src/orxonox/core/CommandExecutor.cc
===================================================================
--- /code/branches/core2/src/orxonox/core/CommandExecutor.cc	(revision 971)
+++ /code/branches/core2/src/orxonox/core/CommandExecutor.cc	(revision 972)
@@ -98,17 +98,17 @@
         if (this->state_ == CS_Shortcut_Params || this->state_ == CS_Shortcut_Finished)
         {
-            return (this->shortcut_ != 0);
+            return this->shortcut_;
         }
         else if (this->state_ == CS_Function_Params || this->state_ == CS_Function_Finished)
         {
-            return ((this->functionclass_ != 0) && (this->function_ != 0));
+            return (this->functionclass_ && this->function_);
         }
         else if (this->state_ == CS_ConfigValueType || this->state_ == CS_ConfigValueFinished)
         {
-            return ((this->configvalueclass_ != 0) && (this->configvalue_ != 0));
+            return (this->configvalueclass_ && this->configvalue_);
         }
         else if (this->state_ == CS_KeybindCommand || this->state_ == CS_KeybindFinished)
         {
-            return (this->key_ != 0);
+            return this->key_;
         }
         else
@@ -128,5 +128,5 @@
         if (this->state_ == CS_Shortcut_Params || this->state_ == CS_Shortcut_Finished)
         {
-            if (this->shortcut_ != 0)
+            if (this->shortcut_)
             {
                 if (this->shortcut_->evaluate(this->processedCommand_ + this->getAdditionalParameter(), this->param_, " "))
@@ -139,5 +139,5 @@
         else if (this->state_ == CS_Function_Params || this->state_ == CS_Function_Finished)
         {
-            if (this->function_ != 0)
+            if (this->function_)
             {
                 if (this->function_->evaluate(this->processedCommand_ + this->getAdditionalParameter(), this->param_, " "))
@@ -227,5 +227,5 @@
         SubString tokens(evaluation.processedCommand_, " ", SubString::WhiteSpaces, false, '\\', '"', '(', ')', '\0');
 
-        if (evaluation.bEvaluatedParams_ && evaluation.evaluatedExecutor_ != 0)
+        if (evaluation.bEvaluatedParams_ && evaluation.evaluatedExecutor_)
         {
             (*evaluation.evaluatedExecutor_)(evaluation.param_[0], evaluation.param_[1], evaluation.param_[2], evaluation.param_[3], evaluation.param_[4]);
@@ -244,5 +244,5 @@
             case CS_Shortcut_Finished:
                 // call the shortcut
-                if (evaluation.shortcut_ != 0)
+                if (evaluation.shortcut_)
                 {
                     if (tokens.size() >= 2)
@@ -258,5 +258,5 @@
             case CS_Function_Finished:
                 // call the shortcut
-                if (evaluation.function_ != 0)
+                if (evaluation.function_)
                 {
                     if (tokens.size() >= 3)
@@ -274,5 +274,5 @@
             case CS_ConfigValueFinished:
                 // set the config value
-                if (evaluation.configvalue_ != 0)
+                if (evaluation.configvalue_)
                 {
                     if ((tokens.size() >= 1) && (tokens[0] == COMMAND_EXECUTOR_KEYWORD_SET_CONFIG_VALUE))
@@ -319,5 +319,5 @@
         SubString tokens(evaluation.processedCommand_, " ", SubString::WhiteSpaces, false, '\\', '"', '(', ')', '\0');
 
-        std::list<const std::string*> temp;
+        std::list<std::pair<const std::string*, const std::string*> > temp;
         if (evaluation.state_ == CS_Empty)
         {
@@ -336,36 +336,52 @@
                 break;
             case CS_Shortcut_Params:
-                if ((evaluation.processedCommand_.size() >= 1) && (evaluation.processedCommand_[evaluation.processedCommand_.size() - 1] != ' '))
-                    return (evaluation.processedCommand_ + " ");
+                if (evaluation.shortcut_)
+                    return (evaluation.shortcut_->getName() + " ");
                 break;
             case CS_Shortcut_Finished:
+                if (evaluation.shortcut_)
+                {
+                    if (evaluation.shortcut_->getParamCount() == 0)
+                        return (evaluation.shortcut_->getName());
+                    else if (tokens.size() >= 2)
+                        return (evaluation.shortcut_->getName() + " " + tokens.subSet(1).join());
+                }
                 break;
             case CS_Function:
-                if (tokens.size() >= 1)
-                    return tokens[0] + " " + CommandExecutor::getCommonBegin(evaluation.listOfPossibleFunctions_);
+                if (evaluation.functionclass_)
+                    return (evaluation.functionclass_->getName() + " " + CommandExecutor::getCommonBegin(evaluation.listOfPossibleFunctions_));
                 break;
             case CS_Function_Params:
-                if ((evaluation.processedCommand_.size() >= 1) && (evaluation.processedCommand_[evaluation.processedCommand_.size() - 1] != ' '))
-                    return (evaluation.processedCommand_ + " ");
+                if (evaluation.functionclass_ && evaluation.function_)
+                    return (evaluation.functionclass_->getName() + " " + evaluation.function_->getName() + " ");
                 break;
             case CS_Function_Finished:
+                if (evaluation.functionclass_ && evaluation.function_)
+                {
+                    if (evaluation.function_->getParamCount() == 0)
+                        return (evaluation.functionclass_->getName() + " " + evaluation.function_->getName());
+                    else if (tokens.size() >= 3)
+                        return (evaluation.functionclass_->getName() + " " + evaluation.function_->getName() + " " + tokens.subSet(2).join());
+                }
                 break;
             case CS_ConfigValueClass:
                 if (tokens.size() >= 1)
-                    return tokens[0] + " " + CommandExecutor::getCommonBegin(evaluation.listOfPossibleConfigValueClasses_);
+                    return (tokens[0] + " " + CommandExecutor::getCommonBegin(evaluation.listOfPossibleConfigValueClasses_));
                 break;
             case CS_ConfigValue:
-                if (tokens.size() >= 2)
-                    return tokens[0] + " " + tokens[1] + " " + CommandExecutor::getCommonBegin(evaluation.listOfPossibleConfigValues_);
+                if ((tokens.size() >= 1) && evaluation.configvalueclass_)
+                    return (tokens[0] + " " + evaluation.configvalueclass_->getName() + " " + CommandExecutor::getCommonBegin(evaluation.listOfPossibleConfigValues_));
                 break;
             case CS_ConfigValueType:
-                if ((evaluation.processedCommand_.size() >= 1) && (evaluation.processedCommand_[evaluation.processedCommand_.size() - 1] != ' '))
-                    return (evaluation.processedCommand_ + " ");
+                if ((tokens.size() >= 1) && evaluation.configvalueclass_ && evaluation.configvalue_)
+                    return (tokens[0] + " " + evaluation.configvalueclass_->getName() + " " + evaluation.configvalue_->getName() + " ");
                 break;
             case CS_ConfigValueFinished:
+                if ((tokens.size() >= 1) && evaluation.configvalueclass_ && evaluation.configvalue_ && (tokens.size() >= 4))
+                    return (tokens[0] + " " + evaluation.configvalueclass_->getName() + " " + evaluation.configvalue_->getName() + " " + tokens.subSet(3).join());
                 break;
             case CS_KeybindKey:
                 if (tokens.size() >= 1)
-                    return tokens[0] + " " + CommandExecutor::getCommonBegin(evaluation.listOfPossibleKeys_);
+                    return (tokens[0] + " " + CommandExecutor::getCommonBegin(evaluation.listOfPossibleKeys_));
                 break;
             case CS_KeybindCommand:
@@ -404,9 +420,9 @@
                 break;
             case CS_Shortcut_Params:
-                if (evaluation.shortcut_ != 0)
+                if (evaluation.shortcut_)
                     return CommandExecutor::dump(evaluation.shortcut_);
                 break;
             case CS_Shortcut_Finished:
-                if (evaluation.shortcut_ != 0)
+                if (evaluation.shortcut_)
                     return CommandExecutor::dump(evaluation.shortcut_);
                 break;
@@ -415,9 +431,9 @@
                 break;
             case CS_Function_Params:
-                if (evaluation.function_ != 0)
+                if (evaluation.function_)
                     return CommandExecutor::dump(evaluation.function_);
                 break;
             case CS_Function_Finished:
-                if (evaluation.function_ != 0)
+                if (evaluation.function_)
                     return CommandExecutor::dump(evaluation.function_);
                 break;
@@ -429,9 +445,9 @@
                 break;
             case CS_ConfigValueType:
-                if (evaluation.configvalue_ != 0)
+                if (evaluation.configvalue_)
                     return CommandExecutor::dump(evaluation.configvalue_);
                 break;
             case CS_ConfigValueFinished:
-                if (evaluation.configvalue_ != 0)
+                if (evaluation.configvalue_)
                     return CommandExecutor::dump(evaluation.configvalue_);
                 break;
@@ -440,9 +456,9 @@
                 break;
             case CS_KeybindCommand:
-                if (evaluation.key_ != 0)
+                if (evaluation.key_)
                     return CommandExecutor::dump(evaluation.key_);
                 break;
             case CS_KeybindFinished:
-                if (evaluation.key_ != 0)
+                if (evaluation.key_)
                     return CommandExecutor::dump(evaluation.key_);
                 break;
@@ -483,5 +499,5 @@
                     CommandExecutor::getEvaluation().shortcut_ = CommandExecutor::getExecutorOfPossibleShortcut(CommandExecutor::getToken(0));
 
-                    if ((CommandExecutor::getEvaluation().functionclass_ != 0) || (CommandExecutor::getEvaluation().shortcut_ != 0))
+                    if ((CommandExecutor::getEvaluation().functionclass_) || (CommandExecutor::getEvaluation().shortcut_))
                     {
                         // Yes, there is a class or a shortcut with the searched name
@@ -501,25 +517,25 @@
                         // There's only one possible class
                         CommandExecutor::getEvaluation().state_ = CS_Function;
-                        CommandExecutor::getEvaluation().functionclass_ = CommandExecutor::getIdentifierOfPossibleFunctionClass(**CommandExecutor::getEvaluation().listOfPossibleFunctionClasses_.begin());
-                        CommandExecutor::parse(**CommandExecutor::getEvaluation().listOfPossibleFunctionClasses_.begin() + " ", false);
+                        CommandExecutor::getEvaluation().functionclass_ = CommandExecutor::getIdentifierOfPossibleFunctionClass(*(*CommandExecutor::getEvaluation().listOfPossibleFunctionClasses_.begin()).first);
+                        CommandExecutor::parse(*(*CommandExecutor::getEvaluation().listOfPossibleFunctionClasses_.begin()).first + " ", false);
                         return;
                     }
                     else if ((CommandExecutor::getEvaluation().listOfPossibleFunctionClasses_.size() == 0) && (CommandExecutor::getEvaluation().listOfPossibleShortcuts_.size() == 1))
                     {
-                        if ((**CommandExecutor::getEvaluation().listOfPossibleShortcuts_.begin() != COMMAND_EXECUTOR_KEYWORD_SET_CONFIG_VALUE)
-                         && (**CommandExecutor::getEvaluation().listOfPossibleShortcuts_.begin() != COMMAND_EXECUTOR_KEYWORD_SET_CONFIG_VALUE_TEMPORARY)
-                         && (**CommandExecutor::getEvaluation().listOfPossibleShortcuts_.begin() != COMMAND_EXECUTOR_KEYWORD_SET_KEYBIND))
+                        if ((*(*CommandExecutor::getEvaluation().listOfPossibleShortcuts_.begin()).first != COMMAND_EXECUTOR_KEYWORD_SET_CONFIG_VALUE)
+                         && (*(*CommandExecutor::getEvaluation().listOfPossibleShortcuts_.begin()).first != COMMAND_EXECUTOR_KEYWORD_SET_CONFIG_VALUE_TEMPORARY)
+                         && (*(*CommandExecutor::getEvaluation().listOfPossibleShortcuts_.begin()).first != COMMAND_EXECUTOR_KEYWORD_SET_KEYBIND))
                         {
                             // There's only one possible shortcut
                             CommandExecutor::getEvaluation().state_ = CS_Shortcut_Params;
-                            CommandExecutor::getEvaluation().shortcut_ = CommandExecutor::getExecutorOfPossibleShortcut(**CommandExecutor::getEvaluation().listOfPossibleShortcuts_.begin());
-                        }
-                        else if ((**CommandExecutor::getEvaluation().listOfPossibleShortcuts_.begin() == COMMAND_EXECUTOR_KEYWORD_SET_CONFIG_VALUE)
-                              || (**CommandExecutor::getEvaluation().listOfPossibleShortcuts_.begin() == COMMAND_EXECUTOR_KEYWORD_SET_CONFIG_VALUE_TEMPORARY))
+                            CommandExecutor::getEvaluation().shortcut_ = CommandExecutor::getExecutorOfPossibleShortcut(*(*CommandExecutor::getEvaluation().listOfPossibleShortcuts_.begin()).first);
+                        }
+                        else if ((*(*CommandExecutor::getEvaluation().listOfPossibleShortcuts_.begin()).first == COMMAND_EXECUTOR_KEYWORD_SET_CONFIG_VALUE)
+                              || (*(*CommandExecutor::getEvaluation().listOfPossibleShortcuts_.begin()).first == COMMAND_EXECUTOR_KEYWORD_SET_CONFIG_VALUE_TEMPORARY))
                         {
                             // It's the 'set' or 'tset' keyword
                             CommandExecutor::getEvaluation().state_ = CS_ConfigValueClass;
                         }
-                        else if (**CommandExecutor::getEvaluation().listOfPossibleShortcuts_.begin() != COMMAND_EXECUTOR_KEYWORD_SET_KEYBIND)
+                        else if (*(*CommandExecutor::getEvaluation().listOfPossibleShortcuts_.begin()).first != COMMAND_EXECUTOR_KEYWORD_SET_KEYBIND)
                         {
                             // It's the 'bind' keyword
@@ -527,5 +543,5 @@
                         }
 
-                        CommandExecutor::parse(**CommandExecutor::getEvaluation().listOfPossibleShortcuts_.begin() + " ", false);
+                        CommandExecutor::parse(*(*CommandExecutor::getEvaluation().listOfPossibleShortcuts_.begin()).first + " ", false);
                         return;
                     }
@@ -560,10 +576,10 @@
                     }
 
-                    if (CommandExecutor::getEvaluation().functionclass_ == 0)
+                    if (!CommandExecutor::getEvaluation().functionclass_)
                         CommandExecutor::getEvaluation().functionclass_ = CommandExecutor::getIdentifierOfPossibleFunctionClass(CommandExecutor::getToken(0));
-                    if (CommandExecutor::getEvaluation().shortcut_ == 0)
+                    if (!CommandExecutor::getEvaluation().shortcut_)
                         CommandExecutor::getEvaluation().shortcut_ = CommandExecutor::getExecutorOfPossibleShortcut(CommandExecutor::getToken(0));
 
-                    if ((CommandExecutor::getEvaluation().functionclass_ == 0) && (CommandExecutor::getEvaluation().shortcut_ == 0))
+                    if ((!CommandExecutor::getEvaluation().functionclass_) && (!CommandExecutor::getEvaluation().shortcut_))
                     {
                         // Argument 1 seems to be wrong
@@ -573,5 +589,5 @@
                         return;
                     }
-                    else if (CommandExecutor::getEvaluation().shortcut_ != 0)
+                    else if (CommandExecutor::getEvaluation().shortcut_)
                     {
                         // Argument 1 is a shortcut: Return the needed parameter types
@@ -595,5 +611,5 @@
                 break;
             case CS_Shortcut_Params:
-                if (CommandExecutor::getEvaluation().shortcut_ != 0)
+                if (CommandExecutor::getEvaluation().shortcut_)
                 {
                     // Valid command
@@ -613,5 +629,5 @@
                 break;
             case CS_Function:
-                if (CommandExecutor::getEvaluation().functionclass_ != 0)
+                if (CommandExecutor::getEvaluation().functionclass_)
                 {
                     // We have a valid classname
@@ -621,5 +637,5 @@
                         // There is a second argument: Check if it's a valid functionname
                         CommandExecutor::getEvaluation().function_ = CommandExecutor::getExecutorOfPossibleFunction(CommandExecutor::getToken(1), CommandExecutor::getEvaluation().functionclass_);
-                        if (CommandExecutor::getEvaluation().function_ == 0)
+                        if (!CommandExecutor::getEvaluation().function_)
                         {
                             // Argument 2 seems to be wrong
@@ -644,5 +660,5 @@
                         {
                             CommandExecutor::getEvaluation().function_ = CommandExecutor::getExecutorOfPossibleFunction(CommandExecutor::getToken(1), CommandExecutor::getEvaluation().functionclass_);
-                            if (CommandExecutor::getEvaluation().function_ != 0)
+                            if (CommandExecutor::getEvaluation().function_)
                             {
                                 // There is a perfect match: Add a whitespace and continue parsing
@@ -661,6 +677,6 @@
                             // There's only one possible function
                             CommandExecutor::getEvaluation().state_ = CS_Function_Params;
-                            CommandExecutor::getEvaluation().function_ = CommandExecutor::getExecutorOfPossibleFunction(**CommandExecutor::getEvaluation().listOfPossibleFunctions_.begin(), CommandExecutor::getEvaluation().functionclass_);
-                            CommandExecutor::parse(CommandExecutor::getToken(0) + " " + **CommandExecutor::getEvaluation().listOfPossibleFunctions_.begin() + " ", false);
+                            CommandExecutor::getEvaluation().function_ = CommandExecutor::getExecutorOfPossibleFunction(*(*CommandExecutor::getEvaluation().listOfPossibleFunctions_.begin()).first, CommandExecutor::getEvaluation().functionclass_);
+                            CommandExecutor::parse(CommandExecutor::getToken(0) + " " + *(*CommandExecutor::getEvaluation().listOfPossibleFunctions_.begin()).first + " ", false);
                             return;
                         }
@@ -677,5 +693,5 @@
                 break;
             case CS_Function_Params:
-                if ((CommandExecutor::getEvaluation().functionclass_ != 0) && (CommandExecutor::getEvaluation().function_ != 0))
+                if (CommandExecutor::getEvaluation().functionclass_ && CommandExecutor::getEvaluation().function_)
                 {
                     // Valid command
@@ -703,5 +719,5 @@
                         // There is a second argument: Check if it's a valid classname
                         CommandExecutor::getEvaluation().configvalueclass_ = CommandExecutor::getIdentifierOfPossibleConfigValueClass(CommandExecutor::getToken(1));
-                        if (CommandExecutor::getEvaluation().configvalueclass_ == 0)
+                        if (!CommandExecutor::getEvaluation().configvalueclass_)
                         {
                             // Argument 2 seems to be wrong
@@ -726,5 +742,5 @@
                         {
                             CommandExecutor::getEvaluation().configvalueclass_ = CommandExecutor::getIdentifierOfPossibleConfigValueClass(CommandExecutor::getToken(1));
-                            if (CommandExecutor::getEvaluation().configvalueclass_ != 0)
+                            if (CommandExecutor::getEvaluation().configvalueclass_)
                             {
                                 // There is a perfect match: Add a whitespace and continue parsing
@@ -743,6 +759,6 @@
                             // There's only one possible classname
                             CommandExecutor::getEvaluation().state_ = CS_ConfigValue;
-                            CommandExecutor::getEvaluation().configvalueclass_ = CommandExecutor::getIdentifierOfPossibleConfigValueClass(**CommandExecutor::getEvaluation().listOfPossibleConfigValueClasses_.begin());
-                            CommandExecutor::parse(CommandExecutor::getToken(0) + " " + **CommandExecutor::getEvaluation().listOfPossibleConfigValueClasses_.begin() + " ", false);
+                            CommandExecutor::getEvaluation().configvalueclass_ = CommandExecutor::getIdentifierOfPossibleConfigValueClass(*(*CommandExecutor::getEvaluation().listOfPossibleConfigValueClasses_.begin()).first);
+                            CommandExecutor::parse(CommandExecutor::getToken(0) + " " + *(*CommandExecutor::getEvaluation().listOfPossibleConfigValueClasses_.begin()).first + " ", false);
                             return;
                         }
@@ -760,5 +776,5 @@
                 break;
             case CS_ConfigValue:
-                if (((CommandExecutor::getToken(0) == COMMAND_EXECUTOR_KEYWORD_SET_CONFIG_VALUE) || (CommandExecutor::getToken(0) == COMMAND_EXECUTOR_KEYWORD_SET_CONFIG_VALUE_TEMPORARY)) && (CommandExecutor::getEvaluation().configvalueclass_ != 0))
+                if (((CommandExecutor::getToken(0) == COMMAND_EXECUTOR_KEYWORD_SET_CONFIG_VALUE) || (CommandExecutor::getToken(0) == COMMAND_EXECUTOR_KEYWORD_SET_CONFIG_VALUE_TEMPORARY)) && (CommandExecutor::getEvaluation().configvalueclass_))
                 {
                     // Check if there is a third argument
@@ -767,5 +783,5 @@
                         // There is a third argument: Check if it's a valid config value
                         CommandExecutor::getEvaluation().configvalue_ = CommandExecutor::getContainerOfPossibleConfigValue(CommandExecutor::getToken(2), CommandExecutor::getEvaluation().configvalueclass_);
-                        if (CommandExecutor::getEvaluation().configvalue_ == 0)
+                        if (!CommandExecutor::getEvaluation().configvalue_)
                         {
                             // Argument 3 seems to be wrong
@@ -790,5 +806,5 @@
                         {
                             CommandExecutor::getEvaluation().configvalue_ = CommandExecutor::getContainerOfPossibleConfigValue(CommandExecutor::getToken(2), CommandExecutor::getEvaluation().configvalueclass_);
-                            if (CommandExecutor::getEvaluation().configvalue_ != 0)
+                            if (CommandExecutor::getEvaluation().configvalue_)
                             {
                                 // There is a perfect match: Add a whitespace and continue parsing
@@ -807,6 +823,6 @@
                             // There's only one possible config value
                             CommandExecutor::getEvaluation().state_ = CS_ConfigValueType;
-                            CommandExecutor::getEvaluation().configvalue_ = CommandExecutor::getContainerOfPossibleConfigValue(**CommandExecutor::getEvaluation().listOfPossibleConfigValues_.begin(), CommandExecutor::getEvaluation().configvalueclass_);
-                            CommandExecutor::parse(CommandExecutor::getToken(0) + " " + CommandExecutor::getToken(1) + " " + **CommandExecutor::getEvaluation().listOfPossibleConfigValues_.begin() + " ", false);
+                            CommandExecutor::getEvaluation().configvalue_ = CommandExecutor::getContainerOfPossibleConfigValue(*(*CommandExecutor::getEvaluation().listOfPossibleConfigValues_.begin()).first, CommandExecutor::getEvaluation().configvalueclass_);
+                            CommandExecutor::parse(CommandExecutor::getToken(0) + " " + CommandExecutor::getToken(1) + " " + *(*CommandExecutor::getEvaluation().listOfPossibleConfigValues_.begin()).first + " ", false);
                             return;
                         }
@@ -824,9 +840,9 @@
                 break;
             case CS_ConfigValueType:
-                if (((CommandExecutor::getToken(0) == COMMAND_EXECUTOR_KEYWORD_SET_CONFIG_VALUE) || (CommandExecutor::getToken(0) == COMMAND_EXECUTOR_KEYWORD_SET_CONFIG_VALUE_TEMPORARY)) && (CommandExecutor::getEvaluation().configvalueclass_ != 0) && (CommandExecutor::getEvaluation().configvalue_ != 0))
+                if (((CommandExecutor::getToken(0) == COMMAND_EXECUTOR_KEYWORD_SET_CONFIG_VALUE) || (CommandExecutor::getToken(0) == COMMAND_EXECUTOR_KEYWORD_SET_CONFIG_VALUE_TEMPORARY)) && CommandExecutor::getEvaluation().configvalueclass_ && CommandExecutor::getEvaluation().configvalue_)
                 {
                     // Valid command
                     // Check if there are enough parameters
-                    if (CommandExecutor::getEvaluation().tokens_.size() >= 4)
+                    if ((CommandExecutor::getEvaluation().tokens_.size() >= 4) && (CommandExecutor::getEvaluation().tokens_[3] != COMMAND_EXECUTOR_CURSOR))
                     {
                         CommandExecutor::getEvaluation().state_ = CS_ConfigValueFinished;
@@ -942,4 +958,5 @@
     {
         unsigned int neededParams = head + executor->getParamCount();
+        /*
         for (unsigned int i = executor->getParamCount() - 1; i >= 0; i--)
         {
@@ -949,5 +966,6 @@
                 break;
         }
-        return (CommandExecutor::getEvaluation().tokens_.size() >= neededParams);
+        */
+        return ((CommandExecutor::getEvaluation().tokens_.size() >= neededParams) && (CommandExecutor::getEvaluation().tokens_[neededParams - 1] != COMMAND_EXECUTOR_CURSOR));
     }
 
@@ -960,5 +978,5 @@
                 if ((*it).first.find(getLowercase(fragment)) == 0 || fragment == "")
                 {
-                    CommandExecutor::getEvaluation().listOfPossibleFunctionClasses_.push_back(&(*it).first);
+                    CommandExecutor::getEvaluation().listOfPossibleFunctionClasses_.push_back(std::pair<const std::string*, const std::string*>(&(*it).first, &(*it).second->getName()));
                 }
             }
@@ -974,5 +992,5 @@
             if ((*it).first.find(getLowercase(fragment)) == 0 || fragment == "")
             {
-                CommandExecutor::getEvaluation().listOfPossibleShortcuts_.push_back(&(*it).first);
+                CommandExecutor::getEvaluation().listOfPossibleShortcuts_.push_back(std::pair<const std::string*, const std::string*>(&(*it).first, &(*it).second->getName()));
             }
         }
@@ -987,5 +1005,5 @@
             if ((*it).first.find(getLowercase(fragment)) == 0 || fragment == "")
             {
-                CommandExecutor::getEvaluation().listOfPossibleFunctions_.push_back(&(*it).first);
+                CommandExecutor::getEvaluation().listOfPossibleFunctions_.push_back(std::pair<const std::string*, const std::string*>(&(*it).first, &(*it).second->getName()));
             }
         }
@@ -1002,5 +1020,5 @@
                 if ((*it).first.find(getLowercase(fragment)) == 0 || fragment == "")
                 {
-                    CommandExecutor::getEvaluation().listOfPossibleConfigValueClasses_.push_back(&(*it).first);
+                    CommandExecutor::getEvaluation().listOfPossibleConfigValueClasses_.push_back(std::pair<const std::string*, const std::string*>(&(*it).first, &(*it).second->getName()));
                 }
             }
@@ -1016,5 +1034,5 @@
             if ((*it).first.find(getLowercase(fragment)) == 0 || fragment == "")
             {
-                CommandExecutor::getEvaluation().listOfPossibleConfigValues_.push_back(&(*it).first);
+                CommandExecutor::getEvaluation().listOfPossibleConfigValues_.push_back(std::pair<const std::string*, const std::string*>(&(*it).first, &(*it).second->getName()));
             }
         }
@@ -1030,7 +1048,7 @@
     }
 
-    bool CommandExecutor::compareStringsInList(const std::string* first, const std::string* second)
-    {
-        return ((*first) < (*second));
+    bool CommandExecutor::compareStringsInList(const std::pair<const std::string*, const std::string*>& first, const std::pair<const std::string*, const std::string*>& second)
+    {
+        return ((*first.first) < (*second.first));
     }
 
@@ -1089,13 +1107,13 @@
     }
 
-    std::string CommandExecutor::dump(const std::list<const std::string*>& list)
+    std::string CommandExecutor::dump(const std::list<std::pair<const std::string*, const std::string*> >& list)
     {
         std::string output = "";
-        for (std::list<const std::string*>::const_iterator it = list.begin(); it != list.end(); ++it)
+        for (std::list<std::pair<const std::string*, const std::string*> >::const_iterator it = list.begin(); it != list.end(); ++it)
         {
             if (it != list.begin())
                 output += " ";
 
-            output += (**it);
+            output += *(*it).second;
         }
         return output;
@@ -1131,5 +1149,5 @@
     }
 
-    std::string CommandExecutor::getCommonBegin(const std::list<const std::string*>& list)
+    std::string CommandExecutor::getCommonBegin(const std::list<std::pair<const std::string*, const std::string*> >& list)
     {
         if (list.size() == 0)
@@ -1139,5 +1157,5 @@
         else if (list.size() == 1)
         {
-            return ((**list.begin()) + " ");
+            return ((*(*list.begin()).first) + " ");
         }
         else
@@ -1147,15 +1165,15 @@
             {
                 char temp = 0;
-                for (std::list<const std::string*>::const_iterator it = list.begin(); it != list.end(); ++it)
-                {
-                    if ((**it).size() > i)
+                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)[i];
+                            temp = (*(*it).first)[i];
                         }
                         else
                         {
-                            if (temp != (**it)[i])
+                            if (temp != (*(*it).first)[i])
                                 return output;
                         }
Index: /code/branches/core2/src/orxonox/core/CommandExecutor.h
===================================================================
--- /code/branches/core2/src/orxonox/core/CommandExecutor.h	(revision 971)
+++ /code/branches/core2/src/orxonox/core/CommandExecutor.h	(revision 972)
@@ -37,5 +37,5 @@
 #include "CorePrereqs.h"
 
-#define COMMAND_EXECUTOR_CURSOR '$'
+#define COMMAND_EXECUTOR_CURSOR "$"
 
 namespace orxonox
@@ -91,10 +91,10 @@
             std::string additionalParameter_;
 
-            std::list<const std::string*> listOfPossibleFunctionClasses_;
-            std::list<const std::string*> listOfPossibleShortcuts_;
-            std::list<const std::string*> listOfPossibleFunctions_;
-            std::list<const std::string*> listOfPossibleConfigValueClasses_;
-            std::list<const std::string*> listOfPossibleConfigValues_;
-            std::list<const std::string*> listOfPossibleKeys_;
+            std::list<std::pair<const std::string*, const std::string*> > listOfPossibleFunctionClasses_;
+            std::list<std::pair<const std::string*, const std::string*> > listOfPossibleShortcuts_;
+            std::list<std::pair<const std::string*, const std::string*> > listOfPossibleFunctions_;
+            std::list<std::pair<const std::string*, const std::string*> > listOfPossibleConfigValueClasses_;
+            std::list<std::pair<const std::string*, const std::string*> > listOfPossibleConfigValues_;
+            std::list<std::pair<const std::string*, const std::string*> > listOfPossibleKeys_;
 
             Identifier* functionclass_;
@@ -173,11 +173,11 @@
             static void createListOfPossibleKeys(const std::string& fragment);
 
-            static bool compareStringsInList(const std::string* first, const std::string* second);
+            static bool compareStringsInList(const std::pair<const std::string*, const std::string*>& first, const std::pair<const std::string*, const std::string*>& second);
 
-            static std::string dump(const std::list<const std::string*>& list);
+            static std::string dump(const std::list<std::pair<const std::string*, const std::string*> >& list);
             static std::string dump(const ExecutorStatic* executor);
             static std::string dump(const ConfigValueContainer* container);
 
-            static std::string getCommonBegin(const std::list<const std::string*>& list);
+            static std::string getCommonBegin(const std::list<std::pair<const std::string*, const std::string*> >& list);
 
             static Identifier* getIdentifierOfPossibleFunctionClass(const std::string& name);
Index: /code/branches/core2/src/orxonox/core/ConfigValueContainer.h
===================================================================
--- /code/branches/core2/src/orxonox/core/ConfigValueContainer.h	(revision 971)
+++ /code/branches/core2/src/orxonox/core/ConfigValueContainer.h	(revision 972)
@@ -79,4 +79,7 @@
                 { this->value_.getValue(value); return *this; }
 
+            inline const std::string& getName()
+                { return this->varname_; }
+
             void description(const std::string& description);
             const std::string& getDescription() const;
Index: /code/branches/core2/src/orxonox/core/InputBuffer.cc
===================================================================
--- /code/branches/core2/src/orxonox/core/InputBuffer.cc	(revision 971)
+++ /code/branches/core2/src/orxonox/core/InputBuffer.cc	(revision 972)
@@ -57,7 +57,6 @@
     void InputBuffer::set(const std::string& input)
     {
-        this->clear();
+        this->buffer_ = "";
         this->append(input);
-        this->updated();
     }
 
