Commit bd8ea51a authored by David Byers's avatar David Byers
Browse files

Fixed bugs in use of lyskom-read-conf-no and in a couple of strings.

parent d7be23a4
No preview for this file type
......@@ -223,7 +223,7 @@ as TYPE. If no such misc-info, return NIL"
(let* ((tono (or pers-no
(lyskom-read-conf-no
(lyskom-get-string 'who-letter-to)
'all)))
'all nil nil t)))
(conf-stat (blocking-do 'get-conf-stat tono)))
(if (if (zerop (conf-stat->msg-of-day conf-stat))
t
......@@ -911,7 +911,7 @@ Don't ask for confirmation."
(lyskom-change-pres-or-motd-2
(let ((no (lyskom-read-conf-no
(lyskom-get-string 'what-to-change-pres-you)
'all t)))
'all t nil t)))
(if (zerop no)
(setq no lyskom-pers-no))
(blocking-do 'get-conf-stat no))
......@@ -923,7 +923,7 @@ Don't ask for confirmation."
(interactive)
(lyskom-change-pres-or-motd-2
(let ((no (lyskom-read-conf-no (lyskom-get-string 'who-to-put-motd-for)
'all t)))
'all t nil t)))
(if (zerop no)
(setq no lyskom-pers-no))
(blocking-do 'get-conf-stat no))
......@@ -1368,7 +1368,7 @@ If MARK-NO == 0, review all marked texts."
"Change the password for a person."
(interactive)
(let ((pers-no (lyskom-read-conf-no (lyskom-get-string 'whos-passwd)
'pers 'empty ""))
'pers 'empty "" t))
(old-pw (silent-read (lyskom-get-string 'old-passwd)))
(new-pw1 (silent-read (lyskom-get-string 'new-passwd)))
(new-pw2 (silent-read (lyskom-get-string 'new-passwd-again))))
......@@ -1467,7 +1467,7 @@ MY-SESSION-NO is the session number of the running session.
'lyskom-insert)))
(funcall insertfun
(lyskom-return-who-info-line-as-state
(format "%4d%s"
(format "%5d%s"
(who-info->connection who-info)
(if (= my-session-no (who-info->connection who-info))
"*"
......@@ -1498,10 +1498,12 @@ MY-SESSION-NO is the session number of the running session.
(defun lyskom-return-who-info-line-as-state (prefix arg1 arg2)
"Return the format state appropriate for the arguments and
the window width."
(let ((formatstring
(let* ((adj1 (+ (length prefix) 2))
(adj2 (+ adj1 1))
(formatstring
(concat prefix
"%=-"
(int-to-string (/ (* 37 (- (lyskom-window-width) 7)) 73))
(int-to-string (/ (* 37 (- (lyskom-window-width) adj1)) 73))
(if (lyskom-conf-stat-p arg1)
(if (conf-type->letterbox
(conf-stat->conf-type arg1))
......@@ -1509,7 +1511,7 @@ the window width."
"#1M")
"#1s")
" %=-"
(int-to-string (/ (* 37 (- (lyskom-window-width) 8)) 73))
(int-to-string (/ (* 37 (- (lyskom-window-width) adj2)) 73))
(if (lyskom-conf-stat-p arg2)
(if (conf-type->letterbox
(conf-stat->conf-type arg2))
......
......@@ -119,7 +119,7 @@ otherwise: the conference is read with lyskom-completing-read."
(let ((conf-no
(or conf-no
(lyskom-read-conf-no (lyskom-get-string 'conf-for-status)
'all)))
'all nil nil t)))
conf-stat)
(cache-del-conf-stat conf-no)
(setq conf-stat (blocking-do 'get-conf-stat conf-no))
......@@ -292,7 +292,7 @@ otherwise: the conference is read with lyskom-completing-read."
(let ((pers-no
(or pers-no
(lyskom-read-conf-no (lyskom-get-string 'pers-for-status)
'pers "")))
'pers "" nil t)))
conf-stat
pers-stat)
(cache-del-conf-stat pers-no)
......@@ -495,7 +495,7 @@ otherwise: the conference is read with lyskom-completing-read."
(if (string-match "^19" emacs-version)
(cons lyskom-last-personal-message-sender 0)
lyskom-last-personal-message-sender)
"")))))
""))) t))
message))
......@@ -1373,7 +1373,7 @@ membership info."
(interactive)
(let* ((conf-no (lyskom-read-conf-no
(lyskom-get-string 'what-conf-to-change)
'confs nil ""))
'confs nil "" t))
(open (j-or-n-p (lyskom-get-string 'anyone-member)))
(secret (if (not open)
(j-or-n-p (lyskom-get-string 'secret-conf))))
......
......@@ -335,6 +335,7 @@ and you have finished reading. Please come back later.
(your-memberships . "Your LysKOM conference subscriptions:\n")
(memberships-header . "Last access Prio Unread Conference\n")
(memberships-line . "%#16s %#2d\t%#3d\t%#4M\n")
(conf-for-status . "Get status of which conference: ")
(no-such-conf . "The conference doesn't exist.")
......
......@@ -482,7 +482,8 @@ Otherwise return nil."
t
(or (and (conf-stat->conf-no conf-stat)
(conf-stat->name conf-stat))
"")))
"")
t))
(if (/= conf 0)
(setq filter (cons (cons 'recipient-no conf) filter)))
(setq action (lyskom-filter-read-action))
......@@ -519,7 +520,8 @@ Otherwise return nil."
t
(or (and auth-stat
(conf-stat->name auth-stat))
"")))
"")
t))
(if (/= author 0)
(setq filter (cons (cons 'author-no author) filter)))
(setq conf (lyskom-read-conf-no
......@@ -529,7 +531,8 @@ Otherwise return nil."
(or
(and conf-stat
(conf-stat->name conf-stat))
"")))
"")
t))
(if (/= conf 0)
(setq filter (cons (cons 'recipient-no conf) filter)))
(setq action (lyskom-filter-read-action))
......@@ -606,7 +609,8 @@ the current text"
'all t
(or (and (conf-stat->conf-no conf-stat)
(conf-stat->name conf-stat))
"")))
"")
t))
(if (/= conf 0)
(setq filter (cons (cons 'recipient-no conf) filter)))
(setq action (lyskom-filter-read-action))
......
......@@ -171,8 +171,11 @@ Handler to implement remote control of the ansaphone."
(string-match
"^Remote-command: \\([0-9]+\\) \\([0-9]+\\)\n\\(.*\\)\n\\(\\(\n\\|.\\)*\\)$"
text)))
(is-trusted (memq (conf-stat->conf-no sender)
kom-remote-controllers)))
(is-trusted (or (memq (conf-stat->conf-no sender)
kom-remote-controllers)
(and kom-self-control
(eq (conf-stat->conf-no sender)
lyskom-pers-no)))))
(cond ((not is-remote) nil)
(is-from-me t)
((not is-to-me) t)
......
......@@ -89,7 +89,7 @@ The defaults for this command is the conference that you are in."
((< count 0)
(lyskom-format 'first-n (- count))))))
(by (lyskom-read-conf-no (lyskom-format 'info-by-whom info)
'pers 'empty))
'pers 'empty nil t))
(to (lyskom-read-conf-no (lyskom-format 'info-to-conf info)
'all
;; If person is not given we must give
......@@ -99,7 +99,8 @@ The defaults for this command is the conference that you are in."
""
(conf-stat->name
(blocking-do 'get-conf-stat
lyskom-current-conf))))))
lyskom-current-conf)))
t)))
;; Since we fetch everything anyway we don't need to do this. If
;; we later choose to fetch all in small chunks we will have to do
......
......@@ -345,7 +345,7 @@ du har l\344st klart allting. Kom tillbaks senare.
(your-memberships . "Ditt medlemskap i olika KOM-m\366ten:\n")
(memberships-header . "Senast inne Prio Ol\344sta M\366tesnamn\n")
(memberships-line . "%#1s %#2d\t%#3d\t%#4M\n")
(memberships-line . "%#16s %#2d\t%#3d\t%#4M\n")
(conf-for-status . "Vilket m\366te vill du se statusen f\366r? ")
(no-such-conf . "M\366tet finns ej.")
(status-record . "Status f\366r m\366te %#1M (%#2m) %#3s\n\n")
......
......@@ -714,7 +714,13 @@ This is used by the command kom-busy-wait.")
"*t if LysKOM may be remotely controlled.")
(defvar kom-remote-controllers nil
"*Persons who may control LysKOM using messages.")
"*Persons who may control LysKOM using messages.By default you can
always control your own sessions. See kom-self-control for more
information.")
(defvar kom-self-control t
"*If non-nil, remote control commands are accepted from sessions logged
in as the same user as the current session.")
(defvar kom-permanent-filter-list nil
"*List of patterns to filter permanently")
......@@ -930,7 +936,7 @@ the value of kom-tell-phrases for fun.")
(make-face 'kom-presence-face)
(make-face-italic 'kom-presence-face nil t)
(set-face-foreground 'kom-presence-face
"Gray")))
"DimGray")))
(progn
(lyskom-make-face 'kom-active-face
(copy-face 'underline 'kom-active-face))
......
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