Index: code/trunk/bin/def_keybindings.ini
===================================================================
--- code/trunk/bin/def_keybindings.ini	(revision 1502)
+++ code/trunk/bin/def_keybindings.ini	(revision 1502)
@@ -0,0 +1,264 @@
+[KeyBinder]
+KeyUNASSIGNED=openConsole
+KeyESCAPE=exit
+Key1=
+Key2=
+Key3=
+Key4=
+Key5=
+Key6=
+Key7=
+Key8=
+Key9=
+Key0=
+KeyMINUS=
+KeyEQUALS=openConsole
+KeyBACK=
+KeyTAB=cycleNavigationFocus
+KeyQ=moveRoll
+KeyW=moveLongitudinal
+KeyE=scale -1 moveRoll
+KeyR=
+KeyT=
+KeyY=
+KeyU=
+KeyI=
+KeyO=
+KeyP=
+KeyLBRACKET=
+KeyRBRACKET=
+KeyRETURN=
+KeyLCONTROL=
+KeyA=scale -1 moveLateral
+KeyS=scale -1 moveLongitudinal
+KeyD=moveLateral
+KeyF=
+KeyG=
+KeyH=scale -0.3 moveYaw
+KeyJ=scale -0.3 movePitch
+KeyK=scale  0.3 movePitch
+KeyL=scale  0.3 moveYaw
+KeySEMICOLON=
+KeyAPOSTROPHE=
+KeyGRAVE=openConsole
+KeyLSHIFT=
+KeyBACKSLASH=
+KeyZ=
+KeyX=
+KeyC=
+KeyV=
+KeyB=
+KeyN=
+KeyM=
+KeyCOMMA=
+KeyPERIOD=
+KeySLASH=
+KeyRSHIFT=
+KeyMULTIPLY=
+KeyLMENU=
+KeySPACE=
+KeyCAPITAL=
+KeyF1=toggleFPS
+KeyF2=toggleRenderTime
+KeyF3=
+KeyF4=
+KeyF5=
+KeyF6=
+KeyF7=
+KeyF8=
+KeyF9=
+KeyF10=
+KeyNUMLOCK=
+KeySCROLL=
+KeyNUMPAD7=
+KeyNUMPAD8=
+KeyNUMPAD9=
+KeySUBTRACT=
+KeyNUMPAD4=
+KeyNUMPAD5=
+KeyNUMPAD6=
+KeyADD=
+KeyNUMPAD1=
+KeyNUMPAD2=
+KeyNUMPAD3=
+KeyNUMPAD0=
+KeyDECIMAL=
+Key=
+KeyOEM_102=
+KeyF11=
+KeyF12=
+KeyF13=
+KeyF14=
+KeyF15=
+KeyKANA=
+KeyABNT_C1=
+KeyCONVERT=
+KeyNOCONVERT=
+KeyYEN=
+KeyABNT_C2=
+KeyNUMPADEQUALS=
+KeyPREVTRACK=
+KeyAT=
+KeyCOLON=
+KeyUNDERLINE=
+KeyKANJI=
+KeySTOP=
+KeyAX=
+KeyUNLABELED=
+KeyNEXTTRACK=
+KeyNUMPADENTER=openConsole
+KeyRCONTROL=
+KeyMUTE=
+KeyCALCULATOR=
+KeyPLAYPAUSE=
+KeyMEDIASTOP=
+KeyVOLUMEDOWN=
+KeyVOLUMEUP=
+KeyWEBHOME=
+KeyNUMPADCOMMA=
+KeyDIVIDE=
+KeySYSRQ=
+KeyRMENU=
+KeyPAUSE=
+KeyHOME=
+KeyUP=
+KeyPGUP=
+KeyLEFT=
+KeyRIGHT=
+KeyEND=
+KeyDOWN=
+KeyPGDOWN=
+KeyINSERT=
+KeyDELETE=
+KeyLWIN=
+KeyRWIN=
+KeyAPPS=
+KeyPOWER=
+KeySLEEP=
+KeyWAKE=
+KeyWEBSEARCH=
+KeyWEBFAVORITES=
+KeyWEBREFRESH=
+KeyWEBSTOP=exit
+KeyWEBFORWARD=
+KeyWEBBACK=
+KeyMYCOMPUTER=
+KeyMAIL=
+KeyMEDIASELECT=
+MouseLeft=fire
+MouseRight=
+MouseMiddle=
+MouseButton3=
+MouseButton4=
+MouseButton5=
+MouseButton6=
+MouseButton7=
+MouseWheel1Up=
+MouseWheel1Down=
+MouseWheel2Up=
+MouseWheel2Down=
+MouseXPos=scale  1 moveYaw
+MouseXNeg=scale -1 moveYaw
+MouseYPos=scale  1 movePitch
+MouseYNeg=scale -1 movePitch
+Empty1Pos=
+Empty1Neg=
+Empty2Pos=
+Empty2Neg=
+JoyAxis1Pos=scale -1 movePitch
+JoyAxis1Neg=scale  1 movePitch
+JoyAxis2Pos=
+JoyAxis2Neg=
+JoyAxis3Pos=
+JoyAxis3Neg=
+JoyAxis4Pos=
+JoyAxis4Neg=
+JoyAxis5Pos=
+JoyAxis5Neg=
+JoyAxis6Pos=
+JoyAxis6Neg=
+JoyAxis7Pos=
+JoyAxis7Neg=
+JoyAxis8Pos=
+JoyAxis8Neg=
+JoyAxis9Pos=scale   1 moveYaw
+JoyAxis9Neg=scale  -1 moveYaw
+JoyAxis10Pos=
+JoyAxis10Neg=
+JoyAxis11Pos=scale -1 moveLongitudinal
+JoyAxis11Neg=scale  1 moveLongitudinal
+JoyAxis12Pos=scale  1 moveLateral
+JoyAxis12Neg=scale -1 moveLateral
+JoyAxis13Pos=
+JoyAxis13Neg=
+JoyAxis14Pos=
+JoyAxis14Neg=
+JoyAxis15Pos=
+JoyAxis15Neg=
+JoyAxis16Pos=
+JoyAxis16Neg=
+JoyAxis17Pos=
+JoyAxis17Neg=
+JoyAxis18Pos=
+JoyAxis18Neg=
+JoyAxis19Pos=
+JoyAxis19Neg=
+JoyAxis20Pos=
+JoyAxis20Neg=
+JoyAxis21Pos=
+JoyAxis21Neg=
+JoyAxis22Pos=
+JoyAxis22Neg=
+JoyAxis23Pos=
+JoyAxis23Neg=
+JoyAxis24Pos=
+JoyAxis24Neg=
+JoyButton0=cycleNavigationFocus
+JoyButton1=
+JoyButton2=
+JoyButton3=
+JoyButton4=
+JoyButton5=
+JoyButton6=scale  1 moveRoll
+JoyButton7=scale -1 moveRoll
+JoyButton8=
+JoyButton9=fire
+JoyButton10=
+JoyButton11=
+JoyButton12=
+JoyButton13=
+JoyButton14=
+JoyButton15=
+JoyButton16=
+JoyButton17=
+JoyButton18=
+JoyButton19=
+JoyButton20=
+JoyButton21=
+JoyButton22=
+JoyButton23=
+JoyButton24=
+JoyButton25=
+JoyButton26=
+JoyButton27=
+JoyButton28=
+JoyButton29=
+JoyButton30=
+JoyButton31=
+JoyPOV1North=
+JoyPOV1South=
+JoyPOV1East=
+JoyPOV1West=
+JoyPOV2North=
+JoyPOV2South=
+JoyPOV2East=
+JoyPOV2West=
+JoyPOV3North=
+JoyPOV3South=
+JoyPOV3East=
+JoyPOV3West=
+JoyPOV4North=
+JoyPOV4South=
+JoyPOV4East=
+JoyPOV4West=
+
Index: code/trunk/bin/disco.txt
===================================================================
--- code/trunk/bin/disco.txt	(revision 1407)
+++ code/trunk/bin/disco.txt	(revision 1502)
@@ -2,3 +2,3 @@
 delay 0.2 Ambient setAmbientLightTest 0,1,0,1
 delay 0.4 Ambient setAmbientLightTest 0,0,1,1
