Commit 011ed542 authored by David Byers's avatar David Byers
Browse files

Fix bug 762 and 763

parent d63bedff
2002-09-18 David Byers <david.byers@swipnet.se> 2002-09-18 David Byers <david.byers@swipnet.se>
Fix bug 762:
* commands2.el (kom-set-motd): Rewrote using blocking commands.
The old code didn't really work. Also pick recipients for the text
correctly.
Fix bug 763:
* edit-text.el (lyskom-looking-at-header): Changed from match
number 1 to match number 2 because we need that for english
strings.
Fix bug 522: Fix bug 522:
* startup.el (lyskom): Print motd of lyskom sort of like a normal * startup.el (lyskom): Print motd of lyskom sort of like a normal
text. Don't print the header because it distracts attention. Do text. Don't print the header because it distracts attention. Do
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
# Version of the client. # Version of the client.
# #
# Also remember to change version number in ../doc/Makefile! # Also remember to change version number in ../doc/Makefile!
CLIENTVERSION = 0.47.1-BETA-1 CLIENTVERSION = 0.47.1-BETA-2
###################################################################### ######################################################################
......
...@@ -1552,26 +1552,25 @@ YYYY-MM-DD." ...@@ -1552,26 +1552,25 @@ YYYY-MM-DD."
(def-kom-command kom-set-motd () (def-kom-command kom-set-motd ()
"Set the message of the day for LysKOM." "Set the message of the day for LysKOM."
(interactive) (interactive)
(if (server-info->motd-of-lyskom lyskom-server-info) (let* ((old-motd-text-stat (and (server-info->motd-of-lyskom lyskom-server-info)
(progn (lyskom-collect 'main) (blocking-do 'get-text-stat (server-info->motd-of-lyskom lyskom-server-info))))
(initiate-get-text-stat 'main nil (old-motd-text (and (server-info->motd-of-lyskom lyskom-server-info)
(server-info->motd-of-lyskom lyskom-server-info)) (blocking-do 'get-text (server-info->motd-of-lyskom lyskom-server-info))))
(initiate-get-text 'main nil (str (and old-motd-text
(server-info->motd-of-lyskom lyskom-server-info)) old-motd-text-stat
(lyskom-use 'main 'lyskom-set-motd)) (text->decoded-text-mass old-motd-text old-motd-text-stat)))
(lyskom-set-motd nil nil))) (recpt (if old-motd-text-stat
(lyskom-get-recipients-from-misc-list
(text-stat->misc-info-list old-motd-text-stat))
(defun lyskom-set-motd (old-motd-text-stat old-motd-text) (apply 'nconc (mapcar (lambda (x) (list 'RECPT x))
"Set the message of the day for LysKOM. (and lyskom-server-info
Use OLD-MOTD-TEXT as the default text if non-nil." (server-info->kom-news-conf lyskom-server-info)
(not (eq 0 (server-info->kom-news-conf lyskom-server-info)))
(let ((str (and old-motd-text (list (server-info->kom-news-conf lyskom-server-info))))))))
old-motd-text-stat
(text->decoded-text-mass old-motd-text old-motd-text-stat))))
(lyskom-edit-text (lyskom-edit-text
lyskom-proc lyskom-proc
(lyskom-create-misc-list) (apply 'lyskom-create-misc-list recpt)
(if (and str (string-match "\n" str)) (if (and str (string-match "\n" str))
(substring str 0 (1- (match-end 0))) (substring str 0 (1- (match-end 0)))
"") "")
......
...@@ -1559,8 +1559,8 @@ non-nil. If MATCH-NUMBER is 'angled, only match a number inside <>." ...@@ -1559,8 +1559,8 @@ non-nil. If MATCH-NUMBER is 'angled, only match a number inside <>."
(nil (nil
"")))) ""))))
(if match-number (if match-number
(string-to-int (buffer-substring (match-beginning 1) (string-to-int (buffer-substring (match-beginning 2)
(match-end 1))) (match-end 2)))
t) t)
nil)) nil))
......
...@@ -862,9 +862,9 @@ Text %#1n has more than one root but only one of the trees will be shown.\n") ...@@ -862,9 +862,9 @@ Text %#1n has more than one root but only one of the trees will be shown.\n")
; From edit-text.el: ; From edit-text.el:
(press-C-c-C-c . "Enter C-c C-c to post the text.") (press-C-c-C-c . "Enter C-c C-c to post the text.")
(recipient . "Recipient") (recipient . "Recipient")
(recipient-prefix . "[Rr]")
(carbon-copy . "Carbon copy") (carbon-copy . "Carbon copy")
(blank-carbon-copy . "Blind Carbon copy") (blank-carbon-copy . "Blind Carbon copy")
(recipient-prefix . "\\([Rr]\\)")
(carbon-copy-prefix . "[Cc]\\([Aa]\\|[Cc]\\)") (carbon-copy-prefix . "[Cc]\\([Aa]\\|[Cc]\\)")
(blank-carbon-copy-prefix . "[Bb]\\([Ll]\\|[Cc][Cc]\\)") (blank-carbon-copy-prefix . "[Bb]\\([Ll]\\|[Cc][Cc]\\)")
(add-recipient . "Add a recipient") (add-recipient . "Add a recipient")
......
...@@ -875,9 +875,9 @@ M ...@@ -875,9 +875,9 @@ M
(recipient . "Mottagare") (recipient . "Mottagare")
(carbon-copy . "Extra kopia") (carbon-copy . "Extra kopia")
(blank-carbon-copy . "Dold kopia") (blank-carbon-copy . "Dold kopia")
(recipient-prefix . "[Mm]") (recipient-prefix . "\\([Mm]\\)")
(carbon-copy-prefix . "[Ee]") (carbon-copy-prefix . "\\([Ee]\\)")
(blank-carbon-copy-prefix . "[Dd]") (blank-carbon-copy-prefix . "\\([Dd]\\)")
(add-recipient . "Addera mottagare") (add-recipient . "Addera mottagare")
(add-recipient-or-xref . "Addera...") (add-recipient-or-xref . "Addera...")
......
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