Commit 7a6d3419 authored by David Byers's avatar David Byers
Browse files

Per recipient group message beeps.

Per sender personal/alarm message beeps.
Silence when the ansaphone is on.
parent 63bfb285
1999-06-28 David Byers <davby@ida.liu.se>
* vars.el.in (kom-silent-ansaphone): New variable.
* lyskom-rest.el (lyskom-beep): Allow alist argument.
Mon Jun 28 17:15:28 1999 David Byers <davby@sen2.ida.liu.se>
* Release 0.46-BETA-5
......
......@@ -205,7 +205,7 @@ bilder f
skriver in parenteserna också. Problem uppstår till exempel om det
finns två möten "(På) TV" och "(Gamla) TV-spel erfarenhetsutbyte".
Om man skriver in "TV" så betraktas det inte som en exakt match.
FIX BY: 0.46-0.47
FIX BY: 0.46-0.47 KLART!
Man kan få oländiga loopar i completion. Just nu är det inte så
lätt, men det går fortfarande. Problemet uppstår då två teckern
......@@ -490,7 +490,7 @@ bilder f
till i servern som talar om för servern att inte garba ett inlägg.
Det i sin tur kräver att man fixar dbck att forcera garb av inlägg
med den här flaggan som inte borde ha den eller nåt sånt.
FIX BY: 0.46
FIX BY: 0.46 KLART!
** MARKERINGAR
......
......@@ -480,12 +480,15 @@ Non-nil NOBEEP means don't beep."
(setq when (substring when 4 19))
(setq when (substring when 11 19)))
(setq nobeep (or nobeep (and kom-ansaphone-on
kom-silent-ansaphone)))
(cond ((or (null recipient) ; Have been seen to be nil when
; listing recorded
; messages. Should it be?
; /davidk
(eq recipient 0)) ; Public message
(if (not nobeep) (lyskom-beep kom-ding-on-common-messages))
(if (not nobeep) (lyskom-beep kom-ding-on-common-messages sender))
(lyskom-format (lyskom-get-string-sol 'message-broadcast)
(cond
((stringp sender) sender)
......@@ -494,7 +497,7 @@ Non-nil NOBEEP means don't beep."
message
when))
((= (conf-stat->conf-no recipient) lyskom-pers-no) ; Private
(if (not nobeep) (lyskom-beep kom-ding-on-personal-messages))
(if (not nobeep) (lyskom-beep kom-ding-on-personal-messages sender))
(lyskom-format (lyskom-get-string-sol 'message-from)
(cond
((stringp sender) sender)
......@@ -503,7 +506,7 @@ Non-nil NOBEEP means don't beep."
message
when))
(t ; Group message
(if (not nobeep) (lyskom-beep kom-ding-on-group-messages))
(if (not nobeep) (lyskom-beep kom-ding-on-group-messages recipient))
(lyskom-format (lyskom-get-string-sol 'message-from-to)
message
(cond
......
......@@ -2069,8 +2069,7 @@ is alive."
"Add a FAQ to a conference"
(interactive (list (lyskom-read-conf-no 'conf-to-add-faq '(conf) nil nil t)
(lyskom-read-number 'text-to-add-as-faq)))
(let ((text (blocking-do 'get-text-stat text-no))
(current-faqs nil))
(let ((text (blocking-do 'get-text-stat text-no)))
(if (null text)
(lyskom-format-insert 'no-such-text-no text-no)
(lyskom-format-insert 'adding-faq text-no conf-no)
......
......@@ -2089,29 +2089,33 @@ in lyskom-messages."
;;; Faces and colors
;;;
(defun lyskom-beep (arg)
"Beep. ARG is how to beep.
(defun lyskom-beep (arg &optional optarg)
"Beep. ARG is how to beep. Optional OPTARG is a modifier.
nil means don't beep.
t means beep once.
A number means beep that number of times (.1 second delay between beeps).
A string means start the command kom-audio-player with the string as argument.
A symbol other than t means call it as a function."
A symbol other than t means call it as a function.
A list of pairs means OPTARG will be used as a key to look up the real
value of ARG. The special key t is used when OPTARG is not found."
(cond ((null arg))
((eq t arg) (ding t))
((numberp arg) (while (> arg 0)
(ding t)
(sit-for kom-ding-pause-amount)
(setq arg (1- arg))))
((stringp arg)
(condition-case nil
(start-process "audio" nil kom-audio-player arg)
(error nil)))
((and (symbolp arg)
(fboundp arg))
((stringp arg) (condition-case nil
(start-process "audio" nil kom-audio-player arg)
(error nil)))
((and (symbolp arg) (fboundp arg))
(condition-case nil
(funcall arg)
(error (message "Error in beep function")
(beep))))
((and (listp arg)
(or (assq optarg arg)
(assq t arg)))
(lyskom-beep (cdr (assq optarg arg)) optarg))
(t (beep))))
(defun lyskom-face-default-p (f1)
......
......@@ -818,6 +818,10 @@ part is optional. If it is not specified, port 80 is assumed.")
"t if automatic replies to personal messages are in effect."
local)
(def-kom-var kom-silent-ansaphone nil
"*Non-nil if messages should not cause beeps when the ansaphone is on."
server)
(def-kom-var kom-ansaphone-record-messages t
"*t if messages are recorded while the ansaphone is on."
server)
......
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