From 94f31a5e1ff502fa12fb6a27c1f9b8b0854e3ad4 Mon Sep 17 00:00:00 2001 From: Boutade Date: Wed, 25 Sep 2019 15:04:53 -0500 Subject: added HARDCOPY slot to CLIENT. --- examples/shell-echo-bot.lisp | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'examples/shell-echo-bot.lisp') diff --git a/examples/shell-echo-bot.lisp b/examples/shell-echo-bot.lisp index f7bca56..6cd9f1b 100644 --- a/examples/shell-echo-bot.lisp +++ b/examples/shell-echo-bot.lisp @@ -1,10 +1,22 @@ (defclass shell-echo-bot (granolin:client granolin::message-log) ()) -(defvar *bot* (make-instance 'shell-echo-bot - :homeserver "https://matrix.hrlo.world" - :output *standard-output*)) +(defvar *bot* + (make-instance 'shell-echo-bot + :hardcopy (merge-pathnames ".shell-echo-bot.conf" + (user-homedir-pathname)) + :homeserver "https://matrix.hrlo.world" + :output *standard-output*)) +;; a script to login if necessary, and then start the bot +(unless (access-token *bot*) + (princ "Log in to the server:") + (terpri) + (granolin:login *bot* + (and (princ "username: ") (read-line)) + (and (princ "password: ") (read-line)))) + +(start *bot*) -- cgit v1.2.3