Commit 9d44c76a authored by Linus Tolke Y's avatar Linus Tolke Y
Browse files

Fixat så att sätt loginmeddelnade och ta bort det sätter lokala variabeln.

parent bbf562e7
No preview for this file type
......@@ -1102,9 +1102,23 @@ Use OLD-MOTD-TEXT as the default text if non-nil."
(defun lyskom-set-motd-2 (text-no)
"Set motd of LysKOM to the newly created text TEXT-NO."
(lyskom-format-insert 'setting-motd text-no)
(initiate-set-motd-of-lyskom 'background 'lyskom-handle-command-answer
text-no))
(lyskom-insert-before-prompt
(lyskom-format 'setting-motd text-no))
(initiate-set-motd-of-lyskom 'background 'lyskom-set-motd-3
text-no text-no))
(defun lyskom-set-motd-3 (result text-no)
"Handle the return from the initiate-set-motd-of-lyskom call."
(if result
(progn
(lyskom-insert-before-prompt
(lyskom-get-string (if (zerop text-no)
'removed-motd
'set-motd-success)))
(set-server-info->motd-of-lyskom lyskom-server-info text-no))
(lyskom-insert-before-prompt
(lyskom-get-string 'set-motd-failed))))
;;; ================================================================
......@@ -1118,8 +1132,9 @@ Use OLD-MOTD-TEXT as the default text if non-nil."
(interactive)
(lyskom-start-of-command 'kom-remove-motd)
(lyskom-insert-string 'removing-motd)
(initiate-set-motd-of-lyskom 'background 'lyskom-handle-command-answer
0))
(initiate-set-motd-of-lyskom 'background 'lyskom-set-motd-3
0 0)
(lyskom-end-of-command))
;;; ================================================================
;;; Kasta ut - force logout
......
......@@ -336,8 +336,11 @@ Lyskom-sessionen
(administrator . "administratr")
(no-longer-administrator . "en normal anvndare igen")
(you-are-now . "Ok, du kr nu som %#1s.\n")
(setting-motd . "Stter loginmeddelandet till text %#1d...")
(removing-motd . "Tar bort loginmeddelandet...")
(setting-motd . "Stter loginmeddelandet till text %#1d.\n")
(set-motd-success . "Du har satt ett nytt loginmeddelande.\n")
(set-motd-failed . "Det gick inte. Du var kanske inte administrat|r.\n")
(removing-motd . "Tar bort loginmeddelandet.\n")
(removed-motd . "Du har tagit bort loginmeddelandet.\n")
(who-to-throw-out . "Vilken session vill du kasta ut? ")
(throwing-out . "Kastar nu ut session %#1d... ")
......
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