-delay 0.6 exec disco.txt
+delay 0.6 source disco.txt
Index: code/trunk/bin/irc.tcl
===================================================================
--- code/trunk/bin/irc.tcl	(revision 1502)
+++ code/trunk/bin/irc.tcl	(revision 1502)
@@ -0,0 +1,6 @@
+proc every {ms body} { eval $body; after $ms [list every $ms $body] }
+package require irk
+set conn [irk::connect datacore $nickname]
+irk::join $conn #orxonox
+every 25 {}
+vwait termination
Index: code/trunk/bin/keybindings.ini
===================================================================
--- code/trunk/bin/keybindings.ini	(revision 1407)
+++ 	(revision )
@@ -1,264 +1,0 @@
-[KeyBinder]
-KeyUNASSIGNED=
-KeyESCAPE= exit
-Key1=
-Key2=
-Key3=
-Key4=
-Key5=
-Key6=
-Key7=
-Key8=
-Key9=
-Key0=
-KeyMINUS=
-KeyEQUALS=activateConsole
-KeyBACK=
-KeyTAB=
-KeyQ=
-KeyW=
-KeyE=
-KeyR=
-KeyT=
-KeyY=
-KeyU=
-KeyI=
-KeyO=
-KeyP=
-KeyLBRACKET=
-KeyRBRACKET=
-KeyRETURN=
-KeyLCONTROL=
-KeyA=
-KeyS=
-KeyD=
-KeyF=
-KeyG=
-KeyH=
-KeyJ=
-KeyK=
-KeyL=
-KeySEMICOLON=
-KeyAPOSTROPHE=
-KeyGRAVE=activateConsole
-KeyLSHIFT=
-KeyBACKSLASH=
-KeyZ=
-KeyX=
-KeyC=
-KeyV=
-KeyB=
-KeyN=
-KeyM=
-KeyCOMMA=
-KeyPERIOD=
-KeySLASH=
-KeyRSHIFT=
-KeyMULTIPLY=
-KeyLMENU=
-KeySPACE=
-KeyCAPITAL=
-KeyF1=
-KeyF2=
-KeyF3=
-KeyF4=
-KeyF5=
-KeyF6=
-KeyF7=
-KeyF8=
-KeyF9=
-KeyF10=
-KeyNUMLOCK=
-KeySCROLL=
-KeyNUMPAD7=
-KeyNUMPAD8=
-KeyNUMPAD9=
-KeySUBTRACT=
-KeyNUMPAD4=
-KeyNUMPAD5=
-KeyNUMPAD6=
-KeyADD=
-KeyNUMPAD1=
-KeyNUMPAD2=
-KeyNUMPAD3=
-KeyNUMPAD0=
-KeyDECIMAL=
-Key=
-KeyOEM_102=
-KeyF11=
-KeyF12=
-KeyF13=
-KeyF14=
-KeyF15=
-KeyKANA=
-KeyABNT_C1=
-KeyCONVERT=
-KeyNOCONVERT=
-KeyYEN=
-KeyABNT_C2=
-KeyNUMPADEQUALS=
-KeyPREVTRACK=
-KeyAT=
-KeyCOLON=
-KeyUNDERLINE=
-KeyKANJI=
-KeySTOP=
-KeyAX=
-KeyUNLABELED=
-KeyNEXTTRACK=
-KeyNUMPADENTER=activateConsole
-KeyRCONTROL=
-KeyMUTE=
-KeyCALCULATOR=
-KeyPLAYPAUSE=
-KeyMEDIASTOP=
-KeyVOLUMEDOWN=
-KeyVOLUMEUP=
-KeyWEBHOME=
-KeyNUMPADCOMMA=
-KeyDIVIDE=
-KeySYSRQ=
-KeyRMENU=
-KeyPAUSE=
-KeyHOME=
-KeyUP=
-KeyPGUP=
-KeyLEFT=
-KeyRIGHT=
-KeyEND=
-KeyDOWN=
-KeyPGDOWN=
-KeyINSERT=
-KeyDELETE=
-KeyLWIN=
-KeyRWIN=
-KeyAPPS=
-KeyPOWER=
-KeySLEEP=
-KeyWAKE=
-KeyWEBSEARCH=
-KeyWEBFAVORITES=
-KeyWEBREFRESH=
-KeyWEBSTOP=exit
-KeyWEBFORWARD=
-KeyWEBBACK=
-KeyMYCOMPUTER=
-KeyMAIL=
-KeyMEDIASELECT=
-MouseLeft=
-MouseRight=
-MouseMiddle=
-MouseButton3=
-MouseButton4=
-MouseButton5=
-MouseButton6=
-MouseButton7=
-MouseWheel1Up=AxisAmp 0.1 slomo
-MouseWheel1Down=AxisAmp 0.1 slomo
-MouseWheel2Up=
-MouseWheel2Down=
-MouseXPos= #exit | ButtonThreshold 0.85
-MouseXNeg=
-MouseYPos=
-MouseYNeg=
-Empty1Pos=
-Empty1Neg=
-Empty2Pos=
-Empty2Neg=
-JoyAxis1Pos=
-JoyAxis1Neg=
-JoyAxis2Pos=
-JoyAxis2Neg=
-JoyAxis3Pos=
-JoyAxis3Neg=
-JoyAxis4Pos=
-JoyAxis4Neg=
-JoyAxis5Pos=
-JoyAxis5Neg= #AxisAmp 10 slomo | ButtonThreshold 0.9 | onPress exit
-JoyAxis6Pos= #AxisAmp  10 slomo
-JoyAxis6Neg=
-JoyAxis7Pos=
-JoyAxis7Neg=
-JoyAxis8Pos=
-JoyAxis8Neg=
-JoyAxis9Pos=
-JoyAxis9Neg=
-JoyAxis10Pos=
-JoyAxis10Neg=
-JoyAxis11Pos=
-JoyAxis11Neg=
-JoyAxis12Pos=
-JoyAxis12Neg=
-JoyAxis13Pos=
-JoyAxis13Neg=
-JoyAxis14Pos=
-JoyAxis14Neg=
-JoyAxis15Pos=
-JoyAxis15Neg=
-JoyAxis16Pos=
-JoyAxis16Neg=
-JoyAxis17Pos=
-JoyAxis17Neg=
-JoyAxis18Pos=
-JoyAxis18Neg=
-JoyAxis19Pos=
-JoyAxis19Neg=
-JoyAxis20Pos=
-JoyAxis20Neg=
-JoyAxis21Pos=
-JoyAxis21Neg=
-JoyAxis22Pos=
-JoyAxis22Neg=
-JoyAxis23Pos=
-JoyAxis23Neg=
-JoyAxis24Pos=
-JoyAxis24Neg=
-JoyButton0=
-JoyButton1=
-JoyButton2=
-JoyButton3=
-JoyButton4=
-JoyButton5=
-JoyButton6=
-JoyButton7=
-JoyButton8=
-JoyButton9=
-JoyButton10=
-JoyButton11=
-JoyButton12=
-JoyButton13=
-JoyButton14=
-JoyButton15=
-JoyButton16=
-JoyButton17=
-JoyButton18=
-JoyButton19=
-JoyButton20=
-JoyButton21=
-JoyButton22=
-JoyButton23=
-JoyButton24=
-JoyButton25=
-JoyButton26=
-JoyButton27=
-JoyButton28=
-JoyButton29=
-JoyButton30=
-JoyButton31=
-JoyPOV1North=
-JoyPOV1South=
-JoyPOV1East=
-JoyPOV1West=
-JoyPOV2North=
-JoyPOV2South=
-JoyPOV2East=
-JoyPOV2West=
-JoyPOV3North=
-JoyPOV3South=
-JoyPOV3East=
-JoyPOV3West=
-JoyPOV4North=
-JoyPOV4South=
-JoyPOV4East=
-JoyPOV4West=
-
Index: code/trunk/bin/levels/sample.oxw
===================================================================
--- code/trunk/bin/levels/sample.oxw	(revision 1407)
+++ code/trunk/bin/levels/sample.oxw	(revision 1502)
@@ -9,10 +9,12 @@
   </audio--> 
 
