Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Peter Liljenberg
lyskom-elisp-client
Commits
7706b565
Commit
7706b565
authored
Aug 28, 2000
by
David Byers
Browse files
Summera klienttyper efter Lista klienter.
Deklarera fler hookar som lokala.
parent
0093eabd
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/ChangeLog
View file @
7706b565
2000-08-28 David Byers <davby@ida.liu.se>
Make nearly all hooks local:
* vars.el.in (kom-quit-hook): Declare as server-hook.
(lyskom-view-text-hook): Declare as local-hook.
(lyskom-send-message-hook): Ditto.
(lyskom-login-hook): Ditto.
(lyskom-change-conf-hook): Ditto.
(lyskom-send-text-hook): Ditto.
(lyskom-send-message-exit-hook): Ditto.
(lyskom-personal-message-hook): Ditto.
Summary statistics at end of list:
* commands1.el (lyskom-list-clients-statistics-2): New function.
(lyskom-list-clients-statistics-1): New function.
(lyskom-list-clients-collect): New function.
(lyskom-deferred-client-2): Collect client statistics.
(kom-list-clients): Collect client statistics. Print client
statistics.
Improve FAQ handling:
* vars.el.in (lyskom-commands): Added kom-change-conf-faq.
* commands1.el (lyskom-change-conf-faq-2): New function.
...
...
src/commands1.el
View file @
7706b565
...
...
@@ -2712,7 +2712,8 @@ Uses Protocol A version 9 calls"
(
dynamic-session-info->session
(
nth
(
1-
total-users
)
who-list
))))))
(
format-string
(
lyskom-info-line-format-string
s-width
"P"
(
if
kom-deferred-printing
"D"
"s"
))))
s-width
"P"
(
if
kom-deferred-printing
"D"
"s"
)))
(
collect
(
make-collector
)))
(
lyskom-format-insert
format-string
""
(
lyskom-get-string
'lyskom-name
)
...
...
@@ -2733,12 +2734,14 @@ Uses Protocol A version 9 calls"
(
dynamic-session-info->session
who-info
)
'lyskom-deferred-client-1
nil
nil
nil
; Filled in later
(
dynamic-session-info->session
who-info
))
(
list
(
dynamic-session-info->session
who-info
)
collect
))
(
blocking-do-multiple
((
name
(
get-client-name
(
dynamic-session-info->session
who-info
)))
(
version
(
get-client-version
(
dynamic-session-info->session
who-info
))))
(
lyskom-list-clients-collect
name
version
collect
)
(
concat
name
" "
version
)))))
(
lyskom-format-insert
format-string
...
...
@@ -2753,17 +2756,60 @@ Uses Protocol A version 9 calls"
'total-users
'total-visible-users
)
total-users
(
lyskom-client-date-string
'time-format-exact
)))))
'time-format-exact
)))
(
lyskom-format-insert
"%#1D\n"
(
lyskom-create-defer-info
'get-time
nil
'lyskom-list-clients-statistics-1
nil
nil
nil
collect
))
))
(
defun
lyskom-list-clients-collect
(
client
version
collect
)
"Collect client statistics"
(
let*
((
name
(
concat
client
" "
version
))
(
el
(
assoc
name
(
collector->value
collect
))))
(
if
el
(
setcdr
el
(
1+
(
cdr
el
)))
(
set-collector->value
collect
(
cons
(
cons
name
1
)
(
collector->value
collect
))))))
(
defun
lyskom-list-clients-statistics-1
(
time
arg
defer-info
)
(
initiate-get-time
'deferred
'lyskom-list-clients-statistics-2
defer-info
))
(
defun
lyskom-list-clients-statistics-2
(
time
defer-info
)
(
lyskom-replace-deferred
defer-info
(
concat
"\n"
(
lyskom-get-string
'client-statistics
)
(
mapconcat
(
lambda
(
el
)
(
lyskom-format
'client-statistics-line
(
if
(
equal
(
car
el
)
" "
)
(
lyskom-get-string
'Unknown
)
(
car
el
))
(
cdr
el
)))
(
nreverse
(
sort
(
collector->value
(
defer-info->data
defer-info
))
(
lambda
(
a
b
)
(
string-lessp
(
car
a
)
(
car
b
)))))
"\n"
)
"\n"
)))
(
defun
lyskom-deferred-client-1
(
name
defer-info
)
(
initiate-get-client-version
'deferred
'lyskom-deferred-client-2
(
defer-info->data
defer-info
)
(
elt
(
defer-info->data
defer-info
)
0
)
defer-info
name
))
name
(
elt
(
defer-info->data
defer-info
)
1
)
))
(
defun
lyskom-deferred-client-2
(
version
defer-info
name
)
(
defun
lyskom-deferred-client-2
(
version
defer-info
name
collect
)
(
lyskom-list-clients-collect
name
version
collect
)
(
lyskom-replace-deferred
defer-info
(
if
(
zerop
(
length
name
))
"-"
(
concat
name
" "
version
))))
...
...
src/english-strings.el
View file @
7706b565
...
...
@@ -441,6 +441,8 @@ Read all about it at http://www.lysator.liu.se/history/")
(
total-active-users
.
" A total of %#1d active user%#1?d%[%]%[s%] (%#2s.)\n"
)
(
total-visible-active-users
.
" A total of %#1d visible active user%#1?d%[%]%[s%] (%#2s.)\n"
)
(
client-statistics
.
" Distribution of clients:\n"
)
(
client-statistics-line
.
" %=-25#1s: %#2d"
)
(
who-to-add-q
.
"Add who/what as a recipient? "
)
(
who-to-add-copy-q
.
"Add which conference/user as carbon copy recipient? "
)
(
who-to-add-bcc-q
.
"Add which conference/user as blind carbon copy recipient? "
)
...
...
@@ -887,6 +889,7 @@ for a text.
(has-entered-r . "
%#2@%#1P
has
entered
%#3s.\n
")
(has-left . "
%#1:P
has
left
%#2s.
")
(has-left-r . "
%#2@%#1P
has
left
%#3s.\n
")
(Unknown . "
Unknown
")
(unknown . "
unknown
")
(no-longer-member . "
You
are
no
longer
a
member
of
%#1M.\n
")
...
...
src/swedish-strings.el
View file @
7706b565
...
...
@@ -436,6 +436,8 @@ i svensk datorhistoria. L
(
total-active-users
.
" Sammanlagt %#1d aktiv%#1?d%[%]%[a%] anvndare (%#2s.)\n"
)
(
total-visible-active-users
.
" Sammanlagt %#1d synlig%#1?d%[%]%[a%] aktiv%#1?d%[%]%[a%] anvndare (%#2s.)\n"
)
(
client-statistics
.
" Klienternas frdelning:\n"
)
(
client-statistics-line
.
" %=-25#1s: %#2d"
)
(
who-to-add-q
.
"Vilket mte/person vill du addera som mottagare? "
)
(
who-to-add-copy-q
.
"Vilket mte/person vill du addera som kopiemottagare? "
)
(
who-to-add-bcc-q
.
"Vilket mte/person vill du addera som mottagare fr knnedom? "
)
...
...
@@ -889,6 +891,7 @@ upptagna. Logga ut och kom tillbaks senare om du v
(has-entered-r . "
%#2@Nu
har
%#1P
gtt
in
i
%#3s.\n
")
(has-left . "
Nu
har
%#1:P
gtt
ur
%#2s.
")
(has-left-r . "
%#2@Nu
har
%#1P
gtt
ur
%#3s.\n
")
(Unknown . "
Oknd
")
(unknown . "
oknd
")
(unknown-person . "
Oknd
person
")
...
...
src/vars.el.in
View file @
7706b565
...
...
@@ -444,7 +444,8 @@ long as there are sessions with unread texts.
"*Hook that is called before a text is shown. When the hooks are
called, lyskom-view-text-text is bound to the text mass of the
text and lyskom-view-text-text-stat to the text-stat of the text
to be shown."
)
to be shown."
local-hook
)
(
def-kom-var
lyskom-send-message-hook
'
(
lyskom-send-message-trim-newlines
)
...
...
@@ -455,17 +456,21 @@ and lyskom-message-recipient to the conf-stat of the recipient or nil if
the recipient does not exist or if the message is a common message.
If lyskom-message-string is set to nil by a hook, the message will not
be sent."
)
be sent."
local-hook
)
(
def-kom-var
lyskom-send-message-setup-hook
nil
"*Hook that is called when the minibuffer is entered to read a message."
)
"*Hook that is called when the minibuffer is entered to read a message."
local-hook
)
(
def-kom-var
lyskom-send-message-exit-hook
nil
"*Hook that is called when the minibuffer is exited after reading a message."
)
"*Hook that is called when the minibuffer is exited after reading a message."
local-hook
)
(
def-kom-var
lyskom-send-text-hook
nil
"*Hook that is called before sending a text. Hook functions return t to
signal suggess and nil to prevent the text from being sent."
)
signal suggess and nil to prevent the text from being sent."
local-hook
)
(
def-kom-var
lyskom-after-load-hook
nil
"*Hook to run once after lyskom is loaded."
)
...
...
@@ -473,13 +478,15 @@ signal suggess and nil to prevent the text from being sent.")
(
def-kom-var
lyskom-change-conf-hook
nil
"*Hook to run when changing conferences.
The functions in this list are run with two arguments. The first is the
current conf-no and the second is the conf-no being changed to."
)
current conf-no and the second is the conf-no being changed to."
local-hook
)
(
def-kom-var
lyskom-login-hook
nil
"*What to do when logged in.
This hook is called after we have logged in but before and command is
accepted from the keyboard. It is called immediately before
kom-login-hook."
)
kom-login-hook."
local-hook
)
(
def-kom-var
kom-login-hook
nil
"*What to do when logged in.
...
...
@@ -1853,7 +1860,7 @@ set to that text."
(
def-kom-var
kom-quit-hook
nil
"*Hook to run when the LysKOM session is correctly ended."
server
)
server
-hook
)
(
def-kom-var
kom-quit-when-idle
t
"Non-nil to automatically quit when LysKOM is full and the session is idle"
)
...
...
@@ -1945,7 +1952,8 @@ in any conference other than the person's letterbox."
When the hook is run 'sender' is bound to the pers-stat of the sender
of the message (or possibly nil), 'recipient' is 0 if the message is a
public message and otherwise the pers-no of the user, and 'message' is
a string that holds the message."
)
a string that holds the message."
local-hook
)
(
def-kom-var
lyskom-executing-command
t
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment