Commit Graph

31 Commits (7ddc815726da0f471cbd92896da383bc8bed81f4)

Author SHA1 Message Date
Sébastien Helleu 7ddc815726 relay: actually use the client status "waiting_auth" in irc and weechat protocols (closes #1358)
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
2020-04-12 17:46:46 +02:00
Sébastien Helleu feb6258910 core: update copyright dates 2020-01-04 10:41:26 +01:00
Sébastien Helleu 330149b9b6 relay: reject client with weechat protocol if password or totp is received in init command but not set in WeeChat (closes #1435) 2019-12-21 10:47:35 +01:00
Sébastien Helleu 2b0057239b core: update copyright dates 2019-01-01 15:40:51 +01:00
Sébastien Helleu 4712d0bb06 core: use https for links to GNU GPL license 2018-11-29 23:16:07 +01:00
Sébastien Helleu 738535e7f6 relay: add support of Time-based One-Time Password (TOTP) as second authentication factor in weechat protocol 2018-11-04 14:50:53 +01:00
Sébastien Helleu ed4837b2f6 core: update copyright dates 2018-01-05 00:54:18 +01:00
Simmo Saan 996aaf0613 relay: remove local variables used only for sizeof 2017-06-03 15:56:26 +03:00
Sébastien Helleu 9e0d103ff7 relay: check that pointers received in arguments are not NULL in "free" functions
Functions:
- relay_irc_free
- relay_client_outqueue_free
- relay_raw_message_free
- relay_weechat_msg_free
- relay_weechat_nicklist_item_free
- relay_weechat_nicklist_free
- relay_weechat_free
2017-03-25 14:07:46 +01:00
Sébastien Helleu 705d86e684 core: update copyright dates 2017-01-01 11:32:04 +01:00
Sébastien Helleu cf6aca1619 core: add pointer in some callbacks (closes #406)
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
2016-03-21 18:11:21 +01:00
Sébastien Helleu 3330724574 core: update copyright dates 2016-01-01 11:09:53 +01:00
Sébastien Helleu a020c28ea6 core: update copyright dates 2015-01-01 09:23:23 +01:00
Sebastien Helleu 897bb0950c relay: fix freeze after /upgrade when many disconnected clients still exist
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.
2014-02-23 13:07:45 +01:00
Sebastien Helleu 892aa79fb5 core: update copyright dates 2014-01-01 00:14:12 +01:00
Sebastien Helleu e900579fba relay: add support of secured data in option relay.network.password (evaluate content) (patch from Nils Görs) 2013-09-19 15:11:51 +02:00
Sebastien Helleu 86a8b9fb5f relay: remove temporary option "nicklistdiff" (in command init), send nicklist diff by default (weechat protocol)
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.
2013-05-01 21:01:12 +02:00
Sebastien Helleu a9ff529d83 relay: rename compression "gzip" to "zlib" (compression is zlib, not gzip) (thanks to Dominik Honnef) 2013-03-17 16:14:20 +01:00
Sebastien Helleu d2ff46fa69 relay: add message "_nicklist_diff" (differences between old and current nicklist)
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.
2013-03-09 09:04:49 +01:00
Sebastien Helleu c2aeb69c46 relay: add experimental websocket server support (RFC 6455) for irc and weechat protocols, new option relay.network.websocket_allowed_origins
It is a partial implementation of RFC 6455: fragmentation and control frames are
not yet supported.
Text and binary frames are supported.
2013-02-10 20:22:13 +01:00
Sebastien Helleu e4149b073d relay: add options "buffers" and "upgrade" for commands sync/desync in weechat protocol 2013-02-07 22:08:31 +01:00
Sebastien Helleu 25eaec3864 core: use size of 32 for hashtables (instead of 4, 8 or 16)
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).
2013-01-26 19:26:43 +01:00
Sebastien Helleu f97598b4aa core: update copyright dates 2013-01-01 13:12:49 +01:00
Sebastien Helleu 7eb5cc4b97 core: move comments with description of C file to top of files 2012-12-15 12:27:57 +01:00
Sebastien Helleu 7d34812f1c core: reformat comments for functions 2012-12-13 18:51:44 +01:00
Sebastien Helleu a99d136018 core: add new plugin "script" (scripts manager, replacing scripts weeget.py and script.pl) 2012-08-14 18:29:32 +02:00
Sebastien Helleu a62b243af5 relay: add signals "upgrade" and "upgrade_ended" in WeeChat protocol 2012-05-17 11:24:59 +02:00
Sebastien Helleu 04275a7354 relay: fix crash on /upgrade when client is connected using WeeChat protocol 2012-05-17 09:37:04 +02:00
Sebastien Helleu 47e4a03be6 core: update copyright dates 2012-01-08 18:59:50 +01:00
Sebastien Helleu 16ae7e2663 relay: add commands "sync" and "desync" in WeeChat protocol 2011-12-17 17:39:19 +01:00
Sebastien Helleu 013f8cc757 relay: add WeeChat protocol (for remote GUI), doc about protocol, new options
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)
2011-12-06 23:06:23 +01:00