Sébastien Helleu
e2135fc3eb
core: add functions to compute binary/hex hash of data
2020-02-29 15:46:25 +01:00
Sébastien Helleu
91701cbdb4
php: fix crash when loading script with PHP 7.4 ( closes #1452 )
2020-02-28 21:28:29 +01:00
Sébastien Helleu
6daa09b0b8
script: fix memory leak in read of script repository file if it has invalid content
2020-02-18 21:04:21 +01:00
Sébastien Helleu
c6e9e18aaa
script: fix unexpected display of scripts list in buffer with command /script list -i
2020-02-16 08:04:58 +01:00
Sébastien Helleu
3fc0f1957e
script: remove dead assignment of variable length in function script_action_list_input
2020-02-16 07:59:02 +01:00
Sébastien Helleu
230f648584
irc: use irc_server_prefix_chars_default if server->prefix_chars is NULL
2020-02-10 21:18:47 +01:00
Sébastien Helleu
9904cb6d2e
irc: fix crash when receiving a malformed message 352 (who)
...
Thanks to Stuart Nevans Locke for reporting the issue.
2020-02-10 07:37:11 +01:00
Sébastien Helleu
40ccacb433
irc: fix crash when a new message 005 is received with longer nick prefixes
...
Thanks to Stuart Nevans Locke for reporting the issue.
2020-02-09 20:04:45 +01:00
Sébastien Helleu
5edbeea338
core: fix unlikely memory leak in completion
2020-02-09 06:56:53 +01:00
Sébastien Helleu
6f4f147d8e
irc: fix crash when receiving a malformed message 324 (channel mode)
...
Thanks to Stuart Nevans Locke for reporting the issue.
2020-02-08 20:24:50 +01:00
Sébastien Helleu
2769989751
irc: remove nested switches in function irc_color_decode_ansi_cb
2020-02-07 21:29:46 +01:00
Sébastien Helleu
60f2734184
irc: use dynamic string in function irc_color_encode
2020-02-05 21:51:11 +01:00
Sébastien Helleu
5b902eb804
irc: replace realloc by dynamic string in function irc_color_decode
2020-02-05 21:50:39 +01:00
Sébastien Helleu
27266ccd02
core: rename function util_get_uptime to util_get_time_diff
...
The two times must be sent as parameters, which makes the function not specific
to uptime. It is now easier to test the function in unit tests.
2020-02-02 13:57:39 +01:00
Sébastien Helleu
4e2718d234
irc: add nick changes in the hotlist (except self nick change)
2020-02-01 23:02:55 +01:00
orbea
6d2d304136
Fix the build with guile-3.0.0.
...
v2: Update configure.ac too.
Signed-off-by: orbea <orbea@riseup.net>
2020-01-30 22:05:43 +01:00
Sébastien Helleu
f980820395
logger: fix crash when disabling logging on a buffer ( closes #1444 )
...
Crash happens if the log file was deleted before disabling logging and if the
option logger.file.info_lines is on.
2020-01-25 13:42:12 +01:00
Sébastien Helleu
4d67af399d
core: flush stdout/stderr before forking in hook_process function ( closes #1441 )
2020-01-20 21:15:15 +01:00
Sébastien Helleu
7cd566e8d3
core: reset variable "old_full_name" after send of signal "buffer_renamed" (issue #1428 )
2020-01-12 17:09:47 +01:00
Sébastien Helleu
b79cd6d546
relay: update buffers synchronization when buffers are renamed ( closes #1428 )
2020-01-12 17:03:16 +01:00
Sébastien Helleu
1fac6fd404
core: add variable "old_full_name" in buffer, set before the buffer is renamed (issue #1428 )
2020-01-12 16:57:08 +01:00
Sébastien Helleu
4f9c4fecd3
irc: case-insensitive comparison on incoming CTCP command, force upper case on CTCP replies ( closes #1439 )
2020-01-11 11:02:41 +01:00
Sébastien Helleu
9ac4639c8c
xfer: send signal "xfer_ended" after the received file has been renamed ( closes #1438 )
2020-01-04 11:19:47 +01:00
Sébastien Helleu
feb6258910
core: update copyright dates
2020-01-04 10:41:26 +01:00
Sébastien Helleu
481da803cb
buflist: add pointer "window" in bar item evaluation
2019-12-26 22:44:19 +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
e612e63140
core: fix evaluation of condition with nested "if" ( closes #1434 )
2019-12-18 21:22:36 +01:00
Sébastien Helleu
a13099aa63
core: add debug option "-d" in command /eval (issue #1434 )
2019-12-18 21:18:59 +01:00
Sébastien Helleu
7e833ee60b
core: add missing variable "proxy" in function hook_connect_print_log
2019-12-18 07:55:39 +01:00
Sébastien Helleu
bb62485aa9
irc: fix memory leak when the channel topic is changed
2019-12-15 07:27:45 +01:00
Matthew Horan
f966329862
api: add info "weechat_headless"
2019-12-13 21:30:54 +01:00
Simmo Saan
c487965e8b
irc: add GnuTLS >= 3.1.0 requirement to ssl_password option help (issue #115 )
2019-12-13 21:18:22 +01:00
Simmo Saan
139a7053e4
irc: fix compilation with GnuTLS < 3.1.0 (issue #115 )
...
Due to this ssl_password will be partially unused with GnuTLS < 3.1.0.
In that case an encrypted SSL client cert import will simply fail.
2019-12-13 21:18:22 +01:00
Sébastien Helleu
d66a02ca9d
core: move each hash algorithm in a separate function (issue #635 )
2019-11-25 22:31:36 +01:00
Sébastien Helleu
b43ab911fd
core: add more info in /help weechat.look.nick_color_hash_salt (issue #635 )
2019-11-25 21:38:58 +01:00
Sébastien Helleu
0044fa1902
core: remove allocation of string when salt is used (issue #635 )
2019-11-25 21:38:55 +01:00
Simmo Saan
1a00368888
core: add option weechat.look.nick_color_hash_salt to allow for reshuffling of colors (issue #635 )
2019-11-25 21:38:20 +01:00
Sébastien Helleu
e743e731ec
irc: do not automatically open a channel with name "0" ( closes #1429 )
...
"0" is a special channel name which causes a client to leave all the channels
it is presently on.
Note that when option irc.look.buffer_open_before_join is on, WeeChat may still
open channel buffers with an invalid channel name like "1". The server should
reply something like that, displayed on the server buffer:
1: No such channel
2019-11-21 20:35:32 +01:00
Sébastien Helleu
8cde654c6f
core: set buffer name, short name and title only if the value has changed
...
This fix reduces the number of messages "_buffer_title_changed" sent to the
weechat relay clients in IRC private buffers (this message was sent for every
new message received in the private buffer).
2019-11-17 21:48:17 +01:00
Sébastien Helleu
3a03184d7a
irc: mention /filter command in /help irc.look.smart_filter
2019-11-15 08:38:40 +01:00
Eli Schwartz
5c8ac69f73
python: use more idiomatic cmake pkg-config linking
...
cmake documentation is absolutely atrocious, and I don't know why they
mention all the wrong things to use, and the cargo cult of successfully
writing a cmake build definition (copy-pasting what works from other
projects) also uses all the wrong things. But it turns out it is
possible to correctly link a PkgConfig target despite all that, at
least, *iff* you use cmake >= 3.13. I've chosen option 2, which is to
vendor in cmake >= 3.13's FindPkgConfig module in the previous commit.
Using IMPORTED_TARGET GLOBAL in a pkg-config check will result in a
proper linker target being created. For comparison, this is like using
meson's dependency() target, except meson forces you to do this by
default. The result is that the build system's internal representation
of how to link something, is used instead of manually passing build
flags defined in variables.
This is an important distinction to make, because cmake does not have a
list datatype, and instead turns lists into strings separated by ';'
which are indistinguishable from, like, strings which contain ';'
characters. When you pass the resulting list-which-isn't-really-a-list
to link an executable/library, you either need to preprocess the
variable to replace ';' with ' ' (just in case there are multiple
elements) or use cmake functions which magically know to do this
themselves -- or at least, I assume there are cmake functions that
correctly handle so-called "lists", or there would be no need for
"lists" to exist.
The IMPORTED_TARGET will define a bunch of INTERFACE_* properties which
do seem to do exactly this. The resulting build definition should
actually, correctly, link python, thereby fixing #1398 in a better way.
2019-11-12 21:19:47 +01:00
Jerome Duval
8d991f1284
Haiku: link libnetwork, not libpthread.
2019-11-10 11:04:47 +01:00
Sébastien Helleu
9f8162651f
irc: set option irc.look.display_pv_warning_address to off by default (issue #892 )
...
This is because the bitlbee server causes the warning to be displayed when it
is not expected (the address of remote nick changes multiple times on login).
2019-11-08 21:27:12 +01:00
Sébastien Helleu
6507544947
irc: fix typo and examples in /help server
2019-11-03 14:54:45 +01:00
Sébastien Helleu
10f85df867
irc: set raw filter to "*" if local variable "filter" was not set after /upgrade on raw buffer
2019-11-03 09:55:09 +01:00
Sébastien Helleu
7e07954fbf
irc: restore irc raw filter after /upgrade (issue #1000 )
2019-11-03 09:28:16 +01:00
Sébastien Helleu
015ae4a94b
irc: add filters on raw buffer ( closes #1000 )
2019-11-03 09:01:44 +01:00
Sébastien Helleu
4a86ab55d8
fset: add comment on filter by evaluated expression
2019-10-30 19:41:56 +01:00
Sébastien Helleu
7cac32fc1f
fset: fix filter variable used to match filter string
2019-10-30 19:41:31 +01:00
Sébastien Helleu
c6161d0e4a
plugins: sort options added in configuration sections
2019-10-23 19:45:06 +02:00
Sébastien Helleu
ecc7edda9e
core: optimize search of options in configuration sections
...
Since options are sorted in sections, it is faster to search from the last
option to the first one.
For configuration files with many options in a single section (like
plugins.conf), the load of configuration file is about 2 to 3x faster.
2019-10-23 19:45:06 +02:00
Sébastien Helleu
5d4220a91f
core: fix scrolling up in bare mode when switched to bare mode at the top of the buffer ( closes #899 , issue #978 )
2019-10-14 20:44:15 +02:00
Sébastien Helleu
513f5a1ee7
python: send "bytes" instead of "str" to callbacks in Python 3 when the string is not UTF-8 valid (issue #1220 , closes #1389 )
2019-10-12 22:21:48 +02:00
Sébastien Helleu
8fc8f728d4
core: add reverse of string for screen in evaluation of expressions with "revscr:"
2019-10-12 20:14:36 +02:00
Sébastien Helleu
876a0a1609
irc: add option irc.look.display_pv_warning_address ( closes #892 )
...
If the address of remote nick changes in a private buffer, a warning is
displayed.
2019-10-11 20:26:34 +02:00
Simmo Saan
116150c2fc
irc: add server option ssl_password for SSL certificate private key password ( closes #115 )
2019-10-09 21:37:41 +02:00
Sébastien Helleu
5398f5d566
irc: fix compiler warning on uninitialized variable
2019-10-09 07:17:32 +02:00
Sébastien Helleu
cbeecc0cde
core: ensure completion_item is not NULL before using it
2019-10-06 21:47:56 +02:00
Sébastien Helleu
528c769e71
core: fix crash in completion of filenames
2019-10-06 21:45:27 +02:00
Sébastien Helleu
c3b33859ae
core: fix long lines
2019-10-06 19:09:29 +02:00
Sébastien Helleu
f2551b8403
Merge remote-tracking branch 'origin/pr/630'
2019-10-06 19:07:25 +02:00
Sébastien Helleu
e6570d6e3a
core: fix line too long, add comment on argument "with_suffix"
2019-10-06 18:11:58 +02:00
Sébastien Helleu
e47002884a
core: count suffix in alignment computed for context info
2019-10-06 18:08:52 +02:00
Sébastien Helleu
c77bccba87
Merge remote-tracking branch 'origin/pr/619'
2019-10-06 18:08:17 +02:00
Sébastien Helleu
53360a7909
logger: fix write in log file if it has been deleted or renamed ( closes #123 )
2019-10-06 13:36:35 +02:00
Sébastien Helleu
587f5bf15b
irc: use path from option xfer.file.upload_path to complete filename in command "/dcc send" ( closes #60 )
2019-10-06 09:38:52 +02:00
Sébastien Helleu
6e382d26a9
core: add optional default path (evaluated) in completion "filename" (issue #60 )
2019-10-06 09:38:20 +02:00
Sébastien Helleu
88aa82d672
core: add support of modifiers in evaluation of expressions with "modifier:name,data,string" (issue #60 )
2019-10-06 09:13:35 +02:00
Sébastien Helleu
1a0ba4a9dc
api: add modifier "eval_path_home" (issue #60 )
2019-10-06 09:06:55 +02:00
Sébastien Helleu
e921b9f432
core: fix comments on modifier callback functions in plugin API
2019-10-06 08:56:12 +02:00
Sébastien Helleu
3c0bdc18f3
xfer: add option xfer.file.download_temporary_suffix with default value ".part" ( closes #1237 )
2019-10-05 18:11:39 +02:00
Sébastien Helleu
6c23f632b1
xfer: fix memory leak when a xfer is freed and when the plugin is unloaded
2019-10-05 17:49:07 +02:00
Sébastien Helleu
3e189fa60d
irc: fix typo in /help links
2019-10-04 20:44:09 +02:00
Sébastien Helleu
70fd722278
logger: add option logger.file.color_lines ( closes #528 , closes #621 )
2019-10-02 20:44:12 +02:00
Sébastien Helleu
e386965aba
api: add modifier "color_encode_ansi" (issue #528 )
2019-10-01 18:31:41 +02:00
Sébastien Helleu
90f711a965
core: add function to convert WeeChat colors to ANSI colors (issue #528 )
2019-10-01 18:31:41 +02:00
Sébastien Helleu
177fa6c528
core: add support of reverse video in ANSI color codes
2019-10-01 18:31:41 +02:00
Sébastien Helleu
daad558291
core: fix typos in comments
2019-10-01 18:31:41 +02:00
Sébastien Helleu
baf8f635ff
core: fix style in CMake files
2019-10-01 18:31:41 +02:00
Sébastien Helleu
ae38b11407
irc: add "user" in output of irc_message_parse ( closes #136 )
2019-09-27 20:52:00 +02:00
Sébastien Helleu
3f33b327b1
logger: move logger backlog functions to logger-backlog.c
2019-09-26 21:26:23 +02:00
Sébastien Helleu
3a356f109f
core: add power operator "**" in calc expressions (issue #997 )
2019-09-24 21:03:56 +02:00
Sébastien Helleu
7d795c4d53
core: fix wrong results with the unary minus in calc expressions
2019-09-24 20:49:48 +02:00
Simmo Saan
e437613acb
irc: add separate options for kick/kill message coloring ( closes #683 )
...
Add new options irc.color.message_kick and irc.color.reason_kick to be used
for coloring KICK and KILL messages.
2019-09-23 21:22:49 +02:00
Sébastien Helleu
39b6fb6137
irc: remove option irc.network.channel_encode, add server option "charset_message" ( closes #832 )
...
This new option controls which part of the IRC message is decoded/encoded to
the target charset, and the new default behavior is to decode/encode the whole
IRC message (behavior in WeeChat >= 1.3 was to decode/encode only the text by
default).
2019-09-22 20:41:00 +02:00
Sébastien Helleu
afce4804f5
guile: disable "/guile eval" as this does not (yet) work with Guile >= 2.2 (issue #1098 )
2019-09-21 14:48:09 +02:00
Sébastien Helleu
387a44f5ec
guile: add support of Guile 2.2 (issue #1098 )
2019-09-21 14:48:05 +02:00
Sébastien Helleu
e1a4612797
core: ignore color codes in ${length:xxx} and ${lengthscr:xxx}
2019-09-21 13:54:36 +02:00
Sébastien Helleu
dcfc4e8ed5
core: add "length:xxx" and "lengthscr:xxx" in evaluation of expressions
2019-09-21 07:56:21 +02:00
Sébastien Helleu
997894edc0
core: add calculation of expression in evaluation of expressions with "calc:..." (issue #997 )
2019-09-20 21:37:01 +02:00
Sébastien Helleu
5cf419dd63
core: remove extra spaces in arguments of /help uptime and /help version
2019-09-19 21:25:27 +02:00
Sébastien Helleu
85f6c5eeda
script: add options "-ol" and "-il" in command /script, display "No scripts loaded" if no scripts are loaded
2019-09-19 21:20:55 +02:00
Tobias Stoeckmann
f7b84fcc67
Fixed segfault during excessive evaluation.
...
It is possible to trigger a segmentation fault while processing
an evaluation of repeating string. On a Linux 64 bit system,
enter this (or adjust arguments for 32 bit accordingly):
/eval -n ${repeat:1073741824,----}
It will overflow an integer calculation because int instead of
size_t is used. Proper check of int limitations fixes this issue.
I haven't changed this specific piece of code to size_t because it
would crash in other parts of the code tree instead. For now, int
is a limitating factor when it comes to strings (and should be
enough for sane use cases).
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
2019-09-17 21:26:52 +02:00
Sébastien Helleu
63a05d72d9
buflist: fix extra spaces between buffers when conditions are used to hide buffers ( closes #1403 )
...
This is a regression introduced in version 2.6 by commit
bf21ca072d
.
2019-09-17 21:21:28 +02:00
Sébastien Helleu
e8be4f62af
core: mention possible background color in /help weechat.look.nick_color_force
2019-09-16 20:58:12 +02:00
Sébastien Helleu
bff40e4c26
core: display an error on missing dependency in CMake ( closes #916 , closes #956 )
2019-09-15 07:49:03 +02:00
Sébastien Helleu
1beebdf01e
core: fix compilation with autotools on FreeBSD 12.0
2019-08-31 14:18:55 +02:00
Sébastien Helleu
8bb4549494
core: fix compilation of Python plugin on FreeBSD 12.0 ( closes #1398 )
2019-08-31 14:13:58 +02:00
Sébastien Helleu
68d6f1b415
api: add infos "term_colors" and "term_color_pairs"
2019-08-25 19:10:32 +02:00
Sébastien Helleu
f0685dd1b1
ruby: remove unused variable "ruby_hide_errors"
2019-08-25 07:14:42 +02:00