Commit c0cc50d2 authored by David Kågedal's avatar David Kågedal
Browse files

(lyskom-get-recipients-from-misc-list): Ny funktion.

(lyskom-change-pres-or-motd-2): Använd samma mottagare som den
förra presentationen som default.
parent b4e376c3
......@@ -928,6 +928,22 @@ Don't ask for confirmation."
'motd))
(defun lyskom-get-recipients-from-misc-list (misc-list)
"Return a misc-info-list containing only the recipients."
(let* ((info (car misc-list))
(type (misc-info->type info)))
(cond ((null misc-list) '())
((or (eq type 'RECPT)
(eq type 'CC-RECPT))
(append (list (intern (downcase (symbol-name type)))
(misc-info->recipient-no info))
(lyskom-get-recipients-from-misc-list
(cdr misc-list))))
(t
(lyskom-get-recipients-from-misc-list
(cdr misc-list))))))
(defun lyskom-change-pres-or-motd-2 (conf-stat type)
"Change the presentation or motd of CONF-STAT.
TYPE is either 'pres or 'motd, depending on what should be changed."
......@@ -939,22 +955,28 @@ TYPE is either 'pres or 'motd, depending on what should be changed."
(= lyskom-pers-no (conf-stat->conf-no conf-stat)))
(lyskom-dispatch-edit-text
lyskom-proc
(apply 'lyskom-create-misc-list
(append (list 'recpt
(cond
((eq type 'motd)
(server-info->motd-conf lyskom-server-info))
((eq type 'pres)
(if (conf-type->letterbox
(conf-stat->conf-type conf-stat))
(server-info->pers-pres-conf
lyskom-server-info)
(server-info->conf-pres-conf
lyskom-server-info)))))
(if (and (eq type 'pres)
(not (zerop (conf-stat->presentation conf-stat))))
(list 'comm-to
(conf-stat->presentation conf-stat)))))
(apply
'lyskom-create-misc-list
(if (and (eq type 'pres)
(not (zerop (conf-stat->presentation conf-stat))))
(append
(lyskom-get-recipients-from-misc-list
(text-stat->misc-info-list
(blocking-do 'get-text-stat
(conf-stat->presentation conf-stat))))
(list 'comm-to
(conf-stat->presentation conf-stat)))
(list 'recpt
(cond
((eq type 'motd)
(server-info->motd-conf lyskom-server-info))
((eq type 'pres)
(if (conf-type->letterbox
(conf-stat->conf-type conf-stat))
(server-info->pers-pres-conf
lyskom-server-info)
(server-info->conf-pres-conf
lyskom-server-info)))))))
(conf-stat->name conf-stat)
(let ((text-mass (blocking-do 'get-text
(cond
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment