Browse code

Raze the forest, so that it can grow anew! Arson.

Jaidyn Levesque authored on 2019-11-11 07:19:12
Showing 27 changed files
... ...
@@ -1,150 +1,5 @@
1 1
 ===============================================================================
2
-FACILSERVIL : `Easy Server`                           Dead-simple, dead-useful.
2
+LAMBDAMUSH : Let's go, bitches
3 3
 ===============================================================================
4 4
 
5
-Sometimes, it's just annoying and time-draining to deal with all of the
6
-intricacies of :usockets-- if, to that, you say something like...
7
-
8
-        "I just want to write a simple TCP server, dammit!
9
-         There's got to be an easier way!"
10
-
11
-... then Facilservil is for you!
12
-
13
-Facilservil ("easy server") abstracts away the entire server bits, allowing you
14
-to focus on flexibility.
15
-
16
-
17
-FEATURES
18
-
19
- * Multi-user
20
- * Shutdown protection
21
- * Input-handling
22
- * Simple logging system
23
- * Flexibility
24
- * UTF-8
25
-
26
-
27
-DEMONSTRATION
28
-
29
-Load up Facilservil, then run this in your repl:
30
-    
31
-       (facilservil:ex-server 8888)
32
-
33
-Now, connect your computer on port 8888!
34
-If you're on LiGNUx or BSD, you can use "telnet localhost 8888"
35
-
36
-It'll show you a pretty example server. :)
37
-
38
-In reality, 'ex-server is just a small function for demonstration-- the
39
-example server really looks like this:
40
-
41
-        (facilservil:server "0.0.0.0" port
42
-	                    'facilservil:connect-ex 'facilservil:disconnect-ex
43
-			    'facilservil:input-handle-ex)
44
-
45
-It runs #'connect-ex when you connect, #'disconnect-ex when you disconnect,
46
-and #'input-handle-ex after you finish a command, to handle your input.
47
-
48
-If you wanna see this example's code (is there a better way to learn?), look
49
-in "/src/ex.lisp".
50
-
51
-For a different kind of example (less interesting, since it takes no user
52
-input), look at QOTDD (https://git.eunichx.us/qotdd).
53
-
54
-For a more comprehensive guide to Facilservil, look to USAGE, coming right up.
55
-
56
-
57
-USAGE
58
-
59
-To use Facilservil, just use the `facilservil:server` function somewhere:
60
-
61
-        (facilservil:server host port
62
-                            connecting disconnecting input-handler
63
-                            &key (command-byte 10) (halting 'halt-ex))
64
-
65
-"host" and "port" are, obviously, the host-IP and port, respectively.
66
-"connecting"	is the function that will be executed when a user connects.
67
-"disconnecting"	is the function that will run when someone disconnects.
68
-"input-handler"	interprets the input of a user, when they complete a command.
69
-"command-byte"	is the byte which determines if they've completed a command.
70
-            	it's 10 by default, which is newline.
71
-"halting"    	is the function executed when the server shuts down.
72
-
73
-
74
-Basically, you write the "connecting", "disconnecting", and "input-handler"
75
-functions (maybe "halting"), and you've got a handy-dandy server.
76
-
77
-These functions you write must accept the following arguments:
78
-        connecting	(socket client-id)
79
-        disconnecting	(socket client-id)
80
-        input-handler	(socket client-id input-string)
81
-	halting    	()
82
-
83
-Let's say that you want to write a connecting function which sends a friendly
84
-"welcome" message. You'd do that like this, just about:
85
-
86
-        (defun my-connecting-function (socket client-id)
87
-	  (client-write socket
88
-	    (format nil "Hey, welcome to this server, ~A! <3" client-id)
89
-	    'T))
90
-
91
-This will write to the connecting user's socket (which is passed to your
92
-function), "Hey, welcome to this server," followed by their client-id.
93
-
94
-Every user, upon connection, is given a client ID number which is correlated
95
-with their connection socket. This ID number is random, and can be up to
96
-999999 in value.
97
-
98
-To send a message to a user, get their socket, and run
99
-          (facilservil:client-write socket string &optional newline)
100
-
101
-"newline", which defaults to nil, determines whether or not your message is
102
-followed with a newline.
103
-
104
-I'll give you one more quick example-- then you'll probably get usage.
105
-
106
-Let's write a quick input handler.
107
-           (defun my-input-handler (socket client-id input-string)
108
-	     (if (equal input-string "Hello")
109
-		(facilservil:client-write socket "And hi to you!" 't)
110
-		(facilservil:client-write socket "You won't even say hi?" 'T)))
111
-
112
-It should be pretty self-explanatory.
113
-You just scale up from them-- write a nice command parser or something, and
114
-you're on your way! :)
115
-
116
-Now, one more thing: to run the server with your new functions, just do this:
117
-
118
-            (facilservil:server host port
119
-	    'my-connecting-function 'facilservil:disconnect-ex
120
-	    'my-input-handler)
121
-
122
-
123
-TIP: When it comes to user data, you might want to use a hash-table or two which
124
-     correlate client-ids and user data. ^_^
125
-
126
-
127
-NON-FEATURES (TODO)
128
-
129
- * Ctrl-C etc will crash servers
130
- * Some UTF characters don't go over well
131
- * Internationalization should be supported--
132
-   right now, logs etc are always in English.
133
-   Not cool.
134
- * You should be able to log to a file.
135
-
136
-
137
-BORING STUFF
138
-License is in COPYING (GNU GPLv3)
139
-Author is Jaidyn Ann <jadedctrl@teknik.io>
140
-Sauce is at https://git.eunichx.us/facilservil
5
+A WIP MUSH server. Come back later!
141 6
deleted file mode 100644
... ...
@@ -1,66 +0,0 @@
1
-(in-package :lambdamush-base)
2
-
3
-
4
-;; -------------------------------------
5
-
6
-
7
-;; CMD
8
-;; SOCKET NUMBER STRING --> NIL
9
-(format t "REGISTERING... ~%")
10
-(lm:cmd-register 'say '("say" "speak" "talk")
11
-	   "Say something, anything-- broadcast it to all connected users."
12
-	   "[say] *")
13
-(format t "~A~%" lm:*cmd-list*)
14
-(defun say (user string)
15
-  (if (not (eq (length string) 0))
16
-		    (let ((speech-string
17
-			    (lm:string-substitutions
18
-			      (nih:random-item
19
-				"%A says, \"%B\""
20
-				"\"%B\", %A says."
21
-				"\"%B\", says %A."
22
-				"%A says, \"%B\""
23
-				"%A speaks: \"%B\""
24
-				"You hear %A say, \"%B\"")
25
-
26
-			      (list (list "%A" (lm:user-name user))
27
-				(list "%B" (string-trim "\"" string))))))
28
-
29
-		      (lm:user-broadcast speech-string 'T user)))
30
-		  "")
31
-
32
-
33
-;; CMD
34
-;; SOCKET NUMBER STRING --> NIL
35
-(lm:cmd-register 'act '("act" "do" "me" "*")
36
-		 "Send a message as if you do something-- like /me in IRC."
37
-		 "[act] *")
38
-(defun act (user string)
39
-  (if (not (eq (length string) 0))
40
-	    (lm:user-broadcast
41
-	      (nih:string-combine
42
-		(lm:user-name user)
43
-		(string-trim "*" string)
44
-		:seperator #\Space)
45
-	      'T
46
-	      user))
47
-	  "")
48
-
49
-
50
-
51
-;; CMD
52
-;; STRING STRING --> STRING
53
-(lm:cmd-register 'think '("think" "thunk" "'")
54
-		 "Send a message that you're thinking about something."
55
-		 "[think] *")
56
-(defun think (user string)
57
-	  (if (not (eq (length string) 0))
58
-	    (lm:user-broadcast
59
-	      (nih:string-combine
60
-		(lm:user-name user)
61
-		" thinks, '"
62
-		(string-trim "\'" (string-trim "\"" string))
63
-		"'")
64
-	      'T
65
-	      user))
66
-	  "")
67 0
deleted file mode 100644
... ...
@@ -1,35 +0,0 @@
1
-(in-package :lambdamush-base)
2
-
3
-(defvar *d-login*)
4
-(setq *d-login*
5
-  `((:username
6
-      ,(format nil "What's your username, again?~%[a-z]")
7
-
8
-      (('T
9
-	(if (lm:userp lm:*r*)
10
-	  (progn
11
-	    (fs:client-data-set lm:*rclient* "temp-username" lm:*r*)
12
-	    (lm:client-dialogue-set lm:*rclient*
13
-				 lm-b:*d-login* :password))
14
-
15
-	  (fs:client-write lm:*rclient*
16
-			   "That's... not a real username.")))))
17
-
18
-
19
-    (:password
20
-      ,(format nil "What's the password? >;o~%[*]")
21
-
22
-      (('T
23
-	(let ((temp-user (fs:client-data-get lm:*rclient* "temp-username"))
24
-	      (temp-password lm:*r*))
25
-
26
-	  (if (lm:loginp temp-user temp-password)
27
-	    (progn
28
-	      (lm:login-client lm:*rclient* temp-user)
29
-	      (lm:client-dialogue-set lm:*rclient*
30
-				   nil nil))
31
-	    (progn
32
-	      (fs:client-write lm:*rclient*
33
-			       "Wrong password or username!" 'T)
34
-	      (lm:client-dialogue-set lm:*rclient*
35
-				   lm-b:*d-login* :username)))))))))
36 0
deleted file mode 100644
... ...
@@ -1,143 +0,0 @@
1
-(in-package :lambdamush)
2
-
3
-(defvar *d-register*)
4
-(setq lm-b:*d-register*
5
-  `((:username
6
-      ,(format nil "What username will you log in with?~%[a-z]")
7
-
8
-      (('T
9
-	(cond
10
-	  ((not (ascii-lowercasep lm:*r*))
11
-	   (fs:client-write
12
-	     lm:*rclient*
13
-	     "It looks like you have some non-lowercase-letters in there."
14
-	     't))
15
-	  ((userp lm:*r*)
16
-	   (fs:client-write lm:*rclient*
17
-			    "Ah, sorry. That's already taken." 'T))
18
-	  ('T
19
-	   (fs:client-data-set lm:*rclient* "temp-username" lm:*r*)
20
-	   (client-dialogue-set lm:*rclient*
21
-				lm-b:*d-register* :password-one))))))
22
-
23
-
24
-    (:password-one
25
-      ,(format nil "What should your password be?~%[*]")
26
-
27
-      (('T
28
-	(progn
29
-	  (fs:client-data-set lm:*rclient* "temp-password-one" lm:*r*)
30
-	  (client-dialogue-set lm:*rclient*
31
-			     lm-b:*d-register* :password-two)))))
32
-
33
-
34
-
35
-    (:password-two
36
-      ,(format nil "Repeat that password, please.~%[*]")
37
-
38
-      (('T
39
-	(progn
40
-	  (fs:client-data-set lm:*rclient* "temp-password-two" lm:*r*)
41
-	  (if (equal
42
-		(fs:client-data-get lm:*rclient* "temp-password-one")
43
-		(fs:client-data-get lm:*rclient* "temp-password-two"))
44
-
45
-	    (progn
46
-	      (fs:client-data-set lm:*rclient* "temp-password" lm:*r*)
47
-	      (client-dialogue-set lm:*rclient*
48
-				   lm-b:*d-register* :name))
49
-	    
50
-	    (progn
51
-	      (fs:client-write lm:*rclient*
52
-			       "Passwords don't match-- let's try again." 'T)
53
-	      (client-dialogue-set lm:*rclient*
54
-				   lm-b:*d-register* :password-one)))))))
55
-
56
-
57
-
58
-    (:name
59
-      ,(format nil "What is your name?~%[*]")
60
-
61
-      (('T
62
-	  (if (not (namep lm:*r*))
63
-	    (progn
64
-	      (fs:client-write lm:*rclient*
65
-			       (format nil "~A's a pretty name!" lm:*r*) 'T)
66
-	      (fs:client-data-set lm:*rclient* "temp-name" lm:*r*)
67
-	      (client-dialogue-set lm:*rclient*
68
-				   lm-b:*d-register* :gender))
69
-	    (progn
70
-	      (fs:client-write lm:*rclient*
71
-			       "We already have someone by that name..." 'T))))))
72
-
73
-
74
-
75
-    (:gender
76
-      ,(format nil "What *are* your pronouns, exactly?~%[m f x]")
77
-
78
-      (((choice lm:*r* "f" "female" "g" "girl" "w" "woman")
79
-	(fs:client-write lm:*rclient* "Of course, sorry, ma'am!" 'T)
80
-	(fs:client-data-set lm:*rclient* "temp-gender" "f")
81
-	(client-dialogue-set lm:*rclient*
82
-			     lm-b:*d-register* :verify))
83
-
84
-       ((choice lm:*r* "m" "male" "b" "boy" "m" "man")
85
-	(fs:client-write lm:*rclient* "Er, obviously! Sorry, sir." 'T)
86
-	(fs:client-data-set lm:*rclient* "temp-gender" "m")
87
-	(client-dialogue-set lm:*rclient*
88
-			     lm-b:*d-register* :verify))
89
-
90
-       ((choice lm:*r* "n" "nonbinary" "e" "enbie" "x" "non-binary")
91
-	(fs:client-write lm:*rclient* "Ah, yes, sorry!" 'T)
92
-	(fs:client-data-set lm:*rclient* "temp-gender" "x")
93
-	(client-dialogue-set lm:*rclient*
94
-			     lm-b:*d-register* :verify))
95
-
96
-       ('T
97
-	(fs:client-write
98
-	  lm:*rclient* (format nil "Are you a man, woman, or enbie?") 'T))))
99
-
100
-
101
-
102
-    (:verify
103
-      ,(format nil "Let's review everything so far.~%[enter]")
104
-
105
-      (('T
106
-       (let ((temp-user (fs:client-data-get lm:*rclient* "temp-username"))
107
-	     (temp-pass (fs:client-data-get lm:*rclient* "temp-password"))
108
-	     (temp-gender (fs:client-data-get lm:*rclient* "temp-gender"))
109
-	     (temp-name (fs:client-data-get lm:*rclient* "temp-name"))) 
110
-	 (fs:client-write
111
-	   lm:*rclient*
112
-	   (format nil "User:  ~A~%Pass:  ~A~%Gend:  ~A~%Name:  ~A~%"
113
-		   temp-user temp-pass temp-gender temp-name) 'T)
114
-	 (client-dialogue-set lm:*rclient*
115
-			      lm-b:*d-register* :verify-choose)))))
116
-
117
-
118
-
119
-    (:verify-choose
120
-      ,(format nil "So, does that all sound good?~%[y n]")
121
-
122
-      (((choice lm:*r* "y" "yes")
123
-	(progn 
124
-
125
-	  (user-create
126
-	    (fs:client-data-get lm:*rclient* "temp-username")
127
-	    (fs:client-data-get lm:*rclient* "temp-password")
128
-	    (fs:client-data-get lm:*rclient* "temp-name")
129
-	    (fs:client-data-get lm:*rclient* "temp-gender"))
130
-
131
-	  (login-client lm:*rclient*
132
-			(fs:client-data-get lm:*rclient* "temp-username"))
133
-	  (fs:client-write lm:*rclient*
134
-			   "Alright, your account's been made!" 'T)
135
-	  (client-dialogue-set lm:*rclient* nil nil)))
136
-
137
-
138
-       ((choice lm:*r* "n" "no")
139
-	(progn
140
-	  (fs:client-write lm:*rclient*
141
-			   "Oh, that's alright, then. Let's go back." 'T)
142
-	  (client-dialogue-set lm:*rclient*
143
-			       lm-b:*d-register* :username)))))))
144 0
deleted file mode 100644
... ...
@@ -1,14 +0,0 @@
1
-(in-package :lambdamush-base)
2
-
3
-(defvar *d-welcome*)
4
-(setq *d-welcome*
5
-      `((:portal
6
-	  ,(format nil "Are you returning, or a newcomer?~%[r. n.]")
7
-
8
-	  (((lm:choice lm:*r* "returning" "r")
9
-	    (lm:client-dialogue-set lm:*rclient*
10
-				 lm-b:*d-login* :username))
11
-
12
-	   ((lm:choice lm:*r* "newcomer" "n")
13
-	    (lm:client-dialogue-set lm:*rclient*
14
-				 lm-b:*d-register* :username))))))
15 0
deleted file mode 100644
... ...
@@ -1,87 +0,0 @@
1
-(in-package :lambdamush-base)
2
-
3
-
4
-;; -------------------------------------
5
-
6
-;; CMD
7
-;; SOCKET NUMBER STRING --> [STRING || NIL]
8
-(lm:cmd-register 'motd '("motd")
9
-		 "Print the message of the day."
10
-		 "motd")
11
-(defun motd (user string)
12
-  "Print the motd for a user-- either directly (if small enough),
13
-  or through a pagination dialogue."
14
-  (lm:paginate-command lm:*motd* (lm:user-to-client user)))
15
-
16
-
17
-;; CMD
18
-;; SOCKET NUMBER STRING --> [STRING || NIL]
19
-(lm:cmd-register 'news '("news")
20
-		 "Print the latest news!"
21
-		 "news")
22
-(defun news (user string)
23
-  "Print the news for a user-- either directly (if small enough),
24
-  or through a pagination dialogue."
25
-  (lm:paginate-command lm:*news* (lm:user-to-client user)))
26
-
27
-
28
-;; CMD
29
-;; SOCKET NUMBER STRING --> [STRING || NIL]
30
-(lm:cmd-register 'copying '("copying" "legal" "license" "law-nerdese")
31
-		 "Print the license for Lambdamush."
32
-		 "[copying]")
33
-(defun copying (user string)
34
-  (lm:paginate-command lm:*legal* (lm:user-to-client user)))
35
-
36
-
37
-;; CMD
38
-;; SOCKET NUMBER STRING --> [STRING || NIL]
39
-(lm:cmd-register 'help '("help" "?")
40
-		 "Print the documentation and usage of a given command."
41
-		 "[help] command")
42
-(defun help (user string)
43
-  (let ((cmd-string
44
-	  (if (eq 0 (length string))
45
-	    "help"
46
-	    string)))
47
-
48
-    (if (not (lm:cmdp cmd-string))
49
-      (nih:string-combine (string-upcase cmd-string) " isn't a real command!"
50
-			  #\Newline)
51
-
52
-      (let ((help-string (cadr (reverse (lm:cmd-name-pair cmd-string)))))
53
-	(lm:paginate-command help-string (lm:user-to-client user))))))
54
-
55
-
56
-;; -------------------------------------
57
-
58
-
59
-;; CMD
60
-;; STRING STRING --> STRING
61
-(lm:cmd-register 'online '("online" "users")
62
-		 (nih:string-combine "Print all online users-- or whether or"
63
-				     "not a specific one is online.")
64
-		 "[online] [user]")
65
-(defun online (user string)
66
-  "Print either all online users, or whether or not a specific user is online."
67
-  (cond
68
-    ((eq 0 (length string))
69
-     (nih:string-combine
70
-       (format nil "~A online right now!~%~%" (length lm:*user-client*))
71
-       (reduce
72
-	 (lambda (a b)
73
-	   (nih:string-combine a b :seperator #\Newline))
74
-	 (lm:name-online-list))
75
-       #\Newline))
76
-
77
-    ((lm:name-onlinep string)
78
-     (nih:string-combine (string-upcase string) " is online right now!"
79
-			 #\Newline))
80
-
81
-    ((not (lm:namep string))
82
-     (nih:string-combine (string-upcase string) " isn't a real name!"
83
-			 #\Newline))
84
-
85
-    ('T
86
-     (nih:string-combine (string-upcase string) " isn't online right now."
87
-			 #\Newline))))
88 0
deleted file mode 100644
... ...
@@ -1,88 +0,0 @@
1
-(in-package :lambdamush-base)
2
-
3
-;; INTEGER/STRING STRING --> VARYING
4
-(defun location-get (id variable)
5
-  "Return a value of a variable for a location's ID."
6
-
7
-  (let
8
-    ((result
9
-       (db-cmd
10
-	 (nih:string-combine
11
-	   "select " variable "from rooms where id = " id ";"))))
12
-
13
-    (if (eq 2 (length result))
14
-      (car (last result))
15
-      result)))
16
-
17
-
18
-;; INTEGER/STRING STRING VARYING --> NIL
19
-(defun location-set (id variable value)
20
-  "Set the value of a location's variabe in it's respective DB row."
21
-
22
-  (db-cmd
23
-    (nih:string-combine
24
-      "update rooms"
25
-      " set " variable " = " value
26
-      " where id = " id ";")))
27
-
28
-;; -------------------------------------
29
-
30
-;; STRING --> INTEGER
31
-(defun location-name-to-id (name)
32
-  "Return the room-ID of a room from its name."
33
-  (nth 1
34
-       (lm:db-cmd
35
-	 (nih:string-combine
36
-	   "select id from rooms where name = '" name "';"))))
37
-
38
-;; -------------------------------------
39
-
40
-
41
-
42
-
43
-;; STRING --> BOOLEAN
44
-(defun locationp (id)
45
-  "Return whether or not a location exists."
46
-  (position id
47
-	    (lm:db-cmd
48
-	      (nih:string-combine "select id from rooms where id = " id ";"))
49
-	    :test #'equal))
50
-
51
-
52
-(defun location-create (name &key (desc nil)
53
-			     (enter-text nil) (enter-function "blank")
54
-			     (exit-text nil) (exit-function "blank"))
55
-  "Create a new room."
56
-  (let*
57
-    ((id (new-id "rooms"))
58
-
59
-     (cmd
60
-       (nih:string-combine
61
-	 "insert into rooms (id, name"
62
-	 (if desc ", desc")
63
-	 (if enter-text ", enter-text") (if enter-function ", enter-function")
64
-	 (if exit-text ", enter-text") (if exit-function ", enter-function")
65
-	 ")"
66
-	 "values (" id ", " name
67
-	 (if desc (nih:string-combine ", '" desc "'"))
68
-	 (if enter-text (nih:string-combine ", '" enter-text "'"))
69
-	 (if enter-function (nih:string-combine ", '" enter-function "'"))
70
-	 (if exit-text (nih:string-combine ", '" exit-text "'"))
71
-	 (if exit-function (nih:string-combine ", '" exit-function "'"))
72
-	 ");")))
73
-
74
-    (db-cmd cmd)))
75
-
76
-
77
-
78
-;; -------------------------------------
79
-
80
-
81
-(defun create-rooms-table ()
82
-  (lm:db-cmd
83
-    (nih:string-combine
84
-      "create table rooms"
85
-      " (ID int primary key, NAME varchar(20), DESC text, "
86
-      "  ENTER-TEXT text, ENTER-FUNCTION varchar(20), EXIT-TEXT text,"
87
-      "  EXIT-FUNCTION varchar(20),"
88
-      "  EXT varchar(8000));")))
89 0
deleted file mode 100644
... ...
@@ -1,16 +0,0 @@
1
-(in-package :lambdamush-base)
2
-
3
-;; NIL --> NIL
4
-(defun ensure-tables ()
5
-  "Make sure all necessary LM-B tables exist."
6
-
7
-  (lm:ensure-tables (list "rooms" "objects") "lm-b:"))
8
-
9
-
10
-;; STRING --> INTEGER
11
-(defun new-id (table)
12
-  "Return the first available ID for a table."
13
-
14
-  (db-cmd
15
-    (nih:string-combine
16
-      "select max(id) + 1 from " table ";")))
17 0
deleted file mode 100644
... ...
@@ -1,13 +0,0 @@
1
-(in-package :lambdamush-base)
2
-
3
-(defun create-objects-table ()
4
-  "Create the object table."
5
-  (db-cmd
6
-    (nih:string-combine
7
-      "create table objects"
8
-      " (ID int not null primary key,"
9
-      "  NAME varchar(20), DESCRIPTION text,"
10
-      "  TAKE_TEXT text, TAKE_FUNCTION varchar(20),"
11
-      "  USE_TEXT text, USE_FUNCTION varchar(20) default 'blank,"
12
-      "  DROP_TEXT text, DROP_FUNCTION varchar(20) default 'blank',"
13
-      "  TRAITS varchar(8000), EXT varchar(8000));")))
14 0
deleted file mode 100644
... ...
@@ -1,42 +0,0 @@
1
-(defpackage :lambdamush-base
2
-  (:use :cl)
3
-  (:nicknames :lm-b)
4
-  (:export
5
-    ;; ,---------------------------------------- 
6
-    ;; | COMMANDS
7
-    *cmd-list*
8
-    ;; |
9
-    ;; | INFO
10
-    :help
11
-    :motd
12
-    :copying
13
-    :news
14
-    :online
15
-    ;; |
16
-    ;; | COMMS
17
-    :say
18
-    :act
19
-    :think
20
-    ;; |
21
-    ;; | TRANSPORTATION
22
-    :teleport
23
-    :locitem
24
-    ;; |
25
-    ;; | UTILIZATION
26
-    :use-item
27
-    :item-fetch
28
-    :item-to-string
29
-    :make-item
30
-    :make-door
31
-
32
-
33
-    ;; ,---------------------------------------- 
34
-    ;; | DIALOGUES
35
-    *d-welcome*
36
-    *d-login*
37
-    *d-register*))
38
-
39
-(in-package :lambdamush-base)
40
-
41
-(defvar *cmd-list*)
42
-(setq *cmd-list* '())
43 0
deleted file mode 100644
... ...
@@ -1,20 +0,0 @@
1
-(in-package :lambdamush-base)
2
-
3
-;; -------------------------------------
4
-
5
-
6
-;; CMD
7
-;; STRING STRING --> STRING
8
-(lm:cmd-register 'teleport '("tp" "teleport" "apperate")
9
-		 "Teleport to a certain room (by ID)."
10
-		 "[teleport] R-ID")
11
-(defun teleport (user string)
12
-  (if (locationp (nih:word-car string))
13
-    (progn
14
-      (lm:user-write user "You tear through the very fabric of reality..." 'T)
15
-      (user-location-enter user (nih:word-car string))
16
-      "")
17
-    (nih:string-combine "There's no such thing as that." #\Newline)))
18
-
19
-
20
-;; -------------------------------------
21 0
deleted file mode 100644
... ...
@@ -1,17 +0,0 @@
1
-(in-package :lambdamush-base)
2
-
3
-;;--------------------------------------
4
-
5
-;; CMD
6
-;; STRING STRING --> NIL
7
-(lm:cmd-register 'use-item '("use" "utilize" "item")
8
-		 "Use a given item by its ID."
9
-		 "[use] I-ID")
10
-(defun use-item (user string)
11
-  "Actually use an item."
12
-  (if (itemp)
13
-    (progn
14
-      (lm:user-write user (item-use-text item) 'T)
15
-      (funcall (item-use-function item) item user string)
16
-      "")
17
-    (nih:string-combine "Seemingly, nothing by that name is here." #\Newline)))
18 0
deleted file mode 100644
... ...
@@ -1,87 +0,0 @@
1
-(in-package :lambdamush-db)
2
-
3
-;; -------------------------------------
4
-
5
-
6
-
7
-;; STRING --> [varying]
8
-(defun db-cmd (command)
9
-  "Execute any given command on the database."
10
-
11
-  (cl-dbi:with-connection
12
-    (conn *db-type* :username *db-username* :password *db-password*
13
-	  :database-name *db-name*)
14
-
15
-    (let* ((query (dbi:prepare conn command))
16
-	   (result (dbi:execute query))
17
-	   (stack '()))
18
-
19
-      (loop
20
-	:for row = (dbi:fetch result)
21
-	:while row
22
-	:do
23
-	(setq stack (concatenate 'list stack row)))
24
-      stack)))
25
-
26
-
27
-
28
-;; -------------------------------------
29
-
30
-
31
-
32
-;; STRING --> BOOLEAN
33
-(defun tablep (table)
34
-  "Return whether or not a table exists in the default DB."
35
-  (if 
36
-    (db-cmd
37
-      (nih:string-combine "select * from information_schema.tables"
38
-			  " where table_schema = '" *db-name* "'"
39
-			  " and table_name = '" table "';")) 'T)) 
40
-
41
-
42
-;; STRING --> LIST
43
-(defun columnp (table column)
44
-  "Return whether or not a column exists within a table."
45
-  (if
46
-    (position column (table-columns table) :test #'equal)
47
-    'T))
48
-
49
-
50
-;; -------------------------------------
51
-
52
-
53
-;; STRING --> LIST
54
-(defun table-columns (table)
55
-  "Return a list of columns from a table."
56
-  (delete :|column_name|
57
-	  (db-cmd
58
-	    (nih:string-combine
59
-	      "select column_name from information_schema.columns"
60
-	      " where table_name = '" table "'"
61
-	      " and table_schema = '" *db-name* "'"
62
-	      ";"))))
63
-
64
-
65
-;; -------------------------------------
66
-
67
-
68
-;; NIL --> NIL
69
-(defun ensure-tables (&optional (tables (list "users"))
70
-				(prefix "lm:"))
71
-  "Ensure that provided tables exist-- if not, create them using their
72
-respective creation functions (prefix + 'create-' + table + '-table')."
73
-  (mapcar
74
-
75
-    (lambda (table)
76
-      (if (not (tablep table))
77
-
78
-	(progn
79
-	  (fs:journal
80
-	    (nih:string-combine
81
-	      "Necessary table " table " doesn't exist. Creating...")
82
-	    "Lambdamush"
83
-	    "Database")
84
-	  (funcall
85
-	    (read-from-string
86
-	      (nih:string-combine "create-" table "-table"))))))
87
-    tables))
88 0
deleted file mode 100644
... ...
@@ -1,106 +0,0 @@
1
-(in-package :lambdamush-db)
2
-
3
-
4
-;; -------------------------------------
5
-
6
-
7
-
8
-;; STRING STRING STRING --> [VARYING]
9
-(defun data-get (table column-name column-value variable)
10
-  "Get a variable's value from a table by identifying column's name and value."
11
-  (if (columnp table (string-upcase variable))
12
-    (data-get-col table column-name column-value (string-upcase variable))
13
-    (data-get-ext table column-name column-value  variable)))
14
-
15
-
16
-
17
-;; STRING STRING STRING STRING [VARYING] --> NIL
18
-(defun data-set (table column-name column-value variable value)
19
-  "Set a variable to a value in a table by identifying column's name and value."
20
-  (if (columnp table (string-upcase variable))
21
-    (data-set-col table column-name column-value variable value)
22
-    (data-set-ext table column-name column-value variable value)))
23
-
24
-
25
-
26
-;; -------------------------------------
27
-
28
-
29
-;; STRING STRING STRING STRING --> [VARYING]
30
-(defun data-get-col (table column-name column-value variable)
31
-  "Return the value of a column-variable in a table."
32
-    (let
33
-      ((result
34
-	 (db-cmd
35
-	   (nih:string-combine
36
-	     "select " variable
37
-	     " from " table
38
-	     " where " column-name " = '" column-value "';"))))
39
-      
40
-      (if (eq 2 (length result ))
41
-	(car (last result))
42
-	result)))
43
-
44
-
45
-;; STRING STRING STRING STRING --> [VARYING]
46
-(defun data-get-ext (table column-name column-value variable)
47
-  "Return a bit of user data from the plist in the EXT column of the usertable."
48
-  (getf
49
-    (data-ext-plist table column-name column-value)
50
-    (read-from-string (string-upcase variable))))
51
-
52
-
53
-;; -------------------------------------
54
-
55
-
56
-;; STRING STRING VARYING --> NIL
57
-(defun data-set-col (table column-name column-value variable value)
58
-  "Set the value of a user's variable in their respective DB row."
59
-    (ignore-errors (db-cmd
60
-      (nih:string-combine
61
-	"update " table
62
-	" set " variable " = '" value "'"
63
-	" where " column-name " = '" column-value "';"))))
64
-
65
-
66
-;; STRING STRING STRING STRING VARYING --> NIL
67
-(defun data-set-ext (table column-name column-value variable value)
68
-  "Set the value of a row's PLIST under the column 'ext'."
69
-  (let ((variable (read-from-string (string-upcase variable)))
70
-	(variable-colon
71
-	  (read-from-string
72
-	    (nih:string-combine ":" (string-upcase variable))))
73
-	(plist (data-ext-plist table column-name column-value)))
74
-
75
-  (data-set-col
76
-    table column-name column-value
77
-    "ext"
78
-    (plist-set plist variable value))))
79
-
80
-
81
-;; -------------------------------------
82
-
83
-
84
-;; STRING STRING STRING
85
-(defun data-ext-plist (table column-name column-value)
86
-  "Return the 'ext' property-list of a row."
87
-  (read-from-string 
88
-    (cadr
89
-      (db-cmd
90
-	(nih:string-combine
91
-	  "select ext"
92
-	  " from " table
93
-	  " where " column-name " = '" column-value "';")))))
94
-
95
-
96
-;; -------------------------------------
97
-
98
-
99
-;; PLIST STRING VARYING [FUNCTION] --> PLIST
100
-(defun plist-set (plist variable value &key (test #'equal))
101
-  "Set a variable's value in a plist."
102
-  (let* ((var-pos (ignore-errors (position variable plist)))
103
-	(val-pos (1+ (nih:value-or var-pos 0))))
104
-  (if var-pos
105
-    (nih:replace-at plist (nth val-pos plist) value :test #'equal)
106
-    (concatenate 'list plist (list variable value)))))
107 0
deleted file mode 100644
... ...
@@ -1,35 +0,0 @@
1
-(defpackage :lambdamush-db
2
-  (:use :cl)
3
-  (:nicknames :lm-db)
4
-  (:export
5
-
6
-    ;; configuration
7
-    ;; ---------------------------------------
8
-    *db-name*
9
-    *db-type*
10
-
11
-    *db-username*
12
-    *db-password*
13
-
14
-    ;; basic.lisp
15
-    ;; ---------------------------------------
16
-    :db-cmd
17
-
18
-    :tablep
19
-    :columnp
20
-
21
-    :table-columns
22
-
23
-    :ensure-tables
24
-
25
-
26
-    ;; data.lisp
27
-    ;; ---------------------------------------
28
-    :data-get
29
-    :data-set))
30
-
31
-    
32
-
33
-
34
-
35
-(in-package :lambdamush-db)
36 0
deleted file mode 100644
... ...
@@ -1,65 +0,0 @@
1
-PACKAGES & NICK-NAMES
2
-* :fs
3
-	- :facilservil
4
-	- The library used by :lambdamush to create the actual TCP server
5
-* :lm
6
-	- :lambdamush itself
7
-* :lm-b
8
-	- :lambdamush-base
9
-	- A default "extension" to Lambdamush
10
-	- Provides all of the basic user-commands ("help", "say", and more)
11
-	- Provides the chat-system
12
-	- Provides the movement/object/room system
13
-
14
-Basically…
15
-	:fs provides the low-level server bits
16
-	:lm provides handy abstractions to allow MUSHes to be created
17
-	:lm-b provides the actual MUSH, but can be pretty easily replaced
18
-
19
-
20
-
21
-USER/CONNECTION/SOCKET HIERARCHY
22
-In the world of Lambdamush, there are three different ways to interact with and
23
-represent a single connection:
24
-
25
-* Socket
26
-	- The actual socket of their connection, as provided by :usockets
27
-	- As low-level as you can get; useless for our purposes
28
-	- usocket:SOCKET data-type
29
-
30
-* Client
31
-	- The abstraction of this created by :facilservil
32
-	- Middle-level; rarely useful
33
-	- An integer randomly assigned to a connection by :facilservil
34
-	- Can be used to store data related to a connection
35
-		+ dialogue-data, temp-username & temppassword (etc for
36
-		  registering or logging in) are stored to client-data
37
-		+ Stored with `fs:client-data-set`
38
-		+ Fetched with `fs:client-data-get`
39
-		+ *All* data stored "to" a client with these functions is put
40
-		  directly into memory.
41
-	- Can be used to write text to, with `facilservil:client-write`
42
-
43
-* User
44
-	- The abstraction of this created by :lambdamush
45
-	- Highest-level; the most useful for our purposes
46
-	- A string (username) assigned to a client upon them registering or
47
-	  logging in through the default dialogue (lm-b:*d-welcome*)
48
-	- Can be used to store data related to a conenction
49
-		+ Stored with `lm:user-data-set`
50
-		+ Fetched with `lm:user-data-get`
51
-		+ Data is fetched from the user-file or memory (depending on if
52
-		  it's already been accessed)
53
-		+ Data is set to memory until written to file after
54
-		  `lm:user-data-write` has been executed
55
-
56
-Basically…
57
-	The hierarchy is SOCKET --> CLIENT --> USER.
58
-
59
-	When hacking on :LM itself, use USER as much as posible, sometimes
60
-	CLIENT, but *never* SOCKET.
61
-
62
-	When hacking on an :LM extension (like :LM-B), try to always use USER,
63
-	and never CLIENT or SOCKET.
... ...
@@ -2,41 +2,7 @@
2 2
  :version "0.1"
3 3
  :author "Jaidyn Lev <jadedctrl@teknik.io>"
4 4
  :license "GPLv3"
5
- :depends-on ("facilservil" "cl-dbi" "nih" "alexandria")
6
- :components
7
-
8
- ((:module "src"
9
-   :components
10
-   ((:file "package")
11
-    (:file "../base/package")
12
-    (:file "../db/package")
13
-    (:file "dialogue")
14
-    (:file "cli")
15
-    (:file "account")
16
-    (:file "data")
17
-    (:file "user")
18
-    (:file "misc")
19
-    (:file "server")))
20
-
21
-  (:module "db"
22
-   :components
23
-   ((:file "package")
24
-    (:file "basic")
25
-    (:file "data")))
26
-
27
-  (:module "base"
28
-   :components
29
-   ((:file "package")
30
-    (:file "comms")
31
-    (:file "main")
32
-    (:file "info")
33
-    (:file "object")
34
-    (:file "utilization")
35
-    (:file "location")
36
-    (:file "transportation")
37
-    (:file "dialogue/d-welcome")
38
-    (:file "dialogue/d-login")
39
-    (:file "dialogue/d-register"))))
40
-
5
+ :depends-on ("facilservil")
6
+ :components ((:file "lambdamush"))
41 7
  :description
42 8
  "Extensible MUSH-like server written in pure Common Lisp. <3")
43 9
new file mode 100644
... ...
@@ -0,0 +1,16 @@
1
+;; This file is free software: you can redistribute it and/or modify
2
+;; it under the terms of version 3 of the GNU General Public License
3
+;; as published by the Free Software Foundation.
4
+;;
5
+;; This program is distributed in the hope that it will be useful,
6
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
7
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
8
+;; GNU General Public License for more details.
9
+
10
+(defpackage :lambdamush
11
+  (:use :cl)
12
+  (:export))
13
+
14
+(in-package :lambdamush)
15
+
16
+;; —————————————————————————————————————
0 17
deleted file mode 100644
... ...
@@ -1,62 +0,0 @@
1
-(in-package :lambdamush)
2
-
3
-;; -------------------------------------
4
-;; account log-in
5
-
6
-;; STRING STRING --> BOOLEAN
7
-(defun loginp (username password)
8
-  "Return whether or not a username/password combo is valid."
9
-
10
-  (let ((real-password (user-get username "password")))
11
-    (if (equal password real-password)
12
-      'T
13
-      nil)))
14
-
15
-
16
-;; NUMBER STRING --> NIL
17
-(defun login-client (client user)
18
-  "Login a client to a user account. (Set necessary globals, send welcome, etc.
19
-					  Buncha side-effects)."
20
-
21
-  (setq *user-client*
22
-	(concatenate 'list
23
-		     *user-client*
24
-		     (list (list user client))))
25
-
26
-  (login-announce client user))
27
-
28
-
29
-;; NUMBER STRING
30
-(defun login-announce (client user)
31
-  "Announce a client's logging in-- not only to them, but to everyone else,
32
-  too (of course)!"
33
-
34
-  (user-write
35
-    user
36
-    (nih:string-combine
37
-      (cl-ppcre:regex-replace
38
-	"%B"
39
-	(cl-ppcre:regex-replace "%A" *login-message* (user-name user))
40
-	user))
41
-    'T)
42
-
43
-  (user-broadcast
44
-    (cl-ppcre:regex-replace
45
-      "%A"
46
-      *login-announce*
47
-      (user-name user))
48
-    'T user))
49
-
50
-
51
-
52
-
53
-;; -------------------------------------
54
-;; account registration
55
-
56
-;; STRING STRING STRING STRING --> NIL
57
-(defun user-create (username password name gender)
58
-  "Create a new user with given username, password, and gender."
59
-  (lm-db:db-cmd
60
-    (nih:string-combine
61
-      "insert into users (username, password, name, gender, location)"
62
-      " values ('" username "', '" password "', '" name "', '" gender "', 0);")))
63 0
deleted file mode 100644
... ...
@@ -1,63 +0,0 @@
1
-(in-package :lambdamush)
2
-
3
-(defvar lm:*cmd-list* '())
4
-
5
-;; STRING --> BOOLEAN
6
-(defun cmdp (string)
7
-  "Return whether or not a command of the provided name exists."
8
-  (cmd-name-pair string))
9
-
10
-
11
-;; STRING --> LIST
12
-(defun cmd-name-pair (name)
13
-  "Return the command-pair of a command by a name or nickname."
14
-
15
-  (let ((result nil))
16
-    (mapcar
17
-      (lambda (cmd)
18
-	(if (position name cmd :test 'equalp)
19
-	  (setq result cmd)
20
-	  nil))
21
-      *cmd-list*)
22
-    result))
23
-
24
-
25
-;; SYMBOL --> LIST
26
-(defun cmd-function-pair (function-name)
27
-  "Return the command-pair of a command by its function."
28
-
29
-  (let ((result nil))
30
-    (mapcar
31
-      (lambda (cmd)
32
-	(if (position function-name cmd :test 'equal)
33
-	  (setq result cmd)
34
-	  nil))
35
-      *cmd-list*)
36
-
37
-    result))
38
-
39
-
40
-;; STRING --> SYMBOL
41
-(defun cmd-name-to-function (name)
42
-  "Return the function-name of a command, from its name."
43
-  (car (last (cmd-name-pair name))))
44
-
45
-
46
-;; SYMBOL --> STRING
47
-(defun cmd-function-to-name (function-name)
48
-  "Return the names of a command, from its function-name."
49
-  (reverse (cdr (reverse (cmd-function-pair function-name)))))
50
-
51
-(defmacro make-cmd-list (function-name names docs usage)
52
-  (concatenate 'list
53
-	       names `(,docs ,usage ,function-name)))
54
-
55
-(defun cmd-register (function-name names doc usage)
56
-  (setq
57
-     lm:*cmd-list*
58
-     (concatenate
59
-       'list lm:*cmd-list*
60
-       (list
61
-	 (concatenate
62
-	   'list names (list (nih:string-combine doc #\Newline usage)
63
-			     function-name))))))
64 0
deleted file mode 100644
... ...
@@ -1,113 +0,0 @@
1
-(in-package :lambdamush)
2
-
3
-;; -------------------------------------
4
-;; file stuff
5
-
6
-;; STRINGS --> STRING
7
-(defun rel-path (&rest files)
8
-  "Return a file-path relative to the LM data directory, made up of strings
9
-  passed to it.
10
-  Example:
11
-  (rel-path 'nerd' 'dude') --> 'data/nerd/dude'"
12
-
13
-  (setq files (list-reduce files))
14
-  (fs:journal files "Files" "rel-path")
15
-
16
-
17
-  (setq files
18
-	(concatenate 'list
19
-		     (list (string-right-trim "/" *data-path*)) files))
20
-  (reduce
21
-    (lambda (a b)
22
-      (nih:string-combine a b :seperator "/"))
23
-    files))
24
-
25
-
26
-(defun rel-read (&rest files)
27
-  "Read a string from a (relative to *data-dir*) file
28
-  Example: to read from 'data/users/nerd', run:
29
-  (rel-read 'hi' 'users' 'nerd')"
30
-
31
-  (alexandria:read-file-into-string
32
-    (rel-path files)
33
-    :external-format :utf-8))
34
-
35
-
36
-;; STRING STRINGS --> NIL
37
-(defun rel-write (string &rest files)
38
-  "Write a string into a (relative to *data-dir*) file
39
-  Example: to write 'hi' to 'data/users/nerd', run:
40
-  (rel-write 'hi' 'users' 'nerd')"
41
-
42
-  (alexandria:write-string-into-file
43
-    string
44
-    (rel-path files)
45
-    :if-exists :overwrite
46
-    :if-does-not-exist :create
47
-    :external-format :utf-8))
48
-
49
-
50
-;; -------------------------------------
51
-
52
-
53
-;; STRINGS --> PLIST
54
-(defun rel-read-plist (&rest files)
55
-  "Read a relatively-pathed file into a plist."
56
-  (string-to-plist (rel-read files)))
57
-
58
-
59
-;; PLIST STRINGS --> NIL
60
-(defun rel-write-plist (plist &rest files)
61
-  "Write a plist into a relatively-pathed (to *data-path*) file."
62
-  (rel-write (plist-to-string plist) files))
63
-
64
-;; -------------------------------------
65
-
66
-;; STRING [VARYING] STRINGS --> NIL
67
-(defun rel-file-set (variable value &rest files)
68
-  "Replace/add a colon-value to a relative file."
69
-
70
-  (rel-file-write
71
-    (nih:replace-colon-value
72
-      (rel-file-read files)
73
-      (nih:string-combine ":" variable)
74
-      value)
75
-    files))
76
-
77
-
78
-;; STRING STRINGS --> [VARYING]
79
-(defun rel-file-get (variable &rest files)
80
-  "Return a colon-value from a relative file."
81
-
82
-  (nih:get-colon-value
83
-    (rel-file-read files)
84
-    (nih:string-combine ":" variable)))
85
-
86
-;; -------------------------------------
87
-
88
-;; PLIST --> STRING
89
-(defun plist-to-string (plist)
90
-  "Convert a plist into a multi-line colon-value'd string."
91
-
92
-  (let ((keys (nih:evens plist))
93
-	(values (nih:odds plist))
94
-	(stack "")
95
-	(i 0))
96
-
97
-    (loop
98
-      :while (< i (length keys))
99
-      :do
100
-      (setq stack
101
-	    (nih:string-combine
102
-	      stack
103
-	      (format nil ":~A ~A")
104
-	      :seperator #\Newline))
105
-      (setq i (+ 1 i)))
106
-
107
-    stack))
108
-
109
-
110
-;; STRING --> PLIST
111
-(defun string-to-plist (string)
112
-  "Convert a colon-value string into a plist."
113
-  (nih:get-colon-values string))
114 0
deleted file mode 100644
... ...
@@ -1,200 +0,0 @@
1
-(in-package :lambdamush)
2
-
3
-
4
-;; -------------------------------------
5
-;; globals
6
-
7
-(defvar *client-dialogue* (make-hash-table))
8
-
9
-(defvar *r*)
10
-(defvar *rsocket*)
11
-(defvar *rclient*)
12
-
13
-
14
-;; NIL --> NIL
15
-(defun dialogue-global-clean ()
16
-  "Reset all global variables related to dialogue."
17
-
18
-  (setq *r* nil)
19
-  (setq *rsocket* nil)
20
-  (setq *rclient* nil))
21
-
22
-
23
-
24
-;; -------------------------------------
25
-;; clients & dialogues
26
-
27
-;; CLIENT --> BOOLEAN
28
-(defun client-dialoguep (client)
29
-  "Return whether or not a client is in the middle of a dialogue."
30
-  (client-question-get client))
31
-
32
-;; CLIENT --> ???
33
-(defun client-dialogue-get (client)
34
-  (car (client-dialogue-pair client)))
35
-
36
-
37
-;; CLIENT --> ???
38
-(defun client-question-get (client)
39
-  (cadr (client-dialogue-pair client)))
40
-
41
-
42
-;; CLIENT --> LIST
43
-(defun client-dialogue-pair (client)
44
-  "Get a client's dialogue-related data-pair."
45
-
46
-  (fs:client-data-get client "dialogue"))
47
-
48
-
49
-;; CLIENT QUESTION --> NIL
50
-(defun client-question-set (client question)
51
-  "Set a client's dialogue to a different question within the same dialogue."
52
-
53
-  (let ((dialogue (client-dialogue-get client)))
54
-    (client-dialogue-set client dialogue question)))
55
-
56
-(defun client-dialogue-set (client dialogue question)
57
-  "Set a client's dialogue to a set a dialogue and question."
58
-
59
-  (if (and (not dialogue) (not question))
60
-    (fs:client-data-set client "dialogue" nil)
61
-    (fs:client-data-set client "dialogue" (list dialogue question))))
62
-
63
-
64
-
65
-
66
-;; -------------------------------------
67
-;; execution
68
-
69
-;; DIALOGUE QUESTION-KEY --> DIALOGUE_QUESTION
70
-(defun question-get (dialogue question-key)
71
-  "Return a specific question from a dialogue."
72
-  (nih:getf-string dialogue question-key))
73
-
74
-
75
-;; DIALOGUE QUESTION-KEY --> STRING
76
-(defun question-prompt (dialogue question-key)
77
-  "Return the 'prompt' of a dialogue question-- the 'question string'."
78
-  (format nil "~%~A" (cadr (question-get dialogue question-key))))
79
-
80
-
81
-;; LIST VALUE --> [VARYING]
82
-(defun question-exec (dialogue question response socket client)
83
-  "Interpret a dialogue's question, determined by the user's answer.
84
-  Anything returned is written to the user's socket."
85
-
86
-  (setq *r* response)
87
-  (setq *rsocket* socket)
88
-  (setq *rclient* client)
89
-
90
-    (eval (question-make-cond
91
-	    (question-get dialogue question)))
92
-
93
-  (dialogue-global-clean))
94
-
95
-
96
-
97
-
98
-;;--------------------------------------
99