Commit 028a106c authored by Linus Tolke Y's avatar Linus Tolke Y

Ny text-gruppmeddelande.

parent 981a4664
...@@ -176,10 +176,16 @@ this function shall be with current-buffer the BUFFER." ...@@ -176,10 +176,16 @@ this function shall be with current-buffer the BUFFER."
(format "emacs-version: %s\nclient-version: %s" (format "emacs-version: %s\nclient-version: %s"
(emacs-version) (emacs-version)
lyskom-clientversion))) lyskom-clientversion)))
(t (initiate-get-conf-stat 'async (t
'lyskom-show-personal-message sender (if (zerop recipient)
recipient (initiate-get-conf-stat 'async
message)))))) 'lyskom-show-personal-message sender
0
message)
(lyskom-collect 'async)
(initiate-get-conf-stat 'async nil sender)
(initiate-get-conf-stat 'async nil recipient)
(lyskom-use 'async 'lyskom-show-personal-message message)))))))
((eq msg-no 13) ; New logout ((eq msg-no 13) ; New logout
(let ((pers-no (lyskom-parse-num)) (let ((pers-no (lyskom-parse-num))
...@@ -269,8 +275,8 @@ this function shall be with current-buffer the BUFFER." ...@@ -269,8 +275,8 @@ this function shall be with current-buffer the BUFFER."
"Insert a personal message into the lyskom buffer. "Insert a personal message into the lyskom buffer.
Args: SENDER: conf-stat for the person issuing the broadcast message or a Args: SENDER: conf-stat for the person issuing the broadcast message or a
string that is the sender. string that is the sender.
RECIPIENT: 0 if this message is for everybody, otherwise the pers-no RECIPIENT: 0 if this message is for everybody, otherwise the conf-stat
of the user. of the recipient.
MESSAGE: A string containing the message." MESSAGE: A string containing the message."
(lyskom-insert-personal-message sender recipient message) (lyskom-insert-personal-message sender recipient message)
(run-hooks 'lyskom-personal-message-hook)) (run-hooks 'lyskom-personal-message-hook))
...@@ -285,7 +291,7 @@ MESSAGE is a string containing the message. ...@@ -285,7 +291,7 @@ MESSAGE is a string containing the message.
INSERT-FUNCTION is a function that given a string inserts it into the INSERT-FUNCTION is a function that given a string inserts it into the
current buffer." current buffer."
(lyskom-handle-as-personal-message (lyskom-handle-as-personal-message
(if (= recipient 0) (if (eq recipient 0)
(progn (progn
(if (eq t kom-ding-on-personal-messages) (if (eq t kom-ding-on-personal-messages)
(beep)) (beep))
...@@ -296,15 +302,28 @@ current buffer." ...@@ -296,15 +302,28 @@ current buffer."
(t (lyskom-get-string 'unknown))) (t (lyskom-get-string 'unknown)))
message message
(substring (current-time-string) 11 19))) (substring (current-time-string) 11 19)))
(if kom-ding-on-personal-messages (if (= (conf-stat->conf-no recipient) lyskom-pers-no)
(beep)) (progn
(lyskom-format 'message-from (if (memq kom-ding-on-personal-messages '(t personal)) (beep))
(cond (lyskom-format 'message-from
((stringp sender) sender) (cond
(sender (conf-stat->name sender)) ((stringp sender) sender)
(t (lyskom-get-string 'unknown))) (sender (conf-stat->name sender))
message (t (lyskom-get-string 'unknown)))
(substring (current-time-string) 11 19))) message
(substring (current-time-string) 11 19)))
(if (memq kom-ding-on-personal-messages '(t group)) (beep))
(lyskom-format 'message-from-to
message
(cond
((stringp sender) sender)
(sender (conf-stat->name sender))
(t (lyskom-get-string 'unknown)))
(cond
((stringp recipient) recipient)
(recipient (conf-stat->name recipient))
(t (lyskom-get-string 'unknown)))
(substring (current-time-string) 11 19))))
(conf-stat->conf-no sender))) (conf-stat->conf-no sender)))
......
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