1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
|
<Session>:
<action> <pattern>
Actions:
< = registered for incoming pattern
> = outgoing tuples for notifications
(A session may send out more tuples, but those are to control itself or
another session, rather than providing a general notification).
Patterns:
Space separated list of elements.
* = wildcard
$var = variable
$var... = one or more fields
Anything else should be considered a literal.
======================
Hub manager:
< hub $name create
Creates a hub session with $name
< hub $name close
Closes the hub specified with $name, or all hubs if a wildcard is specified.
Hub:
< hub $name exists
< hub $name connect $addr
< hub $name disconnect
< hub $name info
Replies with hub information (TODO)
< hub $name chat $user $message
$user=$id of the userlist, wildcard for mainchat
< userlist $name Changed "" $data
(TODO)
> hub $name Created
> hub $name Closed
> hub $name Connected $addr
> hub $name Disconnected $reason...
UserList:
< userlist $hub get $id $field...
$id may be a wildcard to get a complete list
< userlist $hub getid $gid $field...
$gid may not be a wildcard here
< userlist $hub set $id $data
< userlist $hub del $id
$id may be a wildcard to clear all
< userlist $hub stats
Replies with user count and total share size
> userlist $hub Added $id $data
> userlist $hub Changed $id $old $new
> userlist $hub Deleted $id
$hub = $name of the corresponding Hub session
$id = Local user: ""
ADC: SID (FourCC string)
NMDC: hex(raw_nick)
$gid = The GID field ("global ID")
$data = map with information on the user
$old, $new = $data, only containing the fields that changed
$field = refers to the keys in $data, not present = all
TODO: Let 'get' and 'getid' return arrays rather than maps.
Fields (used in $data):
Name Username (UTF-8)
CID ADC: CID (base32 string), NMDC: Empty
PID ADC: PID (base32 string), NMDC: Empty (Only for the local user)
TID Temp. ID = $id (read only)
GID Global ID. ADC: CID, NMDC: $id (read only)
Desc Description
EMail E-mail address
Client Client string (<appname> <space> <version>)
Upload Upload speed. ADC: int, bytes/s, NMDC: Some string
Download Download speed. ADC: int, bytes/s. NMDC: Empty
ShareSize int, number of bytes shared
ShareFiles int, number of files shared (ADC only)
KeyPrint KP field (ADC only)
IP4 IPv4 address
Slots int, number of opened slots
AutoSlots int, bytes/s, extra slot will be opened if total upload < AutoSlots
HubsOp int, number of hubs the user is OP on
HubsReg int, number of hubs the user is registered on
HubsNorm int, number of hubs the user is neither registered or OP on
// TODO: Active/passive + TLS support + ADC: I6, U4, U6, TO, AW
|