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

Bugfixar, bättre featuretester, bättre bakåtkompatibilitet med protokollversion 6

parent a6e6b2e1
Sat Aug 10 12:24:22 1996 David Byers <>
* (lyskom-server-features): Lgg in information om
protokollversion fr servrar med version lgre n 1.7.0
(lyskom-server-features): Lade in lyskom-dynamic-session-info-flag
och lyskom-idle-time-flag. (lyskom-dynamic-session-info-flag): Ny
variabel. (lyskom-idle-time-flag): Ny variabel.
* startup.el (lyskom-setup-client-check-version): Hantera
relationen "<".
* english-strings.el (lyskom-strings): Lade till
session-status-inactive, session-status-9,
* swedish-strings.el (lyskom-strings): Lade till
session-status-inactive, byggde om session-status-9
* commands1.el (lyskom-status-session-9): Snyggare utskrift om
anvndaren inte r idle. (lyskom-who-is-on-9): Hantera
kom-idle-hide som inte r en siffra. Hantera prefixargumentet -
som man fr om man trycker C-u - 0 v (kom-who-is-on): Testa
lyskom-dynamic-session-info-flag istf protokollversion.
(kom-status-session): Dito.
* lyskom-rest.el (lyskom-end-of-command): Testa p
lyskom-idle-time-flag istf protokollversion.
* services.el (initiate-lookup-z-name): Anvnd lookup-name om
servern inte klarar lookup-z-name.
(initiate-compat-lookup-z-name-2): Ny funktion.
(initiate-compat-lookup-z-name-3): Ny funktion.
* internal.el (lyskom-complete-call): Ny funktion.
(lyskom-fake-call): Ny funktion.
Sat Aug 10 04:30:43 1996 David Kgedal <>
* swedish-strings.el (lyskom-commands): La till "Flytta text".
......@@ -36,6 +72,8 @@ Fri Aug 9 01:18:34 1996 David K
Thu Aug 8 12:33:03 1996 David Byers <>
* flags.el (lyskom-Edit-options-modify): Anropa modfun *en* gng.
* english-strings.el, swedish-strings.el (lyskom-strings): Lade
till no-changes.
......@@ -1494,7 +1494,7 @@ If MARK-NO == 0, review all marked texts."
"Display a list of all connected users."
(interactive "P")
(condition-case err
(if (>= (car (cdr (assq 'protocol-version lyskom-server-supports))) 9)
(if lyskom-dynamic-session-info-flag
(lyskom-who-is-on-9 arg)
......@@ -1560,8 +1560,13 @@ Uses Protocol A version 8 calls"
(defun lyskom-who-is-on-9 (arg)
"Display a list of all connected users.
Uses Protocol A version 9 calls"
(let* ((wants-invisibles (and (numberp arg) (< arg 0)))
(idle-hide (if (numberp arg) (abs arg) kom-idle-hide))
(let* ((wants-invisibles (or (and (numberp arg) (< arg 0))
(and (symbolp arg) (eq '- arg))))
(idle-hide (if (numberp arg) (abs arg)
(cond ((numberp kom-idle-hide) kom-idle-hide)
((eq '- arg) 0)
(kom-idle-hide 30)
(t 0))))
(who-info-list (blocking-do 'who-is-on-dynamic
't wants-invisibles (* idle-hide 60)))
(who-list (sort (listify-vector who-info-list)
......@@ -1809,7 +1814,7 @@ about or a single session number."
(lyskom-get-string 'status-for-session))))
(if (>= (car (cdr (assq 'protocol-version lyskom-server-supports))) 9)
(if lyskom-dynamic-session-info-flag
(setq who-info (listify-vector
(blocking-do 'who-is-on-dynamic t t 0)))
......@@ -1907,7 +1912,11 @@ WHO-INFOS that are potential sessions."
(lyskom-get-string 'doing-nowhere-conn))
(static-session-info->connection-time static))
(/ (dynamic-session-info->idle-time info) 60))
(if (eq (/ (dynamic-session-info->idle-time info) 60)
(lyskom-format (lyskom-get-string 'session-status-inactive)
(/ (dynamic-session-info->idle-time info) 60))))
(if (session-flags->invisible (dynamic-session-info->flags info))
(lyskom-insert (lyskom-get-string 'session-is-invisible)))))
(setq who-info-list (cdr who-info-list)))))
......@@ -927,6 +927,12 @@ Text:
(session-status . "Session %#1d is %#2P <%#2p>
%#5s %#7s %#4M
Using %#6D from %#3s\n")
(session-status-9 . "Session %#1d is %#2P <%#2p>
%#5s %#7s %#4M
Using %#6D from %#3s
On since %#8s%#9s")
(session-status-inactive . "\nHas been inactive for %#1d minutes\n")
(session-is-invisible . "This session is invisible.\n")
(status-for-session . "Session status for whom? ")
(unknown-doing-what . "Exists")
(doing-where-conn . "in")
......@@ -55,7 +55,7 @@
(defun lyskom-Edit-options-modify (modfun)
(let ((buffer-read-only nil) var pos)
(let ((buffer-read-only nil) var pos tmp)
(re-search-backward "^;; \\|\\`")
(forward-char 3)
(setq pos (point))
......@@ -67,10 +67,10 @@
(forward-line 1)
(forward-char 1)
(set var (funcall modfun var))
(set var (setq tmp (funcall modfun var)))
(if (boundp 'lyskom-buffer)
(set-buffer lyskom-buffer))
(set var (funcall modfun var)))
(set var tmp))
(kill-sexp 1)
(prin1 (symbol-value var) (current-buffer)))))
......@@ -261,6 +261,22 @@ Arguments: KOM-QUEUE REF-NO HANDLER HANDLER-DATA
(lyskom-call-add kom-queue 'CALL ref-no
parser parser-data handler handler-data))
(defun lyskom-fake-call (kom-queue ref-no handler handler-data)
"Add information about a call that will not return from the server,
but will be filled in by some other function."
(lyskom-call-add kom-queue 'CALL ref-no
nil nil handler handler-data))
(defun lyskom-complete-call (kom-queue ref-no result)
"Force a call placed on KOM-QUEUE with reference number REF-NO to return
RESULT. This should only be used to complete calls placed on the queue using
lyskom-fake-call, or the parser might get confused."
(let ((call-info (lyskom-locate-ref-no kom-queue ref-no)))
(if call-info
(lyskom-tr-call-to-parsed call-info result)
(lyskom-check-call kom-queue)))))
;;; This is used by z-initiate-get-map, which is not used.
;;; This was a temporary solution.
No preview for this file type
......@@ -709,11 +709,61 @@ Args: KOM-QUEUE HANDLER &rest DATA"
&rest data)
"Perform a z-lookup.
(lyskom-call kom-queue lyskom-ref-no handler data
(lyskom-send-packet kom-queue (lyskom-format-objects 76 name
(if lyskom-z-lookup-flag
(lyskom-call kom-queue lyskom-ref-no handler data
(lyskom-send-packet kom-queue (lyskom-format-objects 76 name
(let ((ref-no lyskom-ref-no))
(lyskom-fake-call kom-queue ref-no handler data)
(++ lyskom-ref-no)
(initiate-lookup-name 'compat
(defun initiate-compat-lookup-z-name-2 (result kom-queue
(if (null result)
(lyskom-complete-call kom-queue ref-no nil))
(let ((conf-nos (listify-vector (conf-list->conf-nos result)))
(conf-types (listify-vector (conf-list->conf-types result))))
(lyskom-collect 'follow)
(while conf-nos
(if (or (and want-persons
(conf-type->letterbox (car conf-types)))
(and want-confs
(not (conf-type->letterbox (car conf-types)))))
(initiate-get-conf-stat 'follow nil (car conf-nos)))
(setq conf-nos (cdr conf-nos))
(setq conf-types (cdr conf-types)))
(lyskom-list-use 'follow
(defun initiate-compat-lookup-z-name-3 (conf-list kom-queue
(lyskom-complete-call kom-queue ref-no
(mapcar (function
(lambda (conf-stat)
(conf-stat->name conf-stat)
(conf-stat->conf-type conf-stat)
(conf-stat->conf-no conf-stat))))
(defun initiate-set-last-read (kom-queue handler conf-no text-no &rest data)
"Tell the server to set the highest unread article in conference CONF-NO
......@@ -164,7 +164,14 @@ See lyskom-mode for details."
(>= (elt version 2) revision))
(and (= (elt version 0) major)
(> (elt version 1) minor))
(and (> (elt version 0) major)))))))
(and (> (elt version 0) major))))
((eq relation '<)
(or (and (= (elt version 0) major)
(= (elt version 1) minor)
(< (elt version 2) revision))
(and (= (elt version 0) major)
(< (elt version 1) minor))
(and (< (elt version 0) major)))))))
(defun lyskom-setup-client-for-server-version ()
......@@ -967,8 +967,8 @@ K\366r %#6D fr\345n %#3s\n")
(session-status-9 . "Session %#1d \344r %#2P <%#2p>
%#5s %#7s %#4M
K\366r %#6D fr\345n %#3s
Uppkopplad sedan %#8s
och har inte varit aktiv p\345 %#9d minuter\n")
Uppkopplad sedan %#8s%#9s")
(session-status-inactive . "\nHar inte varit aktiv p\345 %#1d minuter\n")
(session-is-invisible . "Denna session \344r osynlig.\n")
(status-for-session . "Sessionsstatus f\366r vilken person? ")
(unknown-doing-what . "Existerar")
......@@ -692,7 +692,9 @@ Dont change these. These are defined by the protocol.")
"The largest int emacs, and thus this LysKOM client, can handle.")
(defconst lyskom-server-features
'(((>= 1 9 0) (lyskom-accept-async-flag))
'(((>= 1 9 0) (lyskom-accept-async-flag
((>= 1 8 0) (lyskom-long-conf-types-flag
......@@ -700,7 +702,8 @@ Dont change these. These are defined by the protocol.")
((= 1 9 0) ((protocol-version 9)))
((= 1 8 0) ((protocol-version 8)))
((= 1 7 0) ((protocol-version 7)))
((= 1 7 1) ((protocol-version 7))))
((= 1 7 1) ((protocol-version 7)))
((< 1 7 0) ((protocol-version 6))))
"List describing which features a certain server version has.
Each element is a list containing the server version and what it
......@@ -725,6 +728,12 @@ version, minor version and revision.")
"Assoc list of features supported by the LysKOM server. See
lyskom-server-features for more information.")
(defvar lyskom-idle-time-flag nil
"t if idle time calls are supported by the server.")
(defvar lyskom-dynamic-session-info-flag nil
"t if dynamic session info is supported by the server.")
(defvar lyskom-long-conf-types-flag nil
"t if extended conf types are supported by the server.")
Supports Markdown
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