Commit 2accdc29 authored by Linus Tolke Y's avatar Linus Tolke Y
Browse files

Added set-permitted-submitters.

parent 4106da47
Sun Jul 5 05:02:37 1992 Linus Tolke Y (linus@lysator)
* completing-read.el (lyskom-completing-read-conf-stat-handler):
Fixed a bug when using 'empty, it returned nil instead of 0.
* commands2.el (kom-set-permitted-submitters): Added a possibility
to set permitted submitters.
Changes to: kom-set-super-conf,
lyskom-set-conf-for-conf* (was: lyskom-set-super-conf*...).
* commands1.el (lyskom-return-who-info-line): Now removes all
ending spaces.
......
......@@ -1088,6 +1088,21 @@ Format is 23:29 if the text is written today. Otherwise 04-01."
(lyskom-end-of-command))
;;; ================================================================
;;; S{tt till}tna f|rfattare - set-permitted-submitters
;;; Author: Linus Tolke
(defun kom-set-permitted-submitters ()
"Set the permitted submitters of a conference."
(interactive)
(lyskom-start-of-command 'kom-set-permitted-submitters)
(lyskom-completing-read-conf-stat
'main 'lyskom-set-conf-for-conf
(lyskom-get-string 'conf-to-set-permitted-submitters-q)
nil nil "" 'permitted-submitters))
;;; ================================================================
;;; [ndra superm|te - Set super conference
......@@ -1099,37 +1114,57 @@ Format is 23:29 if the text is written today. Otherwise 04-01."
(interactive)
(lyskom-start-of-command 'kom-set-super-conf)
(lyskom-completing-read-conf-stat
'main 'lyskom-set-super-conf
'main 'lyskom-set-conf-for-conf
(lyskom-get-string 'conf-to-set-super-conf-q)
nil nil ""))
nil nil "" 'super-conf))
(defun lyskom-set-super-conf (conf-stat)
"Set the super conference value for CONF-STAT."
(defun lyskom-set-conf-for-conf (conf-stat type)
"Set the super conference of permitted submitters value for CONF-STAT.
Which it is depends on the value of the TYPE parameter."
(if (not conf-stat)
(progn
(lyskom-insert-string 'somebody-deleted-that-conf)
(lyskom-end-of-command))
(lyskom-completing-read-conf-stat
'main 'lyskom-set-super-conf-2
(lyskom-get-string 'new-super-conf-q)
nil nil "" conf-stat)))
(defun lyskom-set-super-conf-2 (super-conf conf-stat)
"Set the super conference value for CONF-STAT to SUPER-CONF.
Args: SUPER-CONF CONF_STAT"
(lyskom-format-insert 'super-conf-for-is
(conf-stat->name conf-stat)
(conf-stat->name super-conf))
(initiate-set-super-conf 'main 'lyskom-set-super-conf-3
(conf-stat->conf-no conf-stat)
(conf-stat->conf-no super-conf)
conf-stat))
(defun lyskom-set-super-conf-3 (answer conf-stat)
"Get the answer from lyskom-set-super-conf and report the result."
'main 'lyskom-set-conf-for-conf-2
(lyskom-format (if (eq type 'super-conf)
'new-super-conf-q
'new-permitted-submitters-q)
(conf-stat->name conf-stat))
nil (if (eq type 'permitted-submitters)
'empty) "" conf-stat type)))
(defun lyskom-set-conf-for-conf-2 (super-conf conf-stat type)
"Set the super conference or permitted submitters for CONF-STAT to SUPER-CONF.
Args: SUPER-CONF CONF_STAT TYPE"
(if (and (eq type 'permitted-submitters)
(eq super-conf 0)) ;Allowing all to write there.
(progn
(lyskom-format-insert 'permitted-submitters-removed-for-conf
(conf-stat->name conf-stat))
(initiate-set-permitted-submitters 'main 'lyskom-set-conf-for-conf-3
(conf-stat->conf-no conf-stat) 0
conf-stat type))
(lyskom-format-insert (if (eq type 'super-conf)
'super-conf-for-is
'submitters-conf-for-is)
(conf-stat->name conf-stat)
(conf-stat->name super-conf))
(if (eq type 'super-conf)
(initiate-set-super-conf 'main 'lyskom-set-conf-for-conf-3
(conf-stat->conf-no conf-stat)
(conf-stat->conf-no super-conf)
conf-stat type)
(initiate-set-permitted-submitters 'main 'lyskom-set-conf-for-conf-3
(conf-stat->conf-no conf-stat)
(conf-stat->conf-no super-conf)
conf-stat type))))
(defun lyskom-set-conf-for-conf-3 (answer conf-stat type)
"Get the answer from lyskom-set-conf-for-conf and report the result."
(if (not answer)
(lyskom-insert-string 'nope)
(lyskom-insert-string 'done)
......
......@@ -55,10 +55,13 @@ ARGS: QUEUE HANDLER PROMPT TYPE NEW INITIAL &rest DATA"
(defun lyskom-completing-read-conf-stat-handler (conf-no queue handler &rest data)
"Take CONF-NO (returned by lyskom-completing-read) and send it through QUEUE
to HANDLER using initiate-get-conf-stat. Also send DATA to it."
(if data
(apply 'initiate-get-conf-stat queue handler conf-no data)
(initiate-get-conf-stat queue handler conf-no)))
to HANDLER using initiate-get-conf-stat. Also send DATA to it.
If we had the empty conf-no could be 0. Then we shall return 0."
(if (eq conf-no 0)
(apply handler 0 data)
(if data
(apply 'initiate-get-conf-stat queue handler conf-no data)
(initiate-get-conf-stat queue handler conf-no))))
(defvar lyskom-completing-map nil
......
This diff is collapsed.
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