1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-26 04:46:37 +02:00
Commit Graph

317 Commits

Author SHA1 Message Date
Sébastien Helleu 292bad719a irc: remove unneeded comment 2016-09-22 21:07:26 +02:00
Rob Campbell cb382a0174 Fix for unclosed/leaking sockets from issue #358 2016-09-19 02:20:52 -07:00
Sébastien Helleu 751769b49d core: irc, xfer: do not check return code of res_init()
If the call to res_init() fails, the connection may be OK anyway
or in worst case it will fail (with an appropriate error) if the name
can not be resolved.
2016-08-07 16:17:42 +02:00
Sébastien Helleu f695a79d9b core, irc, xfer: add missing includes for function res_init() 2016-08-07 16:15:59 +02:00
Raghavendra Prabhu 761c5e2d11 core/plugins: Use res_init before getaddrinfo.
With weechat, if the network changes in anyway that causes resolv.conf
to be updated, that is not picked up, resulting in

    irc: connecting to server XXXX.com/1026 (SSL)...
    irc: address "XXX.com" not found
    irc: error: Name or service not known
    irc: reconnecting to server in 30 seconds

This happens, especially when one connects to an irc server behind a
VPN.

This can also happen when there is no network connectivity weechat was started
but later network is connected to.

The fix is simple, it relies on calling  res_init (3) before getaddrinfo in
network_connect_child and other places.

