Index: /trunk/src/lib/shell/shell_command.cc
===================================================================
--- /trunk/src/lib/shell/shell_command.cc	(revision 7397)
+++ /trunk/src/lib/shell/shell_command.cc	(revision 7398)
@@ -41,12 +41,15 @@
     PRINTF(5)("create shellcommand %s %s\n", commandName, className);
     this->setName(commandName);
+
+    // copy the executor:
     this->executor = executor.clone();
     this->executor->setName(commandName);
+
     this->alias = NULL;
 
     //  this->classID = classID;
     this->shellClass = ShellCommandClass::getCommandClass(className);
-    if (this->shellClass != NULL)
-      this->shellClass->commandList.push_back(this);
+    assert (this->shellClass != NULL);
+    this->shellClass->commandList.push_back(this);
   }
 
@@ -62,5 +65,5 @@
 
   /**
-   * registers a new ShellCommand
+   * @brief registers a new ShellCommand
    */
   ShellCommand* ShellCommand::registerCommand(const std::string& commandName, const std::string& className, const Executor& executor)
@@ -74,5 +77,5 @@
 
   /**
-   * unregister an existing commandName
+   * @brief unregister an existing commandName
    * @param className the name of the Class the command belongs to.
    * @param commandName the name of the command itself
Index: /trunk/src/lib/shell/shell_command.h
===================================================================
--- /trunk/src/lib/shell/shell_command.h	(revision 7397)
+++ /trunk/src/lib/shell/shell_command.h	(revision 7398)
@@ -23,5 +23,5 @@
 
   /**
-   * an easy to use Macro to create a Command
+   * @brief an easy to use Macro to create a Command
    * @param command the name of the command (without "" around the string)
    * @param class the name of the class to apply this command to (without the "" around the string)
@@ -41,5 +41,5 @@
 
   /**
-   * an easy to use Macro to create a Command
+   * @brief an easy to use Macro to create a Command
    * @param command the name of the command (without "" around the string)
    * @param class the name of the class to apply this command to (without the "" around the string)
Index: /trunk/src/lib/util/substring.cc
===================================================================
--- /trunk/src/lib/util/substring.cc	(revision 7397)
+++ /trunk/src/lib/util/substring.cc	(revision 7398)
@@ -36,6 +36,5 @@
  */
 SubString::SubString()
-{
-}
+{}
 
 
@@ -122,7 +121,33 @@
  * @returns true if the Stored Strings match
  */
-bool SubString::operator==(const SubString& subString)
+bool SubString::operator==(const SubString& subString) const
 {
   return (this->strings == subString.strings);
+}
+
+/**
+ * @brief comparator.
+ * @param subString the SubString to compare against this one.
+ * @returns true if the Stored Strings match
+ */
+bool SubString::compare(const SubString& subString) const
+{
+  return (*this == subString);
+}
+
+/**
+ * @brief comparator.
+ * @param subString the SubString to compare against this one.
+ * @returns true if the Stored Strings match
+ */
+bool SubString::compare(const SubString& subString, unsigned int length) const
+{
+  if (length > this->size() || length > subString.size())
+    return false;
+
+  for (unsigned int i = 0; i < length; i++)
+    if (this->strings[i] != subString.strings[i])
+      return false;
+  return true;
 }
 
@@ -272,5 +297,5 @@
     switch(state)
     {
-      case SL_NORMAL:
+        case SL_NORMAL:
         if(line[i] == escape_char)
         {
@@ -307,5 +332,5 @@
         }
         break;
-      case SL_ESCAPE:
+        case SL_ESCAPE:
         if(line[i] == 'n') token += '\n';
         else if(line[i] == 't') token += '\t';
@@ -319,5 +344,5 @@
         state = SL_NORMAL;
         break;
-      case SL_SAFEMODE:
+        case SL_SAFEMODE:
         if(line[i] == safemode_char)
         {
@@ -333,5 +358,5 @@
         }
         break;
-      case SL_SAFEESCAPE:
+        case SL_SAFEESCAPE:
         if(line[i] == 'n') token += '\n';
         else if(line[i] == 't') token += '\t';
@@ -345,5 +370,5 @@
         state = SL_SAFEMODE;
         break;
-      case SL_COMMENT:
+        case SL_COMMENT:
         if(line[i] == '\n')
         {
@@ -361,5 +386,5 @@
         }
         break;
-      default:
+        default:
         // nothing
         break;
Index: /trunk/src/lib/util/substring.h
===================================================================
--- /trunk/src/lib/util/substring.h	(revision 7397)
+++ /trunk/src/lib/util/substring.h	(revision 7398)
@@ -37,5 +37,7 @@
   // operate on the SubString
   SubString& operator=(const SubString& subString);
-  bool operator==(const SubString& subString);
+  bool operator==(const SubString& subString) const;
+  bool compare(const SubString& subString) const;
+  bool compare(const SubString& subString, unsigned int length) const;
   SubString operator+(const SubString& subString) const;
   SubString& operator+=(const SubString& subString);
