add rollcall and anna commands

master
opfez 2021-04-08 14:40:40 +00:00
parent 6edfce6605
commit 75f1f2f0a1
1 changed files with 4 additions and 1 deletions

View File

@ -73,7 +73,10 @@
(cond
((equal? (car data) "PING")
(pong stream))
((equal? ":.eval" (slist-ref data 3))
((or (equal? ":!rollcall" (slist-ref data 3))
(equal? ":!anna" (slist-ref data 3)))
(send-message stream +channel+ "Hello! I respond to !rollcall, !anna, and !eval <s-expr>."))
((equal? ":!eval" (slist-ref data 3))
(let* ((expr (string-concatenate (intersperse " " (cdr (member ":eval" data))))))
(send-message stream +channel+ (eval (read (open-input-string expr))
(interaction-environment)))))