res_init reloads the resolv.conf and getaddrinfo does not fail with
address resolution error.
2016-08-07 13:20:54 +01:00
Sébastien Helleu 34ccf3fd81 irc: rename server options "default_msg_*" to "msg_*", evaluate them 2016-07-17 09:29:14 +02:00
Sébastien Helleu e2a3cc8bf4 irc: fix typo in a comment 2016-07-09 21:26:28 +02:00
Sébastien Helleu 7342a47de0 core, irc, xfer: display more information in memory allocation errors (issue #573) 2016-05-27 20:13:35 +02:00
Sébastien Helleu c1441b111f irc: fix first message displayed in raw buffer when the message is modified by a modifier (closes #719) 2016-04-24 10:10:12 +02:00
Sébastien Helleu aa248ad3b0 irc: fix crash in SSL connection to the server 2016-03-21 19:17:29 +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 94ef33022d irc: use upper case for SASL in messages displayed 2016-02-11 07:30:24 +01:00
Sébastien Helleu 522dcf133c irc: evaluate content of server option "addresses" 2016-01-02 10:12:40 +01:00
Sébastien Helleu 3330724574 core: update copyright dates 2016-01-01 11:09:53 +01:00
Sébastien Helleu ed32302011 irc: move option irc.network.alternate_nick into servers (closes #633) 2015-12-24 20:36:05 +01:00
Sébastien Helleu c4e3d66ba5 core: add a parent name in options (closes #629)
Inherited values are now displayed in /set output when the value is
null, if a parent option name is defined in option.

New option: weechat.color.chat_value_null
2015-12-24 07:53:37 +01:00
Sébastien Helleu ad45fd775d Merge remote-tracking branch 'origin/pr/351' 2015-12-20 10:13:29 +01:00
Sébastien Helleu 4fca6c58c8 irc: add a condition for colon before the password in PASS message (issue #602)
Some weird IRC servers may refuse a PASS command with a colon, so we
send a colon only if the password contains spaces or begins with a
colon.
2015-11-24 20:26:06 +01:00
Sébastien Helleu 9e9dd27bb3 irc: add a missing colon before the password in PASS message (closes #602) 2015-11-24 07:44:21 +01:00
Sébastien Helleu 8b47243516 irc: fix display of messages sent to server in raw buffer
Since the received messages are displayed without UTF-8 conversion (ie
this is really the data received), it is consistent to display the
message really sent to server (ie after charset conversion), instead of
the UTF-8 internal message.
2015-08-22 08:56:07 +02:00
Sébastien Helleu 15218ed294 irc: add option irc.network.channel_encode (issue #218, issue #482)
This is a workaround (disabled by default) to join and chat on ISO
encoded channels (or another charset different from UTF-8).

This option may be removed in future if a better solution is
implemented.
2015-08-14 21:25:27 +02:00
Sébastien Helleu 5aa93fdbb7 irc: fix update of lag item when the server lag changes 2015-08-05 20:51:12 +02:00
Sébastien Helleu 82199f8264 irc: remove lag item when a lag is displayed and new lag computed is exactly 0 milliseconds 2015-08-04 21:25:53 +02:00
Sébastien Helleu 14496c41a3 irc: evaluate content of server option "nicks" 2015-07-10 20:10:22 +02:00
Sébastien Helleu df66b2e6fe irc: fix type of value returned by function irc_buffer_build_name 2015-07-04 16:36:42 +02:00
Sébastien Helleu 0ff8d7b543 irc: decode/encode only text in IRC messages and not the headers (bug #29886, closes #218, closes #451) 2015-06-27 17:00:53 +02:00
Sébastien Helleu 5bac79c4f1 irc: do not open auto-joined channels buffers when option "-nojoin" is used in command /connect
Even if the option irc.look.buffer_open_before_autojoin is on.
2015-06-15 20:41:49 +02:00
Sébastien Helleu 71dd64678c core: add comments after some #endif 2015-04-30 21:15:30 +02:00
Sébastien Helleu fe9a9fbfce irc: add support of SHA-256 and SHA-512 algorithms in server option "ssl_fingerprint" (closes #281) 2015-04-18 18:52:20 +02:00
Sébastien Helleu 9598bd4919 irc: move some #ifdef HAVE_GNUTLS around functions 2015-04-18 10:17:48 +02:00
Max Teufel e00d7f2bfd irc: track realnames using extended-join and WHO 2015-03-07 15:46:02 +01:00
Max Teufel f379adffd0 irc: add support for CAP account-notify 2015-01-24 14:09:54 +01:00
Sébastien Helleu b0117f0d18 core: add gnutls version in #if compiler directives 2015-01-21 07:50:54 +01:00
Sébastien Helleu e2be01833f irc: add support of "ecdsa-nist256p-challenge" SASL mechanism (closes #251) 2015-01-19 23:52:33 +01:00
Sébastien Helleu 2021e63cd6 irc: fix warning on cast of a pointer 2015-01-10 09:29:13 +01:00
Sébastien Helleu 8f668bb18c irc: defer the auto-connection to servers with a timer (closes #279, task #13038) 2015-01-06 21:05:38 +01:00
Sébastien Helleu a020c28ea6 core: update copyright dates 2015-01-01 09:23:23 +01:00
Sébastien Helleu adb4d0debd irc: add option "reorder" in command /server (closes #229) 2014-12-21 11:12:32 +01:00
Sébastien Helleu 624083f41a irc: open channel buffers before the JOIN is received from server (autojoin and manual joins) (closes #216)
New options:
- irc.look.buffer_open_before_autojoin
- irc.look.buffer_open_before_join
2014-12-14 20:23:45 +01:00
Sébastien Helleu 8d3a55c6be irc: rename argument with new server name in function irc_server_rename() 2014-12-14 13:01:40 +01:00
Sébastien Helleu 4f4045fb84 irc: rename server option "sasl_disconnect_on_fail" to "sasl_fail", change type to integer (enum)
New possible values are:
- "continue": ignore the SASL failed (continue connection to server
  without authentication)
- "reconnect": disconnect and schedule a reconnection to server
- "disconnect": disconnect
2014-11-23 10:38:09 +01:00
Sébastien Helleu 570beab90a irc: merge arrays with server options names and default values into a single array 2014-11-23 09:30:26 +01:00
Max Teufel 78234956b0 irc: add option irc.server.*.sasl_disconnect_on_fail (task #12204) 2014-11-22 13:44:44 +01:00
Sébastien Helleu 96325f913d irc: disable SSLv3 by default in server option "ssl_priorities" (closes #248) 2014-11-04 20:55:01 +01:00
Sébastien Helleu de067ff6a0 irc: reformat some code to make it more readable 2014-11-01 17:59:02 +01:00
Sébastien Helleu 7b546bea2e api: use microseconds instead of milliseconds in functions util_timeval_diff and util_timeval_add 2014-08-29 18:17:27 +02:00
Sébastien Helleu 56f5a01b99 irc: fix typo in a message 2014-06-19 07:49:54 +02:00
Sébastien Helleu 7aaf3be15b api: add argument "flags" in function hdata_new_list 2014-05-24 18:03:14 +02:00
Sébastien Helleu 00179e6244 irc: fix refresh of bar item "irc_channel" after join/part/kick/kill (issue #86) 2014-05-23 22:49:03 +02:00
Sébastien Helleu b1430131a7 core: add bar item "buffer_short_name" (task #10882) 2014-05-16 20:55:56 +02:00