Channel operators can set hashes, fix typos.

This commit is contained in:
SoniEx2 2018-12-23 19:15:31 -02:00
parent 8ea54dd6f8
commit d84c53d31e
1 changed files with 26 additions and 4 deletions

30
clog.md
View File

@ -23,7 +23,7 @@ Example:
The `HASH` S2C command
----------------------
The `HASH` command shall be sent for hashes associated with a channel.
The `HASH` server-to-client command shall be sent from server to client for hashes associated with a channel.
Each hash must be a cryptographic hash. Non-cryptographic hashes must be ignored. Broken hash algorithms should be avoided. MD5 is explicitly disallowed and must not be used.
@ -40,14 +40,34 @@ Example:
>>> JOIN #channel
<<< JOIN #channel
<<< NAMES etc
<<< HASH #channel :sha1=20,something_long
<<< HASH #channel :sha1=60,something_else sha256=70,another
<<< HASH #channel :sha1=20/something_long
<<< HASH #channel :sha1=60/something_else,sha256=70/another
Optionally, the server may include a server name with the HASH command:
<<< :server1.example.com HASH #channel :etc
<<< :server2.example.com HASH #channel :other
The `HASH` C2S command
----------------------
The `HASH` client-to-server command shall be sent from client to server to view and manipulate a channel's hash list.
To view a channel's hash list:
HASH #channel
To manipulate a channel's hash list:
HASH #channel :+hash_type=counter/hash,type=counter/hash,...
HASH #channel :-hash_type=counter/hash,type=counter/hash,...
(To add and remove hashes, respectively)
Viewing a channel's hash list should be restricted to anyone capable of joining the channel. This means banned users shouldn't have access to this command.
Manipulating a channel's hash list should be restricted to channel operators only.
The `clog` message tag
----------------------
@ -63,10 +83,12 @@ These hashes specify the previous "head(s)" of the clog. "Merges" are just messa
The hash encompasses the message tags specified by the capability (e.g. `time` and `clog`), sorted according to UTF-8 byte order, and the contents of the IRC message, as seen in the following format:
@soniex2.github.io/clog=...;time=... :nick!user@host PRIVMSG #channel :message
@soniex2.github.io/clog=type=counter/full_hash,type=counter/full_hash,...;time=... :nick!user@host PRIVMSG #channel :message
(This line is what gets hashed)
Note the use of `full_hash` instead of `short_hash`.
Examples:
TODO