-<!--Ambient colourvalue="1,1,1" /-->
-<Skybox src="Orxonox/StarSkyBox" />
+<Ambient colourvalue="0.1, 0.1, 0.1" />
+<Skybox src="Orxonox/Starbox" />
 <SpaceShip camera="true" position="0,0,0" scale="10" yawpitchroll="0,0,0" mesh="assff.mesh" maxSpeed="500" maxSideAndBackSpeed="50" maxRotation="1.0" transAcc="200" rotAcc="3.0" transDamp="75" rotDamp="1.0" />
-<Model position="1500,0,100" scale="10" mesh="tomato.mesh" yawpitchroll="-40,30,0" rotationAxis="1,0,0" rotationRate="-30"/>
-<Model position="0,4200,0" scale="10" mesh="tomato.mesh" yawpitchroll="-50,60,0" rotationAxis="1,0,0" rotationRate="-30"/>
-<Model position="0,0,6800" scale="10" mesh="tomato.mesh" yawpitchroll="-50,-30,0" rotationAxis="1,0,0" rotationRate="-30"/>
+<Model position="2000,0,0" scale="10" mesh="tomato.mesh" yawpitchroll="-40,30,0" rotationAxis="1,0,0" rotationRate="-30"/>
+<Model position="0,2000,0" scale="10" mesh="tomato.mesh" yawpitchroll="-50,60,0" rotationAxis="1,0,0" rotationRate="-30"/>
+<Model position="0,0,2000" scale="10" mesh="tomato.mesh" yawpitchroll="-50,-30,0" rotationAxis="1,0,0" rotationRate="-30"/>
+<Model position="10000,16000,0" scale="100" mesh="DuBall1.mesh"/>
+<Model position="11400,16000,0" scale="60" mesh="DuBall2.mesh"/>
 <NPC position="0,100,400" scale="1" mesh="razor.mesh"/>
 <NPC position="0,100,400" scale="1" mesh="razor.mesh"/>
