* play/dunnet.el (dun-doassign): Fixed bug where UNIX variable assignment without varname or rhs causes crash.

* play/dunnet.el (dun-ftp): Fixed bug where blank ftp password is allowed, making it impossible to win endgame.
* play/dunnet.el (dun-unix-verbs): Added ssh as alias to rlogin, because nobody knows what rlogin is anymore.
* play/dunnet.el (dun-help): Bumped version number, updated contact info.
This commit is contained in:
Ron Schnell 2014-06-16 01:05:05 -04:00
parent 8c39c6685e
commit eca36e9213
2 changed files with 54 additions and 30 deletions

View file

@ -1,3 +1,16 @@
<<<<<<< TREE
2014-06-16 Ron Schnell <ronnie@driver-aces.com>
* play/dunnet.el (dun-doassign): Fixed bug where UNIX variable assignment without varname or rhs causes crash.
* play/dunnet.el (dun-ftp): Fixed bug where blank ftp password is allowed, making it impossible to win endgame.
* play/dunnet.el (dun-unix-verbs): Added ssh as alias to rlogin, because nobody knows what rlogin is anymore.
* play/dunnet.el (dun-help): Bumped version number, updated contact info.
2014-06-14 Ron Schnell <ronnie@driver-aces.com>
* play/dunnet.el If a lamp is in the room, you won't be eaten by a grue.
=======
2014-06-15 Michael Albinus <michael.albinus@gmx.de>
Sync with Tramp 2.2.10.
@ -132,6 +145,7 @@
* play/dunnet.el (dun-describe-room, dun-mode):
If a lamp is in the room, you won't be eaten by a grue.
>>>>>>> MERGE-SOURCE
2014-06-13 Glenn Morris <rgm@gnu.org>
* Makefile.in ($(lisp)/cus-load.el, $(lisp)/finder-inf.el)

View file

@ -898,7 +898,7 @@ to swim.")
(defun dun-help (args)
(dun-mprincl
"Welcome to dunnet (2.01), by Ron Schnell (ronnie@driver-aces.com).
"Welcome to dunnet (2.02), by Ron Schnell (ronnie@driver-aces.com - @RonnieSchnell).
Here is some useful information (read carefully because there are one
or more clues in here):
- If you have a key that can open a door, you do not need to explicitly
@ -1387,8 +1387,8 @@ for a moment, then straighten yourself up.
(setq dungeon-mode 'dungeon)
(setq dun-unix-verbs '((ls . dun-ls) (ftp . dun-ftp) (echo . dun-echo)
(exit . dun-uexit) (cd . dun-cd) (pwd . dun-pwd)
(rlogin . dun-rlogin) (uncompress . dun-uncompress)
(cat . dun-cat)))
(rlogin . dun-rlogin) (ssh . dun-rlogin)
(uncompress . dun-uncompress) (cat . dun-cat)))
(setq dun-dos-verbs '((dir . dun-dos-dir) (type . dun-dos-type)
(exit . dun-dos-exit) (command . dun-dos-spawn)
@ -2539,25 +2539,31 @@ treasures for points?" "4" "four")
(dun-mprincl "Incorrect.")))
(let (varname epoint afterq i value)
(setq varname (substring line 0 esign))
(if (not (setq epoint (string-match ")" line)))
(if (string= (substring line (1+ esign) (+ esign 2))
"\"")
(progn
(setq afterq (substring line (+ esign 2)))
(setq epoint (+
(string-match "\"" afterq)
(+ esign 3))))
(setq varname (replace-regexp-in-string " " "" (substring line 0 esign)))
(if (not (setq epoint (string-match " " line)))
(setq epoint (length line))))
(setq epoint (1+ epoint))
(while (and
(not (= epoint (length line)))
(setq i (string-match ")" (substring line epoint))))
(setq epoint (+ epoint i 1))))
(setq value (substring line (1+ esign) epoint))
(dun-eval varname value))))
(if (or (= (length varname) 0) (< (- (length line) esign) 2))
(progn
(dun-mprinc line)
(dun-mprincl " : not found."))
(if (not (setq epoint (string-match ")" line)))
(if (string= (substring line (1+ esign) (+ esign 2))
"\"")
(progn
(setq afterq (substring line (+ esign 2)))
(setq epoint (+
(string-match "\"" afterq)
(+ esign 3))))
(if (not (setq epoint (string-match " " line)))
(setq epoint (length line))))
(setq epoint (1+ epoint))
(while (and
(not (= epoint (length line)))
(setq i (string-match ")" (substring line epoint))))
(setq epoint (+ epoint i 1))))
(setq value (substring line (1+ esign) epoint))
(dun-eval varname value)))))
(defun dun-eval (varname value)
(let (eval-error)
@ -2741,16 +2747,20 @@ drwxr-xr-x 3 root staff 2048 Jan 1 1970 ..")
(if dun-batch-mode
(dun-mprincl "Login failed.")
(dun-mprincl "\nLogin failed."))
(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
(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)))))))))
(setq newlist (append newlist (list ident)))
(rplaca (nthcdr 1 dun-endgame-questions) newlist))))))))))
(defun dun-ftp-commands ()
(setq dun-exitf nil)