Function: dun-ftp

dun-ftp is a byte-compiled function defined in dunnet.el.gz.

Signature

(dun-ftp ARGS)

Source Code

;; Defined in /usr/src/emacs/lisp/play/dunnet.el.gz
(defun dun-ftp (args)
  (let (host username ident newlist)
    (if (not (car args))
	(dun-mprincl "ftp: hostname required on command line.")
      (setq host (intern (car args)))
      (if (not (member host '(gamma dun-endgame)))
	  (dun-mprincl "ftp: Unknown host.")
	(if (eq host 'dun-endgame)
	    (dun-mprincl "ftp: connection to endgame not allowed")
	  (if (not dun-ethernet)
	      (dun-mprincl "ftp: host not responding.")
	    (dun-mprincl "Connected to gamma. FTP ver 0.9 00:00:00 01/01/70")
	    (dun-mprinc "Username: ")
	    (setq username (dun-read-line))
	    (if (string= username "toukmond")
		(if dun-batch-mode
		    (dun-mprincl "toukmond ftp access not allowed.")
		  (dun-mprincl "\ntoukmond ftp access not allowed."))
	      (if (string= username "anonymous")
		  (if dun-batch-mode
		      (dun-mprincl
		       "Guest login okay, send your user ident as password.")
		    (dun-mprincl
		     "\nGuest login okay, send your user ident as password."))
		(if dun-batch-mode
		    (dun-mprinc "Password required for ")
		  (dun-mprinc "\nPassword required for "))
		(dun-mprincl username))
	      (dun-mprinc "Password: ")
	      (setq ident (dun-read-line))
	      (if (not (string= username "anonymous"))
		  (if dun-batch-mode
		      (dun-mprincl "Login failed.")
		    (dun-mprincl "\nLogin failed."))
		(if (= (length ident) 0)
		    (if dun-batch-mode
			(dun-mprincl "Password is required.")
		      (dun-mprincl "\nPassword is required."))
		  (if dun-batch-mode
		      (dun-mprincl
		       "Guest login okay, user access restrictions apply.")
		    (dun-mprincl
		     "\nGuest login okay, user access restrictions apply."))
		  (dun-ftp-commands)
		  (setq newlist
'("What password did you use during anonymous ftp to gamma?"))
		  (setq newlist (append newlist (list ident)))
		  (rplaca (nthcdr 1 dun-endgame-questions) newlist))))))))))