diff options
-rw-r--r-- | README.org | 5 | ||||
-rw-r--r-- | posterbot.lisp | 2 |
2 files changed, 6 insertions, 1 deletions
@@ -21,7 +21,10 @@ git checkout origin/develop (in-package :posterbot) -(let ((bot (make-instance 'posterbot :ssl nil :user-id "mybotaccount" :homeserver "localhost:8008"))) +(let ((bot (make-instance 'posterbot + :ssl nil + :user-id "mybotaccount" + :homeserver "localhost:8008"))) (login bot "mybotaccount" "mypassword") (start bot)) diff --git a/posterbot.lisp b/posterbot.lisp index d2d3531..be61382 100644 --- a/posterbot.lisp +++ b/posterbot.lisp @@ -33,6 +33,8 @@ the downloaded file." (t type))))) (defun handle-link-candiate (word) + "Checks if WORD is an HTTP URI pointing to an image resource. If it +is, downloads the image and posts it to the current room." (let ((link (ppcre:scan-to-strings +image-link-regex+ word))) (when link (let* ((file-path (download-link link)) |