diff options
Diffstat (limited to 'cap-muck.lsp')
-rw-r--r-- | cap-muck.lsp | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/cap-muck.lsp b/cap-muck.lsp index fd90626..36bffba 100644 --- a/cap-muck.lsp +++ b/cap-muck.lsp @@ -1,11 +1,8 @@ -(defpackage #:cap-muck - (:use #:openlisp) - (:export - #:main) - ) -(in-package #:cap-muck) +;;; See https://github.com/chazu/16k_muds/tree/master/drveg%40pacbell.net + (defglobal *terminate-program* nil) +;; Hmm, I now think procedural interfaces are better than protocols (defconstant +bold+ "#\esc[1m") (defconstant +unbold+ "#\esc[0m") (defconstant +q+ #\") @@ -109,9 +106,7 @@ ()) ;; TODO: Use the reader, for prototype at least? -;; Can switch to postmodern for production. -;; -;; Or dbm? +;; Or dbm? (Espcially for production.) (defun read-room-database () (setq *rooms* '()) (with-open-input-file (file +rdb+) @@ -175,9 +170,18 @@ (with-open-output-file (file +adb+) (mapcar (lambda (a) (print-object a file)) *avatars*))) +(defun establish-connection () + (let ((c (create (class <connection-type>)))) + (say c "Welcome to CapMUCK!") + (say c "Commands are all upper case, like HELP.") + (say c "") + (say c +name-prompt+))) + (defun main () (read-avatar-database) (read-room-database) (while (not *terminate-program*) (check-for-inputs))) -(provide "cap-muck") +(main) + + |