Index: /branches/preferences/src/defs/globals.h
===================================================================
--- /branches/preferences/src/defs/globals.h	(revision 7253)
+++ /branches/preferences/src/defs/globals.h	(revision 7254)
@@ -27,4 +27,6 @@
 #define   DEFAULT_DATA_DIR                 DATADIR "/orxonox/"
 #define   DEFAULT_DATA_DIR_CHECKFILE       "data.oxd"
+
+#define   DEFAULT_ORXONOX_PORT             9999
 
 // Defines all the Sections of the Config (in Gui and orxonox)
Index: /branches/preferences/src/lib/parser/preferences/cmd_line_prefs_reader.cc
===================================================================
--- /branches/preferences/src/lib/parser/preferences/cmd_line_prefs_reader.cc	(revision 7253)
+++ /branches/preferences/src/lib/parser/preferences/cmd_line_prefs_reader.cc	(revision 7254)
@@ -71,18 +71,15 @@
       cbd->parser->showHelp();
       return true;
-    case ID_LICENSE:
-      PRINT(0)(ORXONOX_LICENSE_SHORT);
-      return true;
   }
   
-  if ( entry.id >= ID_LAST && entry.id - ID_LAST < regArgs.size() )
+  if ( entry.id >= ID_PREFS && entry.id - ID_PREFS < regArgs.size() )
   {
-    if ( regArgs[entry.id - ID_LAST].value == "%arg%" )
+    if ( regArgs[entry.id - ID_PREFS].value == "%arg%" )
     {
       assert( argArgs.size() == 1 );
       
       cbd->iniEntries.push_back( IniEntry() );
-      cbd->iniEntries.back().section = regArgs[entry.id - ID_LAST].section;
-      cbd->iniEntries.back().key = regArgs[entry.id - ID_LAST].key;
+      cbd->iniEntries.back().section = regArgs[entry.id - ID_PREFS].section;
+      cbd->iniEntries.back().key = regArgs[entry.id - ID_PREFS].key;
       cbd->iniEntries.back().value = argArgs[0].getString();
     }
@@ -90,7 +87,7 @@
     {
       cbd->iniEntries.push_back( IniEntry() );
-      cbd->iniEntries.back().section = regArgs[entry.id - ID_LAST].section;
-      cbd->iniEntries.back().key = regArgs[entry.id - ID_LAST].key;
-      cbd->iniEntries.back().value = regArgs[entry.id - ID_LAST].value;
+      cbd->iniEntries.back().section = regArgs[entry.id - ID_PREFS].section;
+      cbd->iniEntries.back().key = regArgs[entry.id - ID_PREFS].key;
+      cbd->iniEntries.back().value = regArgs[entry.id - ID_PREFS].value;
     }
   }
@@ -109,5 +106,4 @@
   
   parser.add( ID_HELP, "help", 'h', 0, "", "Shows this help");
-  parser.add( ID_LICENSE, "license", 'l', 0, "", "Prints the licence and exit");
   
   for ( int i = 0; i<regArgs.size(); i++ )
@@ -115,9 +111,9 @@
     if ( regArgs[i].value == "%arg%" )
     {
-      parser.add( ID_LAST + i, regArgs[i].longOption, regArgs[i].shortOption, 1, regArgs[i].argName, regArgs[i].help );
+      parser.add( ID_PREFS + i, regArgs[i].longOption, regArgs[i].shortOption, 1, regArgs[i].argName, regArgs[i].help );
     }
     else
     {
-      parser.add( ID_LAST + i, regArgs[i].longOption, regArgs[i].shortOption, 0, "", regArgs[i].help );
+      parser.add( ID_PREFS + i, regArgs[i].longOption, regArgs[i].shortOption, 0, "", regArgs[i].help );
     }
   }
Index: /branches/preferences/src/lib/parser/preferences/cmd_line_prefs_reader.h
===================================================================
--- /branches/preferences/src/lib/parser/preferences/cmd_line_prefs_reader.h	(revision 7253)
+++ /branches/preferences/src/lib/parser/preferences/cmd_line_prefs_reader.h	(revision 7254)
@@ -9,5 +9,4 @@
 #include "stdincl.h"
 #include "debug.h"
-#include "globals.h"
 
 #include "src/lib/parser/cmdline_parser/cmdline_parser.h"
@@ -43,6 +42,5 @@
   ID_SET_INI = 1,
   ID_HELP,
-  ID_LICENSE,
-  ID_LAST
+  ID_PREFS
 };
 
Index: /branches/preferences/src/orxonox.cc
===================================================================
--- /branches/preferences/src/orxonox.cc	(revision 7253)
+++ /branches/preferences/src/orxonox.cc	(revision 7254)
@@ -68,6 +68,10 @@
 SHELL_COMMAND(restart, Orxonox, restart);
 
