|
|
@@ -140,7 +140,7 @@
|
|
|
(when (> id *akb-last-id*)
|
|
|
(send-akb (format-akb post))
|
|
|
(setf *akb-last-id* id)
|
|
|
- (save-settings))))
|
|
|
+ (save-settings))))
|
|
|
(error (e) (log:error e))))
|
|
|
|
|
|
(defun send-akb (text)
|
|
|
@@ -235,7 +235,7 @@
|
|
|
(push user users)
|
|
|
(telegram-send-message chat-id (format nil "Теперь палим ~A" username)))))))
|
|
|
(setf (gethash chat-id *fsq-send-to*) users)
|
|
|
- (save-settings))))
|
|
|
+ (save-settings))))
|
|
|
(error (e)
|
|
|
(log:error e)
|
|
|
(telegram-send-message chat-id "Ошибочка вышла"))))
|
|
|
@@ -292,17 +292,17 @@
|
|
|
|
|
|
(defun save-settings()
|
|
|
(with-open-file (s (merge-pathnames "settings.lisp"
|
|
|
- (asdf:component-pathname
|
|
|
- (asdf:find-system '#:chatikbot)))
|
|
|
- :direction :output
|
|
|
- :if-exists :supersede
|
|
|
- :if-does-not-exist :create)
|
|
|
+ (asdf:component-pathname
|
|
|
+ (asdf:find-system '#:chatikbot)))
|
|
|
+ :direction :output
|
|
|
+ :if-exists :supersede
|
|
|
+ :if-does-not-exist :create)
|
|
|
(write '(in-package #:chatikbot) :stream s)
|
|
|
(write
|
|
|
`(setf *fsq-send-to* (alexandria:alist-hash-table ',(alexandria:hash-table-alist *fsq-send-to*))
|
|
|
- *chat-locations* ',*chat-locations*
|
|
|
- *akb-send-to* ',*akb-send-to*
|
|
|
- *akb-last-id* ,*akb-last-id*)
|
|
|
+ *chat-locations* ',*chat-locations*
|
|
|
+ *akb-send-to* ',*akb-send-to*
|
|
|
+ *akb-last-id* ,*akb-last-id*)
|
|
|
:stream s)))
|
|
|
|
|
|
(defun start ()
|
|
|
@@ -316,9 +316,9 @@
|
|
|
(bordeaux-threads:destroy-thread old-updates)))
|
|
|
;; Load settings file
|
|
|
(alexandria:when-let (file (probe-file
|
|
|
- (merge-pathnames "settings.lisp"
|
|
|
- (asdf:component-pathname
|
|
|
- (asdf:find-system '#:chatikbot)))))
|
|
|
+ (merge-pathnames "settings.lisp"
|
|
|
+ (asdf:component-pathname
|
|
|
+ (asdf:find-system '#:chatikbot)))))
|
|
|
(load file))
|
|
|
;; Start timers
|
|
|
(clon:schedule-function
|