Index: code/branches/presentation/src/orxonox/Main.cc
===================================================================
--- code/branches/presentation/src/orxonox/Main.cc	(revision 7736)
+++ code/branches/presentation/src/orxonox/Main.cc	(revision 7739)
@@ -54,4 +54,7 @@
     SetCommandLineSwitch(dedicatedClient).information("Start in dedicated client mode");
 
+    /* ADD masterserver command */
+    SetCommandLineSwitch(masterserver).information("Start in masterserver mode");
+
     SetCommandLineArgument(generateDoc, "")
         .information("Generates a Doxygen file from things like SetConsoleCommand");
@@ -67,4 +70,5 @@
         if (CommandLineParser::getValue("generateDoc").getString().empty())
         {
+            /* TODO make this clear */
             game->setStateHierarchy(
             "root"
@@ -90,4 +94,7 @@
             else if (CommandLineParser::getValue("dedicatedClient").getBool())
                 Game::getInstance().requestStates("client, level");
+            /* ADD masterserver command */
+            else if (CommandLineParser::getValue("masterserver").getBool())
+                Game::getInstance().requestStates("masterserver");
             else
             {
Index: code/branches/presentation/src/orxonox/gamestates/CMakeLists.txt
===================================================================
--- code/branches/presentation/src/orxonox/gamestates/CMakeLists.txt	(revision 7736)
+++ code/branches/presentation/src/orxonox/gamestates/CMakeLists.txt	(revision 7739)
@@ -6,4 +6,5 @@
   GSRoot.cc
   GSServer.cc
+  GSMasterServer.cc
   GSStandalone.cc
 )
Index: code/branches/presentation/src/orxonox/gamestates/GSMasterServer.cc
===================================================================
--- code/branches/presentation/src/orxonox/gamestates/GSMasterServer.cc	(revision 7739)
+++ code/branches/presentation/src/orxonox/gamestates/GSMasterServer.cc	(revision 7739)
@@ -0,0 +1,66 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Sandro 'smerkli' Merkli 
+ *   Co-authors:
+ *      Reto Grieder (original file for GSServer.cc)
+ *      Fabian 'x3n' Landau (original file for GSServer.cc)
+ *
+ */
+
+#include "GSMasterServer.h"
+
+#include "util/Debug.h"
+#include "core/Game.h"
+#include "core/GameMode.h"
+
+namespace orxonox
+{
+  DeclareGameState(GSMasterServer, "masterserver", false, false);
+
+  GSMasterServer::GSMasterServer(const GameStateInfo& info)
+    : GameState(info)
+  {
+
+  }
+
+  GSMasterServer::~GSMasterServer()
+  {
+  }
+
+  void GSMasterServer::activate()
+  {
+    /* TODO make this work for masterserver as well */
+    //GameMode::setIsServer(true);
+
+    this->mserver = new MasterServer();
+    COUT(0) << "Loading masterserver mode" << std::endl;
+
+    this->mserver->run();
+  }
+
+  void GSMasterServer::deactivate()
+  { /* nothing so far */ }
+
+  void GSMasterServer::update(const Clock& time)
+  { /* nothing so far */ }
+}
Index: code/branches/presentation/src/orxonox/gamestates/GSMasterServer.h
===================================================================
--- code/branches/presentation/src/orxonox/gamestates/GSMasterServer.h	(revision 7739)
+++ code/branches/presentation/src/orxonox/gamestates/GSMasterServer.h	(revision 7739)
@@ -0,0 +1,58 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Sandro 'smerkli' Merkli 
+ *   Co-authors:
+ *      Reto Grieder (Original GSServer.h file this was adapted from)
+ *      ...
+ *
+ */
+
+#ifndef _GSMasterServer_H__
+#define _GSMasterServer_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include "core/GameState.h"
+#include "network/NetworkPrereqs.h"
+#include "network/MasterServer.h"
+
+namespace orxonox
+{
+  class _OrxonoxExport GSMasterServer : public GameState
+  {
+    public:
+      GSMasterServer(const GameStateInfo& info);
+      ~GSMasterServer();
+
+      void activate();
+      void deactivate();
+      void update(const Clock& time);
+
+    private:
+      MasterServer *mserver;
+
+
+  };
+}
+
+#endif /* _GSServer_H__ */
