#! /bin/csh
if ( x$2 == x) then
  set target = "dialup"
else
  set target = "$2"
endif
set where=`zlocate $1`
if ( $hosttype == rt ) then
  echo ------ rt mode: logging into $target -------
  zwrite kkkken $1 -m automatic msg: To begin, type attach games \; /mit/games/vaxbin/xks kkkken@$target \& 
  rm -f ~/.login.xks
  echo ${1}@$where[1] -d ${host}:0 > ~/.login.xks
  xhost $target
  xterm -e rlogin $target -l kkkken &
else
  zwrite kkkken $1 -m automatic msg: To begin, type attach games \; /mit/games/vaxbin/xks kkkken@$host \& 
  attach -n -m /mit/games -e cyrus.mit.edu:/u3/lockers/games
  /mit/games/vaxbin/xks ${1}@$where[1] &
endif