Index: code/trunk/bin/remote.tcl
===================================================================
--- code/trunk/bin/remote.tcl	(revision 1502)
+++ code/trunk/bin/remote.tcl	(revision 1502)
@@ -0,0 +1,2 @@
+set telnetserverthreadid [TclThreadManager create]
+TclThreadManager execute $telnetserverthreadid source telnet_server.tcl
Index: code/trunk/bin/run-script
===================================================================
--- code/trunk/bin/run-script	(revision 1407)
+++ code/trunk/bin/run-script	(revision 1502)
@@ -8,5 +8,5 @@
 fi
 
-if [[ ! -f orge.cfg ]] ; then
+if [[ -ne orge.cfg ]] ; then
 	cp ogre.cfg-init ogre.cfg
 fi
Index: code/trunk/bin/telnet_server.tcl
===================================================================
--- code/trunk/bin/telnet_server.tcl	(revision 1502)
+++ code/trunk/bin/telnet_server.tcl	(revision 1502)
@@ -0,0 +1,209 @@
+ #!/usr/bin/env tclsh
+ # Pseudo-telnet server.  Includes basic auth, but no separate identities
+ # or proper multi-threaded operation, so whoever runs this had better
+ # trust those he gives identities/passwords to and they had better trust
+ # each other too.  Note this script does not support command-line arguments.
+
+ ## The names of this array are IP addresses of hosts that are not permitted
+ ## to connect to any of our services.  Admin account(s) can change this
+ ## at run-time, though this info is not maintained across whole-server shutdowns.
+ array set denyHosts {}
+
+ ## Keep the Tcl-thread busy
+ proc every {ms body} { eval $body; after $ms [list every $ms $body] }
+ every 200 {}
+
+ ## Create a server on the given port with the given name/password map
+ ## and the given core interaction handler.
+ proc telnetServer {port {passmap} {handlerCmd remoteCommand}} {
+     if {$port == 0} {
+         return -code error "Only non-zero port numbers are supported"
+     }
+     set server [socket -server [list connect $port $handlerCmd] $port]
+     global passwords services
+     foreach {id pass} $passmap {set passwords($port,$id) $pass}
+     set services($server) $handlerCmd
+     return $server
+ }
+
+ ## Removes the server on the given port, cleaning up the extra state too.
+ proc closedownServer {server} {
+     global services passwords connections auth
+     set port [lindex [fconfigure $server -sockname] 2]
+     catch {close $server}
+     unset services($server)
+     foreach passmap [array names passwords $port,*] {
+         unset passwords($passmap)
+     }
+     # Hmph!  Have to remove unauthorized connections too, though any
+     # connection which has been authorized can continue safely.
+     foreach {client data} [array get connections] {
+         if {$port == [lindex $data 0] && !$auth($client)} {
+             disconnect $client
+         }
+     }
+ }
+
+ ## Handle an incoming connection to the given server
+ proc connect {serverport handlerCmd client clienthost clientport} {
+     global auth cmd denyHosts connections
+     if {[info exist denyHosts($clienthost)]} {
+         puts stdout "${clienthost}:${clientport} attempted connection"
+         catch {puts $client "Connection denied"}
+         catch {close $client}
+         return
+     }
+     puts stdout "${clienthost}:${clientport} connected on $client"
+     fileevent $client readable "handle $serverport $client"
+     set auth($client) 0
+     set cmd($client) $handlerCmd
+     set connections($client) [list $serverport $clienthost $clientport]
+     fconfigure $client -buffering none
+     catch {puts -nonewline $client "Login: "}
+ }
+
+ ## Disconnect the given client, cleaning up any connection-specific data
+ proc disconnect {client} {
+     catch {close $client}
+     global auth cmd connections
+     unset auth($client)
+     unset cmd($client)
+     unset connections($client)
+     puts stdout "$client disconnected"
+ }
+
+ ## Handle data sent from the client.  Log-in is handled directly by this
+ ## procedure, and requires the name and password on the same line
+ proc handle {serverport client} {
+     global passwords auth cmd
+     if {[gets $client line] < 0} {
+         disconnect $client
+         return
+     }
+     if {[string equal $line "quit"] || [string equal $line "exit"]} {
+         disconnect $client
+         return
+     }
+     if {$auth($client)} {
+         eval $cmd($client) [list $client $line 0]
+         eval $cmd($client) [list $client $line 1]
+         return
+     }
+     foreach {id pass} [split $line] {break}
+     if {![info exist pass]} {
+         catch {puts -nonewline $client "Login: "}
+         return
+     }
+     if {
+         [info exist passwords($serverport,$id)] &&
+         [string equal $passwords($serverport,$id) $pass]
+     } then {
+         set auth($client) 1
+         puts stdout "$id logged in on $client"
+         catch {puts $client "Welcome, $id!"}
+         eval $cmd($client) [list $client $line 1]
+         return
+     }
+     puts stdout "AUTH FAILURE ON $client"
+     catch {puts $client "Unknown name or password"}
+     disconnect $client
+ }
+
+ ## Standard handler for logged-in conversations and prompt-generation.
+ proc execCommand {client line prompt} {
+     global tcl_platform
+     if {$prompt} {
+         catch {puts -nonewline $client "\$ "}
+         return
+     }
+     switch $tcl_platform(platform) {
+         unix {
+             catch {exec sh -c $line <@$client >@$client 2>@$client}
+         }
+         default {
+             catch {exec $line} data
+             puts $client $data
+         }
+     }
+ }
+
+ ## Administration service handler.  Chains to the normal handler for
+ ## everything it doesn't recognise itself.
+ proc admin {client line prompt} {
+     if {$prompt} {
+         catch {puts -nonewline $client "# "}
+         return
+     }
+     set cmd [split $line]
+     global denyHosts connections services
+     if {[string equal $line "shutdown"]} {
+         set ::termination 1
+         puts stdout "Shutdown requested on $client"
+         catch {puts $client "System will shut down as soon as possible"}
+         return -code return "SHUTTING DOWN"
+     } elseif {[string equal [lindex $cmd 0] "deny"]} {
+         set denyHosts([lindex $cmd 1]) 1
+     } elseif {[string equal [lindex $cmd 0] "allow"]} {
+         catch {unset denyHosts([lindex $cmd 1])}
+     } elseif {[string equal $line "denied"]} {
+         foreach host [array names denyHosts] {
+             catch {puts $client $host}
+         }
+     } elseif {[string equal $line "connections"]} {
+         set len 0
+         foreach conn [array names connections] {
+             if {$len < [string length $conn]} {
+                 set len [string length $conn]
+             }
+         }
+         foreach {conn details} [array get connections] {
+             catch {puts $client [format "%-*s = %s" $len $conn $details]}
+         }
+     } elseif {[string equal [lindex $cmd 0] "close"]} {
+         set sock [lindex $cmd 1]
+         if {[info exist connections($sock)]} {
+             disconnect $sock
+         }
+     } elseif {[string equal $line "services"]} {
+         set len 0
+         foreach serv [array names services] {
+             if {$len < [string length $serv]} {
+                 set len [string length $serv]
+             }
+         }
+         foreach {serv handler} [array get services] {
+             set port [lindex [fconfigure $serv -sockname] 2]
+             catch {puts $client [format "%-*s (port %d) = handler %s" $len $serv $port $handler]}
+         }
+     } elseif {[string equal [lindex $cmd 0] "addService"]} {
+         set service [eval telnetServer [lrange $cmd 1 end]]
+         catch {puts $client "Created service as $service"}
+     } elseif {[string equal [lindex $cmd 0] "removeService"]} {
+         set service [lindex $cmd 1]
+         if {[info exist services($service)]} {
+             closedownServer $service
+         }
+     } else {
+         # CHAIN TO DEFAULT
+         execCommand $client $line 0
+     }
+ }
+ 
+ ## Executes a given command
+ proc remoteCommand {client line prompt} {
+     global tcl_platform
+     if {$prompt} {
+         catch {puts -nonewline $client "\$ "}
+         return
+     }
+     catch {eval $line} data
+     puts $client $data
+ }
+
+ telnetServer 2560 {orxonox rocks} remoteCommand
+ telnetServer 2561 {orxadmin *****} admin
+
+ puts stdout "Ready for service"
+
+ vwait termination
+ execute exit
