Sébastien Helleu
72dce52901
core, plugins: replace "%p" by "%lx" in calls to sscanf
2025-05-15 20:12:12 +02:00
Sébastien Helleu
de7150c65b
Revert "core, plugins: replace "%lx" by "%p" in calls to sscanf"
...
This reverts commit e64ab3c675 .
This was causing incorrect conversion of strings "0x..." to pointers on systems
like Solaris/ILLUMOS.
And as a side effect, buffers were sometimes empty in weechat relay clients
like glowing-bear.
2025-05-15 20:10:32 +02:00
Sébastien Helleu
d475c16671
core: fix buffer overflow in function utf8_next_char and return NULL for empty string
...
Now the function utf8_next_char with an empty string returns NULL instead of
the next char, which is most of the time after an allocated buffer.
And the function utf8_char_size with an empty string now returns 0 instead of
1.
This indirectly fixes a buffer overflow in function eval_string_range_chars
when the input string is empty (for example when doing `/eval -n ${chars:}`).
2025-05-10 20:53:04 +02:00
Sébastien Helleu
2bc290b6ed
core: fix integer overflow and return "unsigned long" in function util_version_number
2025-05-08 18:45:39 +02:00
Sébastien Helleu
51d24fd2da
api: add function file_compare (issue #2250 )
2025-05-07 20:44:48 +02:00
Sébastien Helleu
a1cbe63a42
tests: move CMake file, main C++/headers for tests and scripts to unit directory
2025-05-05 13:18:34 +02:00
Sébastien Helleu
683fa2f585
irc: add support of strikethrough color attribute (using half bright) ( closes #2248 )
...
As ncurses doesn't support strikethrough, the text is rendered as half
bright (WeeChat color: "dim").
2025-04-26 14:10:43 +02:00
Sébastien Helleu
2475f20cb7
all: move description of C files below the copyright and license
2025-03-31 11:47:49 +02:00
Sébastien Helleu
3a6ac9ee76
all: add SPDX license tag
2025-03-31 07:49:26 +02:00
Sébastien Helleu
d8987a1678
all: replace Copyright lines by SPDX copyright tag
2025-03-30 14:47:12 +02:00
Sébastien Helleu
caa7af253a
tests: add tests on function util_strftimeval with microseconds < 0 or > 999999
2025-03-17 08:12:33 +01:00
Sébastien Helleu
9fe5fa23a0
core: convert "long long" to "unsigned long long" in functions util_get_microseconds_string and util_parse_delay
2025-03-16 11:13:25 +01:00
Sébastien Helleu
547e2b934e
core: update copyright dates
2025-02-01 23:13:18 +01:00
Sébastien Helleu
d302294723
relay/api: always return a body with field "error" in error responses
2025-01-07 07:52:09 +01:00
Sébastien Helleu
60422ca6b1
relay: remove extra space in JSON authentication error
2025-01-07 07:28:45 +01:00
Sébastien Helleu
9d3388b09e
relay/api: use cjson lib to return errors
2025-01-07 07:23:55 +01:00
Sébastien Helleu
d10af1037b
relay/api: use cjson lib to build JSON body of handshake request
2025-01-07 07:18:01 +01:00
Nils
c6c420c698
relay: add completion resource
2025-01-05 14:54:07 +01:00
Sébastien Helleu
732f24b6ba
core: add command /pipe
2024-12-16 13:39:14 +01:00
Trygve Aaberge
11faf85402
tests: add test for combining request headers
2024-11-24 16:15:35 +01:00
Trygve Aaberge
a414fb9da5
tests: add tests for auth via Sec-WebSocket-Protocol
2024-11-24 16:00:25 +01:00
Sébastien Helleu
244595d94f
api: add support of flags in functions hook_signal_send and hook_hsignal_send
...
For now the only supported flag is:
- "stop_on_error": stop execution of callbacks immediately after an
error (ie return code of callback is WEECHAT_RC_ERROR) and return this code
(by default execute all callbacks and return the last return code, or return
WEECHAT_RC_EAT immediately if a callback returns this)
Example:
hook_signal_send("[flags:stop_on_error]my_signal", WEECHAT_HOOK_SIGNAL_STRING, "test");
2024-11-24 10:29:32 +01:00
Sébastien Helleu
26e16fdea7
tests: add extra tests on function string_split
...
New tests:
- split empty string
- standard split with only separators in string
- standard split with only separators in string and strip separators
2024-10-21 08:23:55 +02:00
Sébastien Helleu
50a9c88b79
core: check that version is not NULL or empty string in function util_version_number
2024-10-21 08:23:55 +02:00
Sébastien Helleu
bca7c7438a
api: add special value - (hyphen-minus) in options of function command_options to prevent execution of commands (issue #2199 )
2024-10-13 11:15:10 +02:00
Sébastien Helleu
ec78084f49
tests: add tests on function input_data
2024-10-12 21:04:13 +02:00
Josh Soref
dcd62f7ee6
spelling: shift
...
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com >
2024-09-28 21:22:56 +02:00
Josh Soref
7f93f81a82
spelling: separator
...
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com >
2024-09-28 21:22:56 +02:00
Josh Soref
87f2bb0a23
spelling: passphrase
...
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com >
2024-09-28 21:22:56 +02:00
Josh Soref
9f67ae369c
spelling: negotiation
...
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com >
2024-09-28 21:22:56 +02:00
Josh Soref
6fdf39165a
spelling: client
...
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com >
2024-09-28 18:22:41 +02:00
Josh Soref
c28696e602
spelling: case-sensitive
...
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com >
2024-09-28 18:22:41 +02:00
Josh Soref
0505a0ff76
spelling: case-insensitive
...
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com >
2024-09-28 18:22:41 +02:00
Sébastien Helleu
6534919868
irc: decode IRC color codes only when displaying messages
...
Before parsing IRC messages, they were almost all changed to convert IRC color
codes to WeeChat color codes, which caused some bugs when storing data like
account and real names (stored with WeeChat color codes instead of IRC colors).
Now the messages are parsed as-is, then the colors are converted only when
strings are displayed in a buffer by `weechat_printf()`.
2024-09-22 23:05:16 +02:00
Sébastien Helleu
02847246b2
core, plugins, tests: fix octal notation in strings
2024-09-19 08:34:18 +02:00
Sébastien Helleu
1cf65df089
tests: add tests on missing supported IRC messages
2024-09-15 21:47:43 +02:00
Sébastien Helleu
01103cb02a
irc: do not strip trailing spaces from incoming IRC messages
2024-09-15 21:47:32 +02:00
Sébastien Helleu
6908eec160
tests: replace POINTERS_EQUAL by STRCMP_EQUAL in string comparisons with NULL
2024-09-14 10:26:42 +02:00
Sébastien Helleu
5f62eb1f2b
tests: add tests on function string_rebuild_split_string with empty items
2024-09-07 08:27:26 +02:00
Sébastien Helleu
3253500d15
irc: add option irc.look.notice_nicks_disable_notify
2024-09-02 19:55:27 +02:00
Sébastien Helleu
434c1ee3c4
relay/api: send the sync request at the same time as buffer data retrieval
...
This fixes events missed by the client when synchronizing after fetching data.
2024-08-25 21:13:38 +02:00
Sébastien Helleu
6bb4d64512
relay/api: allow array with multiple requests in websocket frame received from client
2024-08-25 20:48:52 +02:00
Sébastien Helleu
d4ca32832e
relay: redefine bar item "input_prompt" to display the connection status on remote buffers, if different from "connected"
2024-08-21 20:37:00 +02:00
Sébastien Helleu
a317c785fb
relay/api: add automatic reconnection to remote ( closes #2166 )
...
New options:
- remote option "autoreconnect_delay"
- relay.api.remote_autoreconnect_delay_growing
- relay.api.remote_autoreconnect_delay_max
2024-08-11 12:18:28 +02:00
Sébastien Helleu
24734c4fe0
relay/api: add field "tmie_displayed" in GET /api/buffers
2024-08-10 13:58:58 +02:00
Sébastien Helleu
41ab22554c
tests/relay/api: add missing fields in test of buffer to json function
2024-08-10 13:42:38 +02:00
Sébastien Helleu
b00f94dc70
relay/api: add field "hidden" in GET /api/buffers (issue #2159 )
2024-08-10 12:42:55 +02:00
Sébastien Helleu
07ef722c06
relay/api: disconnect cleanly when the remote is quitting ( closes #2168 )
2024-08-09 23:37:33 +02:00
Sébastien Helleu
6e775e4768
relay/api: close obsolete buffers when reconnecting to the remote
...
This closes all buffers that exist locally but not on the remote any more,
after reconnecting to the remote.
2024-08-09 18:08:31 +02:00
Sébastien Helleu
eb5399518e
relay/api: clear lines and nicklist on all remote buffers upon successful connection to the remote ( closes #2161 )
2024-08-09 18:01:59 +02:00