-REGISTER_ARG_FLAG( s, server, "game", "isServer", "Start Orxonox as Game Server", "1" );
-REGISTER_ARG_ARG( p, port, "game", "port", "Port to use", "port" );
+REGISTER_ARG_FLAG( l, license, "misc", "showLicenseAndExit", "Prints the licence and exit",    "1" );
+REGISTER_ARG_FLAG( c, client,  "game", "gameType",           "Connect to Server (-H)",         "multiplayer_client" );
+REGISTER_ARG_FLAG( s, server,  "game", "gameType",           "Start Orxonox as Game Server",   "multiplayer_server" );
+REGISTER_ARG_ARG(  H, host,    "game", "host",               "Host to connect to",             "host");
+REGISTER_ARG_ARG(  p, port,    "game", "port",               "Port to use",                    "port" );
+REGISTER_ARG_FLAG( g, gui,     "game", "showGui",            "starts the orxonox with the configuration GUI", "1");
 
 /**
@@ -408,50 +412,19 @@
   prefs.parse(argc, argv);
   
-  int i;
-  for(i = 1; i < argc; ++i)
-  {
-    if(     !strcmp( "--help", argv[i])     || !strcmp("-h", argv[i]))
-      return showHelp(argc, argv);
-    else if(!strcmp( "--gui", argv[i])      || !strcmp("-g", argv[i]))
-      showGui = true;
-    else if(!strcmp( "--client", argv[i])   || !strcmp("-c", argv[i]))
-      return startNetworkOrxonox(argc, argv);
-    else if(!strcmp( "--server", argv[i])   || !strcmp("-s", argv[i]))
-      return startNetworkOrxonox(argc, argv);
-    else if(!strcmp( "--license", argv[i])  || !strcmp("-l", argv[i]))
-      return PRINT(0)(ORXONOX_LICENSE_SHORT);
-  }
-
+  if ( Preferences::getInstance()->getString("misc", "showLicenseAndExit", "") == "1" )
+  {
+    PRINT(0)(ORXONOX_LICENSE_SHORT);
+    return 0;
+  }
+  
+  if( Preferences::getInstance()->getString("game", "showGui", "") == "1" )
+    showGui = true;
+  else if( Preferences::getInstance()->getString( "game", "gameType", "" ) == "multiplayer_server" ||
+           Preferences::getInstance()->getString( "game", "gameType", "" ) == "multiplayer_client" )
+    return startNetworkOrxonox(argc, argv);
+  
   return startOrxonox(argc, argv, NULL, -1);
   return 0;
 }
-
-
-
-int showHelp(int argc, char** argv)
-{
-  PRINT(0)("Orxonox Version %s\n", PACKAGE_VERSION);
-  PRINT(0)(" Starts Orxonox - The most furious 3D Action Game :)\n");
-  PRINT(0)("\n");
-  PRINT(0)("Common options:\n");
-  PRINT(0)(" -g, --gui                        starts the orxonox with the configuration GUI \n");
-  PRINT(0)(" -h, --help                       shows this help\n");
-  PRINT(0)("\n");
-  PRINT(0)("Network options:\n");
-  PRINT(0)(" -s, --server [port]              starts Orxonox and listens on the [port] for players\n");
-  PRINT(0)(" -c, --client [hostname] [port]   starts Orxonox as a Client\n");
-  PRINT(0)(" -c, --client [ip address] [port] starts Orxonox as a Client\n");
-  PRINT(0)("\n");
-  PRINT(0)("Other options:\n");
-  PRINT(0)("     --license     prints the licence and exit\n\n");
-  PRINT(0)("\n");
-
-  //   {
-  //     Gui* gui = new Gui(argc, argv);
-  //     gui->printHelp();
-  //     delete gui;
-  //   }
-}
-
 
 
@@ -465,37 +438,28 @@
 {
 
-  int i;
-  for(i = 0; i < argc; ++i )
-  {
-    if( !strcmp( "--client", argv[i]) || !strcmp("-c", argv[i]))
+  std::string gameType = Preferences::getInstance()->getString( "game", "gameType", "" );
+  
+  if ( gameType == "multiplayer_client" )
+  {
+    int port = Preferences::getInstance()->getInt( "game", "port", DEFAULT_ORXONOX_PORT );
+    std::string host = Preferences::getInstance()->getString( "game", "host", "" );
+    
+    if ( host == "" )
     {
-      if( argc <= (i+2))
-      {
-        printf(" Wrong arguments try following notations:\n");
-        printf("   --client [server ip address] [port number]\n");
-        printf("   --client [dns name] [port number]\n");
-        return 0;
-      }
-
-      const char* name = argv[i+1];
-      int port = atoi(argv[i+2]);
-      printf("Starting Orxonox as client: connecting to %s, on port %i\n", name, port);
-
-      startOrxonox(argc, argv, name, port);
+      printf("You need to specify a host to connect to ( -H <host> )\n");
+      return 1;
     }
-    else if( !strcmp( "--server", argv[i]) || !strcmp("-s", argv[i]))
-    {
-      if( argc <= (i+1))
-      {
-        printf(" Wrong arguments try following notations:\n");
-        printf("   --server [port number]\n");
-        return 0;
-      }
-
-      int port = atoi(argv[i+1]);
-      printf("Starting Orxonox as server, listening on port %i\n", port);
-
-      startOrxonox(argc, argv, NULL, port);
-    }
+    
+    printf("Starting Orxonox as client: connecting to %s, on port %i\n", host.c_str(), port);
+    
+    startOrxonox(argc, argv, host.c_str(), port);
+  }
+  else if ( gameType == "multiplayer_server" )
+  {
+    int port = Preferences::getInstance()->getInt( "game", "port", DEFAULT_ORXONOX_PORT );
+    
+    printf("Starting Orxonox as server: listening on port %i\n", port);
+    
+    startOrxonox(argc, argv, NULL, port);
   }
 }
Index: /branches/preferences/src/orxonox.h
===================================================================
--- /branches/preferences/src/orxonox.h	(revision 7253)
+++ /branches/preferences/src/orxonox.h	(revision 7254)
@@ -57,6 +57,5 @@
 // Start-up functions //
 ////////////////////////
-int showHelp(int argc, char** argv);
-int showLicense();
+
 int startNetworkOrxonox(int argc, char** argv);
 int startOrxonox(int argc, char** argv, const char* clientName, int port);
