Now the status "waiting_auth" is used and displayed in the relay buffer.
When a client connects, there are now 2 messages (except for irc protocol if
there's no password required):
relay: new client on port 9000: 1/weechat/1.2.3.4 (waiting auth)
relay: client 1/weechat/1.2.3.4 authenticated
If the authentication fails, the messages are:
relay: new client on port 9000: 1/weechat/1.2.3.4 (waiting auth)
=!= relay: authentication failed with client 1/weechat/1.2.3.4
This pointer is the first argument received by callbacks, and the
existing argument "data" is now automatically freed by WeeChat when the
object containing the callback is removed.
With this new pointer, the linked list of callbacks in scripts has been
removed. This will improve speed of scripts (using a lot of hooks),
reduce memory used by scripts and reduce time to unload scripts.
Following functions are affected in the C API:
* exec_on_files
* config_new
* config_new_section
* config_new_option
* hook_command
* hook_command_run
* hook_timer
* hook_fd
* hook_process
* hook_process_hashtable
* hook_connect
* hook_print
* hook_signal
* hook_hsignal
* hook_config
* hook_completion
* hook_modifier
* hook_info
* hook_info_hashtable
* hook_infolist
* hook_hdata
* hook_focus
* unhook_all_plugin
* buffer_new
* bar_item_new
* upgrade_new
* upgrade_read
The hooks for the WeeChat disconnected clients are not created again
after /upgrade (they were removed on client disconnection, so there is
no reason to create them again).
The hooks like nicklist sync are called often (for example on irc
disconnection), which can cause long freeze if many WeeChat disconnected
clients exist in relay.
The temporary option was introduced because the nicklist diff was experimental.
It is now enabled by default, and there is no way to disable it. Therefore any
relay client using weechat protocol must implement the message "_nicklist_diff"
(unless nicklist is ignored by client).
Extra note: a full nicklist may still be sent if a message with diff would be
bigger than whole nicklist. So both full nicklist (message "_nicklist") and
nicklist diff (message "_nicklist_diff") must be implemented by clients.
This is an experimental feature, that must be explicitely enabled by clients
(for weechat protocol) in the init command with option "nicklistdiff", for example:
init password=mypasswd,nicklistdiff=1
This option will be removed when clients will handle nicklist diff.
A size of 32 will use a little more memory but will reduce collisions in key
hashs, and then length of linked lists inside hash structure (faster search in
hashtable).
The protocol is partial, under development, and NOT ready for usage.
New options added in relay.conf:
- relay.network.allowed_ips: allow only some IPs on relay plugin (by default
all IPs are allowed)
- relay.network.compression_level: compression level used in WeeChat protocol
(compression is made using zlib)