1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-25 12:26:40 +02:00

Compare commits

...

62 Commits

Author SHA1 Message Date
Sébastien Helleu 9df8044cae irc: fix send of split messages when server option "anti_flood" set to 0 (issue #2172) 2024-08-15 20:23:12 +02:00
Sébastien Helleu 679a87c571 Version 4.3.7-dev 2024-08-15 20:21:01 +02:00
Sébastien Helleu da301b41d3 Version 4.3.6 2024-08-15 15:21:34 +02:00
LuK1337 c12c488933 core: replace manual endianness swap with htobe64() call
This fixes generation of TOTP and tests on FreeBSD.
2024-08-14 12:19:52 +02:00
Sébastien Helleu 345d99a9b5 relay/api: fix timezone of dates sent to clients (issue #2151) 2024-07-16 23:50:24 +02:00
Sébastien Helleu c6ad4bfd20 relay/api: remove unused macro MSG_ADD_HDATA_TIME (issue #2151) 2024-07-16 23:50:16 +02:00
Sébastien Helleu 43697033cf relay: fix crash when sending data to a remote buffer when the remote has been deleted (issue #2157) 2024-07-16 23:48:53 +02:00
Sébastien Helleu eb7fd8ac9e Version 4.3.6-dev 2024-07-16 22:38:57 +02:00
Sébastien Helleu 2325d43447 Version 4.3.5 2024-07-16 22:27:17 +02:00
Sébastien Helleu 7cb991667c ruby: fix crash in plugin initialization (issue #2163)
This regression was introduced by commit
3d041a0364.
2024-07-15 09:39:49 +02:00
Sébastien Helleu 22370481a0 Version 4.3.5-dev 2024-07-03 22:02:03 +02:00
Sébastien Helleu 3d40f96e2d Version 4.3.4 2024-07-03 21:50:54 +02:00
Sébastien Helleu f29dd1585e relay/api: fix "body_type" returned when lines or nicks of a buffer are requested 2024-06-30 00:41:49 +02:00
Sébastien Helleu 3d041a0364 ruby: fix builtin functions not available (issue #2109) 2024-06-29 08:01:38 +02:00
Sébastien Helleu f418b4204e core: add missing command /filter in ChangeLog (issue #1956) 2024-06-29 08:00:16 +02:00
Brad Smith 680426100d tests: fix compilation of tests on OpenBSD 2024-06-28 23:23:45 +02:00
Sébastien Helleu b1a4cd3fab core: fix crash when deleting a bar that has no items (issue #2138) 2024-06-27 18:55:01 +02:00
Sébastien Helleu 486ea8837a python: call empty eval workaround before auto-load of scripts (issue #2046, issue #2126)
This should definitely fix the crash with Python 3.12, even when scripts are
auto-loaded (the previous fix was working only when the scripts are loaded
manually).
2024-06-26 19:07:35 +02:00
Sébastien Helleu e5725a366d scripts: fix reset of "quiet" status in case of nested calls (issue #2046, issue #2126) 2024-06-26 19:07:33 +02:00
Sébastien Helleu 1de31fc6a2 core: update ChangeLog (issue #2046, issue #2126) 2024-06-23 18:45:48 +02:00
Trygve Aaberge 4dd47188f5 python: unload script interpreters before eval interpreter
The workaround in the previous commit didn't work for one user, so try
unloading the eval interpreter last to see if that helps.
2024-06-23 18:43:27 +02:00
Trygve Aaberge 35df848e73 python: add workaround for crash on unload with Python 3.12
Python 3.12 has a bug where it crashes when you unload all the
interpreters unless you make sure to unload the first interpreter you
loaded last. For some reason, loading the eval interpreter before any
scripts also seems to prevent the issue, even if the eval interpreter is
unloaded before the other interpreters.

So this just evals an empty string at the end of initing the Python
plugin if the Python version is 3.12, to make sure the eval interpreter
is loaded first.

Fixes #2046
2024-06-23 18:43:25 +02:00
Sébastien Helleu 1cec7e8126 Version 4.3.4-dev 2024-06-22 11:04:53 +02:00
Sébastien Helleu a70ca92b74 Version 4.3.3 2024-06-22 11:02:31 +02:00
Sébastien Helleu 684f10c442 debian: update changelog 2024-06-22 10:10:23 +02:00
Sébastien Helleu 2d081b0ef3 core: add version 4.3.3 in release notes 2024-06-22 09:28:46 +02:00
Sébastien Helleu 19be144d2f tests: add tests of hdata returning NULL pointer in eval 2024-06-22 09:09:12 +02:00
Sébastien Helleu fb9a69c6ae core, plugins: return "0x0" instead of "(nil)" for pointers formatted in strings
This is a partial revert of the commit
965beb37de.
2024-06-22 08:59:50 +02:00
Sébastien Helleu c82486d437 core: add issue #446 in ChangeLog 2024-06-10 13:45:48 +02:00
Sébastien Helleu 802e462ce5 perl: fix quote of variable PERL_LFLAGS in CMake file 2024-06-10 09:23:03 +02:00
LuK1337 126a42235c tests: relay: fix relay_http_parse_header function prototype 2024-06-07 12:45:12 +02:00
Sébastien Helleu ddb1db9a2c tests: reset option relay.network.websocket_allowed_origins after changing it in tests (issue #2127)
This fixes a test failure when the test changing the option is executed before
this one:

…/tests/unit/plugins/relay/api/test-relay-api-protocol.cpp:799: error: Failure in TEST(RelayApiProtocolWithClient, RecvJson)
        expected <HTTP/1.1 101 Switching Protocols
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Accept: Z5uTZwvwYNDm9w4HFGk26ijp/p0=

>
        but was  <HTTP/1.1 403 Forbidden
Content-Length: 0

>
        difference starts at position 9 at: < HTTP/1.1 403 Forbid>
2024-06-07 12:36:58 +02:00
Sébastien Helleu 26c000c6b0 Version 4.3.3-dev 2024-06-06 21:50:46 +02:00
Sébastien Helleu 59e292a5be Version 4.3.2 2024-06-06 21:45:29 +02:00
Sébastien Helleu 8617bd7d2a core: add version 4.3.2 in release notes 2024-06-06 21:43:37 +02:00
Sébastien Helleu e262cd47b4 xfer: fix display of input prompt in DCC chat buffers (issue #2128) 2024-06-06 13:31:21 +02:00
Sébastien Helleu 5a7db09eb2 irc: fix display of input prompt in private buffers (issue #2128) 2024-06-05 21:05:17 +02:00
Sébastien Helleu 5fc7813643 irc: don't return pointer to irc server if the channel or nick is not found in info "irc_buffer" 2024-06-02 22:50:24 +02:00
Sébastien Helleu dc319af254 core: add link to issue #1549 for ChangeLog entries about permessage-deflate 2024-06-02 09:56:28 +02:00
Sébastien Helleu e920903354 relay: enable websocket extension "permessage-deflate" with "api" relay only 2024-06-02 09:09:16 +02:00
Sébastien Helleu 6457394042 relay: add option relay.look.raw_messages_max_length (issue #2122) 2024-06-01 22:38:55 +02:00
Sébastien Helleu 7516774474 relay: fix websocket permessage-deflate extension when the client doesn't send the max window bits parameters 2024-06-01 22:28:37 +02:00
Sébastien Helleu a9d1b2990f relay: fix allocation and reinit of field "client_context_takeover" in websocket deflate structure 2024-06-01 14:43:31 +02:00
Sébastien Helleu 13198697a9 Version 4.3.2-dev 2024-06-01 14:39:12 +02:00
Sébastien Helleu 2a0e578ae7 Version 4.3.1 2024-05-31 13:34:43 +02:00
Sébastien Helleu 571da9f056 core: add note about old libgcrypt versions in release notes 2024-05-31 13:34:23 +02:00
Sébastien Helleu 88b021f1b7 core: add version 4.2.3 in ChangeLog and release notes 2024-05-31 13:25:45 +02:00
Sébastien Helleu 7eb04b77fe xfer: fix send of data on the DCC chat buffer after /upgrade if the buffer was opened before the upgrade (issue #2092) 2024-05-31 08:25:22 +02:00
Sébastien Helleu b615e6cee7 core: add version 4.3.1 in release notes 2024-05-27 12:14:02 +02:00
Sébastien Helleu d1d7d4573c core: fix detection of libgcrypt ≥ 1.11 (debian #1071960)
Use pkg-config to detect libgcrypt, since command `libgcrypt-config` is not
available any more.

Remove patches for Debian/Raspbian Buster and Ubuntu Bionic: detection of
libgcrypt don't work any more with version 1.8.4 on Debian Buster and 1.8.1 on
Ubuntu Bionic (both versions don't provide the file `libgcrypt.pc`).
2024-05-27 08:24:03 +02:00
Sébastien Helleu 43d9c20e36 irc: close /list buffer when the server buffer is closed (issue #2121) 2024-05-27 07:42:30 +02:00
Sébastien Helleu 8ea0aa5f41 core, relay: fix include directory of libcjson and libzstd 2024-05-26 23:16:41 +02:00
Sébastien Helleu f02ecf3e83 php: fix return value of function hdata_longlong 2024-05-26 16:25:20 +02:00
Sébastien Helleu 490a0b9db0 core: add link to issues in ChangeLog 2024-05-26 16:08:42 +02:00
LuK1337 0ce38e7d58 tcl: fix return value for hdata_longlong
Using API_RETURN_LONG() here breaks tests on i368.
2024-05-26 16:07:44 +02:00
Sébastien Helleu bc380447eb tests: fix compilation of tests on Rocky 9.4 2024-05-26 16:00:53 +02:00
Sébastien Helleu 73c8b5f93c core: add note about lag in buflist in release notes 2024-05-26 14:59:39 +02:00
Sébastien Helleu a6519001c8 core: update ChangeLog 2024-05-26 14:19:31 +02:00
LuK1337 8b106be58e tests: relay: fix HotlistToJson test on s390x
1: error: Failure in TEST(RelayApiMsg, HotlistToJson)
1: 	expected <2024-05-26T10:29:37.716512Z>
1: 	but was  <2024-05-26T10:29:37.000000Z>
1: 	difference starts at position 20 at: <T10:29:37.000000Z   >
2024-05-26 14:19:18 +02:00
LuK1337 66e63bf8cf tests: scripts: fix wrong ifdef check 2024-05-26 14:19:18 +02:00
LuK1337 94ff5e5758 tests: relay: add missing <string.h> include
Fixes build error on Fedora 40.
2024-05-26 14:19:18 +02:00
Sébastien Helleu 73720cf792 Version 4.3.1-dev 2024-05-26 14:19:18 +02:00
85 changed files with 978 additions and 597 deletions
+3 -2
View File
@@ -206,9 +206,10 @@ if(ENABLE_LARGEFILE)
endif() endif()
# Check for libgcrypt # Check for libgcrypt
find_package(GCRYPT REQUIRED) pkg_check_modules(LIBGCRYPT REQUIRED libgcrypt)
add_definitions(-DHAVE_GCRYPT) add_definitions(-DHAVE_GCRYPT)
list(APPEND EXTRA_LIBS ${GCRYPT_LDFLAGS}) include_directories(${LIBGCRYPT_INCLUDE_DIRS})
list(APPEND EXTRA_LIBS ${LIBGCRYPT_LDFLAGS})
# Check for GnuTLS # Check for GnuTLS
find_package(GnuTLS REQUIRED) find_package(GnuTLS REQUIRED)
+94 -2
View File
@@ -8,6 +8,89 @@
:see-release-notes: If you are upgrading: please see release notes. :see-release-notes: If you are upgrading: please see release notes.
:breaking: pass:quotes[*[breaking]*] :breaking: pass:quotes[*[breaking]*]
[[v4.3.7]]
== Version 4.3.7 (under dev)
[[v4.3.7_fixed]]
=== Fixed
* irc: fix send of split messages when server option "anti_flood" set to 0 (issue #2172)
[[v4.3.6]]
== Version 4.3.6 (2024-08-15)
[[v4.3.6_fixed]]
=== Fixed
* core: fix generation of TOTP on FreeBSD (issue #2171)
* relay/api: fix crash when sending data to a remote buffer when the remote has been deleted (issue #2157)
* relay/api: fix timezone of dates sent to clients (issue #2151)
[[v4.3.5]]
== Version 4.3.5 (2024-07-16)
[[v4.3.5_fixed]]
=== Fixed
* ruby: fix crash in plugin initialization (issue #2163)
[[v4.3.4]]
== Version 4.3.4 (2024-07-03)
[[v4.3.4_fixed]]
=== Fixed
* python: fix crash on quit with Python 3.12 (issue #2046, issue #2126)
* core: fix crash when deleting a bar that has no items (issue #2138)
* ruby: fix builtin functions not available (issue #2109)
* relay/api: fix "body_type" returned when lines or nicks of a buffer are requested
[[v4.3.3]]
== Version 4.3.3 (2024-06-22)
[[v4.3.3_fixed]]
=== Fixed
* core, plugins: return "0x0" instead of "(nil)" for pointers formatted in strings
[[v4.3.2]]
== Version 4.3.2 (2024-06-06)
[[v4.3.2_changed]]
=== Changed
* relay: enable websocket extension "permessage-deflate" with "api" relay only (issue #1549)
[[v4.3.2_added]]
=== Added
* relay: add option relay.look.raw_messages_max_length (issue #2122)
[[v4.3.2_fixed]]
=== Fixed
* irc, xfer: fix display of input prompt in IRC private buffers and DCC chat buffers (issue #2128)
* irc: don't return pointer to irc server if the channel or nick is not found in info "irc_buffer"
* relay: fix websocket permessage-deflate extension when the client doesn't send the max window bits parameters (issue #1549)
* relay: fix allocation and reinit of field "client_context_takeover" in websocket deflate structure (issue #1549)
[[v4.3.1]]
== Version 4.3.1 (2024-05-31)
[[v4.3.1_fixed]]
=== Fixed
* irc: close /list buffer when the server buffer is closed (issue #2121)
* xfer: fix send of data on the DCC chat buffer after `/upgrade` if the buffer was opened before the upgrade (issue #2092)
* php: fix return value of function hdata_longlong
* tcl: fix return value of function hdata_longlong (issue #2119)
* core: fix detection of libgcrypt ≥ 1.11 (debian #1071960)
* core, relay: fix include directory of libcjson and libzstd
* tests: fix relay tests on s390x (issue #2118)
* tests: fix check of php plugin (issue #2117)
* tests: fix compilation of tests on Fedora 40 (issue #2116)
* tests: fix compilation of tests on Rocky 9.4
[[v4.3.0]] [[v4.3.0]]
== Version 4.3.0 (2024-05-26) == Version 4.3.0 (2024-05-26)
@@ -28,7 +111,7 @@
* {breaking} core: rename variables with creation time in hdata "hotlist": "creation_time.tv_sec" to "time" and "creation_time.tv_usec" to "time_usec" * {breaking} core: rename variables with creation time in hdata "hotlist": "creation_time.tv_sec" to "time" and "creation_time.tv_usec" to "time_usec"
* {breaking} api: return `-1` or `1` if one input string is NULL and not the other in string comparison functions * {breaking} api: return `-1` or `1` if one input string is NULL and not the other in string comparison functions
* {breaking} api: use whole replacement string instead of first char in function string_remove_color * {breaking} api: use whole replacement string instead of first char in function string_remove_color
* core: use nick offline color for nick in action message * core: use nick offline color for nick in action message (issue #446)
* core: display a specific message when the value of option is unchanged after `/set` command * core: display a specific message when the value of option is unchanged after `/set` command
* core: add variable `${highlight}` in option weechat.look.buffer_time_format (issue #2079) * core: add variable `${highlight}` in option weechat.look.buffer_time_format (issue #2079)
* core: reintroduce help on the variables and operators in `/help eval` (issue #2005) * core: reintroduce help on the variables and operators in `/help eval` (issue #2005)
@@ -89,6 +172,15 @@
* tcl: fix truncation of long integer returned by function hdata_long * tcl: fix truncation of long integer returned by function hdata_long
* trigger: fix memory leak when adding a new trigger with `/trigger` command * trigger: fix memory leak when adding a new trigger with `/trigger` command
[[v4.2.3]]
== Version 4.2.3 (2024-05-31)
Bug fixes::
* xfer: fix send of data on the DCC chat buffer after `/upgrade` if the buffer was opened before the upgrade (issue #2092)
* irc: fix crash in split of IRC message containing a newline if the server is not given
* core, relay: fix include directory of libzstd
[[v4.2.2]] [[v4.2.2]]
== Version 4.2.2 (2024-04-07) == Version 4.2.2 (2024-04-07)
@@ -139,7 +231,7 @@ New features::
* core: move key kbd:[Ctrl+s], kbd:[Ctrl+u] to kbd:[Alt+Shift+U] (issue #2040) * core: move key kbd:[Ctrl+s], kbd:[Ctrl+u] to kbd:[Alt+Shift+U] (issue #2040)
* core: display only version with command `/version`, add options `-o` and `-ol` in command `/upgrade` * core: display only version with command `/version`, add options `-o` and `-ol` in command `/upgrade`
* core: add number of processes in command `/sys waitpid` * core: add number of processes in command `/sys waitpid`
* core, alias, trigger: allow wildcard in commands `/bar`, `/item`, `/proxy`, `/alias` and `/trigger` (issue #1956) * core, alias, trigger: allow wildcard in commands `/bar`, `/filter`, `/item`, `/proxy`, `/alias` and `/trigger` (issue #1956)
* api: add support of format/translation of command arguments description line by line (issue #2005) * api: add support of format/translation of command arguments description line by line (issue #2005)
* api: add function string_concat (issue #2005) * api: add function string_concat (issue #2005)
* api: add functions util_strftimeval, util_parse_time, printf_datetime_tags, printf_y_datetime_tags (issue #649) * api: add functions util_strftimeval, util_parse_time, printf_datetime_tags, printf_y_datetime_tags (issue #649)
+57
View File
@@ -11,6 +11,42 @@ It is recommended to read it when upgrading to a new stable version. +
For a complete list of changes, please look at ChangeLog. For a complete list of changes, please look at ChangeLog.
[[v4.3.6]]
== Version 4.3.6 (2024-08-15)
No release notes.
[[v4.3.5]]
== Version 4.3.5 (2024-07-16)
No release notes.
[[v4.3.4]]
== Version 4.3.4 (2024-07-03)
No release notes.
[[v4.3.3]]
== Version 4.3.3 (2024-06-22)
No release notes.
[[v4.3.2]]
== Version 4.3.2 (2024-06-06)
No release notes.
[[v4.3.1]]
== Version 4.3.1 (2024-05-31)
[[v4.3.1_libgcrypt]]
=== Detection of libgcrypt
The detection of libgcrypt has been fixed to properly detect libgcrypt >= 1.11. +
As a consequence, the detection of an old version of libgcrypt is failing if the
file `libgcrypt.pc` is not found. +
This affects old distributions like Debian Buster and Ubuntu Bionic.
[[v4.3.0]] [[v4.3.0]]
== Version 4.3.0 (2024-05-26) == Version 4.3.0 (2024-05-26)
@@ -22,6 +58,22 @@ The following relay options have been renamed:
* relay.color.status_waiting_auth -> relay.color.status_authenticating * relay.color.status_waiting_auth -> relay.color.status_authenticating
* relay.weechat.commands -> relay.network.commands (new default value: `*,!quit`) * relay.weechat.commands -> relay.network.commands (new default value: `*,!quit`)
[[v4.3.0_lag_in_buflist]]
=== Lag in buflist
The lag is now stored in all IRC buffers: server (like it always has been),
channels and private buffers.
Consequently, if you use `${format_lag}` in buflist options, this lag will be
displayed on server and all channels and private buffers.
If you want to display the lag only on server buffer in buflist, you can use
such format:
----
${if:${type}==server?${format_lag}}
----
[[v4.3.0_irc_color_channel_modes]] [[v4.3.0_irc_color_channel_modes]]
=== Color of IRC channel modes === Color of IRC channel modes
@@ -50,6 +102,11 @@ the keys with the following commands:
/reset weechat.key_mouse.@chat(script.scripts):wheelup /reset weechat.key_mouse.@chat(script.scripts):wheelup
---- ----
[[v4.2.3]]
== Version 4.2.3 (2024-05-31)
No release notes.
[[v4.2.2]] [[v4.2.2]]
== Version 4.2.2 (2024-04-07) == Version 4.2.2 (2024-04-07)
-53
View File
@@ -1,53 +0,0 @@
#
# Copyright (C) 2003-2024 Sébastien Helleu <flashcode@flashtux.org>
#
# This file is part of WeeChat, the extensible chat client.
#
# WeeChat is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# WeeChat is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with WeeChat. If not, see <https://www.gnu.org/licenses/>.
#
# - Find Gcrypt
# This module finds if libgcrypt is installed and determines where
# the include files and libraries are.
#
# This code sets the following variables:
#
# GCRYPT_CFLAGS = cflags to use to compile
# GCRYPT_LDFLAGS = ldflags to use to compile
#
find_program(LIBGCRYPT_CONFIG_EXECUTABLE NAMES libgcrypt-config)
set(GCRYPT_LDFLAGS)
set(GCRYPT_CFLAGS)
if(LIBGCRYPT_CONFIG_EXECUTABLE)
execute_process(COMMAND ${LIBGCRYPT_CONFIG_EXECUTABLE} --libs RESULT_VARIABLE _return_VALUE OUTPUT_VARIABLE GCRYPT_LDFLAGS OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET)
execute_process(COMMAND ${LIBGCRYPT_CONFIG_EXECUTABLE} --cflags RESULT_VARIABLE _return_VALUE OUTPUT_VARIABLE GCRYPT_CFLAGS OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET)
if(NOT DEFINED ${GCRYPT_CFLAGS})
set(GCRYPT_CFLAGS " ")
endif()
endif()
# handle the QUIETLY and REQUIRED arguments and set GCRYPT_FOUND to TRUE if
# all listed variables are TRUE
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GCRYPT REQUIRED_VARS GCRYPT_LDFLAGS GCRYPT_CFLAGS)
if(GCRYPT_FOUND)
mark_as_advanced(GCRYPT_CFLAGS GCRYPT_LDFLAGS)
endif()
+16
View File
@@ -1,3 +1,19 @@
weechat (4.3.1-1) unstable; urgency=medium
* New upstream release (Closes: #1067608)
- fix FTBFS against libgcrypt 1.11 (Closes: #1071960)
* Add build dependency on libcjson-dev
* Replace pkg-config build dependency by pkgconf
* Minor updates in debian/copyright
-- Emmanuel Bouthenot <kolter@debian.org> Sat, 01 Jun 2024 14:21:02 +0000
weechat (4.1.1-1) unstable; urgency=medium
* New upstream release (Closes: #1055278)
-- Emmanuel Bouthenot <kolter@debian.org> Fri, 03 Nov 2023 20:23:37 +0000
weechat (4.0.5-1) unstable; urgency=medium weechat (4.0.5-1) unstable; urgency=medium
* New upstream release * New upstream release
+6 -1
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2024-05-22 00:15+0200\n" "POT-Creation-Date: 2024-06-01 22:37+0200\n"
"PO-Revision-Date: 2024-04-07 14:50+0200\n" "PO-Revision-Date: 2024-04-07 14:50+0200\n"
"Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n" "Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -14416,6 +14416,11 @@ msgid ""
"\"weechat\", \"api\"" "\"weechat\", \"api\""
msgstr "" msgstr ""
msgid ""
"max number of chars to display in raw messages (very long messages can cause "
"slowness); 0 = display whole messages"
msgstr ""
#, fuzzy #, fuzzy
msgid "text color for client description" msgid "text color for client description"
msgstr "barva textu pro zvýrazněný prefix" msgstr "barva textu pro zvýrazněný prefix"
+57 -52
View File
@@ -26,7 +26,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2024-05-22 00:15+0200\n" "POT-Creation-Date: 2024-06-01 22:37+0200\n"
"PO-Revision-Date: 2024-05-24 10:45+0200\n" "PO-Revision-Date: 2024-05-24 10:45+0200\n"
"Last-Translator: Nils Görs <weechatter@arcor.de>\n" "Last-Translator: Nils Görs <weechatter@arcor.de>\n"
"Language-Team: German <kde-i18n-de@kde.org>\n" "Language-Team: German <kde-i18n-de@kde.org>\n"
@@ -2108,11 +2108,11 @@ msgstr ""
"undOperatoren (+, -, *, /, //, %, **)" "undOperatoren (+, -, *, /, //, %, **)"
msgid "" msgid ""
" - ${random:min,max}: a random integer number between \"min\" and " " - ${random:min,max}: a random integer number between \"min\" and \"max\" "
"\"max\" (inclusive)" "(inclusive)"
msgstr "" msgstr ""
" - ${random:min,max}: eine zufällige ganze Zahl zwischen \"min\" " " - ${random:min,max}: eine zufällige ganze Zahl zwischen \"min\" und\"max\" "
"und\"max\" (einschließlich)" "(einschließlich)"
msgid " - ${translate:string}: the translated string" msgid " - ${translate:string}: the translated string"
msgstr " - ${translate:string}: die übersetzte Zeichenkette" msgstr " - ${translate:string}: die übersetzte Zeichenkette"
@@ -3043,8 +3043,8 @@ msgid ""
" raw[chat(xxx)]: chat area for buffer with name \"xxx\" (full name " " raw[chat(xxx)]: chat area for buffer with name \"xxx\" (full name "
"including plugin)" "including plugin)"
msgstr "" msgstr ""
" raw[chat(xxx)]: Chatbereich für einen Buffer mit dem Namen " " raw[chat(xxx)]: Chatbereich für einen Buffer mit dem Namen \"xxx\" "
"\"xxx\" (vollständiger Name, mit Erweiterung)" "(vollständiger Name, mit Erweiterung)"
msgid " raw[bar(*)]: any bar" msgid " raw[bar(*)]: any bar"
msgstr " raw[bar(*)]: beliebige Bar" msgstr " raw[bar(*)]: beliebige Bar"
@@ -4976,8 +4976,8 @@ msgstr ""
"\"-yes\" ausgeführt werden (siehe /help quit)" "\"-yes\" ausgeführt werden (siehe /help quit)"
msgid "" msgid ""
"if set, /upgrade command must be confirmed with extra argument \"-" "if set, /upgrade command must be confirmed with extra argument \"-yes\" "
"yes\" (see /help upgrade)" "(see /help upgrade)"
msgstr "" msgstr ""
"ist diese Einstellung aktiviert, muss der \"/upgrade\" Befehl mit dem " "ist diese Einstellung aktiviert, muss der \"/upgrade\" Befehl mit dem "
"Argument \"-yes\" ausgeführt werden (siehe /help upgrade)" "Argument \"-yes\" ausgeführt werden (siehe /help upgrade)"
@@ -5033,10 +5033,10 @@ msgid ""
"weechat.color.emphasized* are used" "weechat.color.emphasized* are used"
msgstr "" msgstr ""
"Attribute um Textpassagen hervorzuheben: Das setzen von ein- oder mehreren " "Attribute um Textpassagen hervorzuheben: Das setzen von ein- oder mehreren "
"Attributen ist möglich (\"%\" für blinkenden Text, \".\" zum " "Attributen ist möglich (\"%\" für blinkenden Text, \".\" zum \"dimmen\" "
"\"dimmen\" (halbe Helligkeit),\"*\" für fett, \"!\" für invertiert, \"/\" " "(halbe Helligkeit),\"*\" für fett, \"!\" für invertiert, \"/\" für kursiv, "
"für kursiv, \"_\" für unterstrichen); wenn die Zeichenkette leer ist, werden " "\"_\" für unterstrichen); wenn die Zeichenkette leer ist, werden die Farben "
"die Farben genutzt die durch weechat.color.emphasized* definiert sind" "genutzt die durch weechat.color.emphasized* definiert sind"
msgid "" msgid ""
"comma separated list of words to highlight; case insensitive comparison (use " "comma separated list of words to highlight; case insensitive comparison (use "
@@ -7008,24 +7008,24 @@ msgstr ""
"Bedingungen um eine Infobar anzuzeigen. Eine einfache Bedingung: \"active\", " "Bedingungen um eine Infobar anzuzeigen. Eine einfache Bedingung: \"active\", "
"\"inactive\", \"nicklist\" (Fenster muss aktiv/inaktiv sein oder der Buffer " "\"inactive\", \"nicklist\" (Fenster muss aktiv/inaktiv sein oder der Buffer "
"enthält eine Benutzerliste), oder man nutzt einen Ausdruck mit Bedingungen " "enthält eine Benutzerliste), oder man nutzt einen Ausdruck mit Bedingungen "
"(siehe /help eval). Beispiele: \"${nicklist} && ${info:term_width} > " "(siehe /help eval). Beispiele: \"${nicklist} && ${info:term_width} > 100\" "
"100\" (lokale Variablen für den Ausdruck sind ${active}, ${inactive} und " "(lokale Variablen für den Ausdruck sind ${active}, ${inactive} und "
"${nicklist})" "${nicklist})"
msgid "bar position (bottom, top, left, right)" msgid "bar position (bottom, top, left, right)"
msgstr "Position der Infobar (unten, oben, links, rechts)" msgstr "Position der Infobar (unten, oben, links, rechts)"
msgid "" msgid ""
"bar filling direction (\"horizontal\" (from left to right) or " "bar filling direction (\"horizontal\" (from left to right) or \"vertical\" "
"\"vertical\" (from top to bottom)) when bar position is top or bottom" "(from top to bottom)) when bar position is top or bottom"
msgstr "" msgstr ""
"Darstellung innerhalb der Infobar, falls die Infobar oben/unten angezeigt " "Darstellung innerhalb der Infobar, falls die Infobar oben/unten angezeigt "
"wird (\"horizontal\" (von links nach rechts) oder \"vertikal\" (von oben " "wird (\"horizontal\" (von links nach rechts) oder \"vertikal\" (von oben "
"nach unten))" "nach unten))"
msgid "" msgid ""
"bar filling direction (\"horizontal\" (from left to right) or " "bar filling direction (\"horizontal\" (from left to right) or \"vertical\" "
"\"vertical\" (from top to bottom)) when bar position is left or right" "(from top to bottom)) when bar position is left or right"
msgstr "" msgstr ""
"Darstellung innerhalb der Infobar, falls die Infobar links/rechts angezeigt " "Darstellung innerhalb der Infobar, falls die Infobar links/rechts angezeigt "
"wird (\"horizontal\" (von links nach rechts) oder \"vertikal\" (von oben " "wird (\"horizontal\" (von links nach rechts) oder \"vertikal\" (von oben "
@@ -7065,9 +7065,9 @@ msgid "separator line between bar and other bars/windows"
msgstr "Trennzeichen zwischen verschieden Infobars und Fenstern" msgstr "Trennzeichen zwischen verschieden Infobars und Fenstern"
msgid "" msgid ""
"items of bar, they can be separated by comma (space between items) or \"+" "items of bar, they can be separated by comma (space between items) or \"+\" "
"\" (glued items); special syntax \"@buffer:item\" can be used to force " "(glued items); special syntax \"@buffer:item\" can be used to force buffer "
"buffer used when displaying the bar item" "used when displaying the bar item"
msgstr "" msgstr ""
"Items einer Bar können entweder durch Kommata (\",\") voneinander getrennt " "Items einer Bar können entweder durch Kommata (\",\") voneinander getrennt "
"(setzt ein Leerzeichen zwischen die Items), oder durch ein \"+\" Zeichen " "(setzt ein Leerzeichen zwischen die Items), oder durch ein \"+\" Zeichen "
@@ -8811,8 +8811,8 @@ msgid " - ${description}: option description (translated)"
msgstr " - ${description}: Beschreibung der Option (übersetzt)" msgstr " - ${description}: Beschreibung der Option (übersetzt)"
msgid "" msgid ""
" - ${description2}: option description (translated), \"(no " " - ${description2}: option description (translated), \"(no description)\" "
"description)\" (translated) if there's no description" "(translated) if there's no description"
msgstr "" msgstr ""
" - ${description2}: Beschreibung der Option (übersetzt), \"(keine " " - ${description2}: Beschreibung der Option (übersetzt), \"(keine "
"Beschreibung)\" (übersetzt) falls keine Beschreibung vorhanden" "Beschreibung)\" (übersetzt) falls keine Beschreibung vorhanden"
@@ -9503,8 +9503,8 @@ msgstr ""
#, c-format #, c-format
msgid "" msgid ""
"%s%s: if you want to add a standard server, use the command \"/server " "%s%s: if you want to add a standard server, use the command \"/server add\" "
"add\" (see /help server); if you really want to add a temporary server (NOT " "(see /help server); if you really want to add a temporary server (NOT "
"SAVED), turn on the option irc.look.temporary_servers" "SAVED), turn on the option irc.look.temporary_servers"
msgstr "" msgstr ""
"%s%s: falls ein Standardserver erstellt werden soll, muss der Befehl \"/" "%s%s: falls ein Standardserver erstellt werden soll, muss der Befehl \"/"
@@ -12667,8 +12667,8 @@ msgid ""
"interval between two checks for notify with IRC command \"whois\" (in " "interval between two checks for notify with IRC command \"whois\" (in "
"minutes)" "minutes)"
msgstr "" msgstr ""
"Intervall zwischen zwei notify Überprüfungen mit dem IRC Befehl " "Intervall zwischen zwei notify Überprüfungen mit dem IRC Befehl \"whois\" "
"\"whois\" (in Minuten)" "(in Minuten)"
msgid "" msgid ""
"cause SASL authentication failure when SASL is requested but unavailable on " "cause SASL authentication failure when SASL is requested but unavailable on "
@@ -15016,19 +15016,19 @@ msgstr "%s%s: Interpreter kann nicht freigeben werden"
#, c-format #, c-format
msgid "" msgid ""
"%s%s: too few arguments received from client %s%s%s for resource " "%s%s: too few arguments received from client %s%s%s for resource \"%s\" "
"\"%s\" (received: %d arguments, expected: at least %d)" "(received: %d arguments, expected: at least %d)"
msgstr "" msgstr ""
"%s%s: Zu wenige Argumente von Client %s%s%s für die Ressource \"%s\" " "%s%s: Zu wenige Argumente von Client %s%s%s für die Ressource \"%s\" "
"erhalten (Empfangen: %d Argumente, mindestens erwartet: %d)" "erhalten (Empfangen: %d Argumente, mindestens erwartet: %d)"
#, c-format #, c-format
msgid "" msgid ""
"%s%s: too many arguments received from client %s%s%s for resource " "%s%s: too many arguments received from client %s%s%s for resource \"%s\" "
"\"%s\" (received: %d arguments, expected: at most %d)" "(received: %d arguments, expected: at most %d)"
msgstr "" msgstr ""
"%s%s: Zu viele Argumente von Client erhalten %s%s%s für die Ressource " "%s%s: Zu viele Argumente von Client erhalten %s%s%s für die Ressource \"%s\" "
"\"%s\" (Empfangen: %d Argumente, höchstens erwartet: %d)" "(Empfangen: %d Argumente, höchstens erwartet: %d)"
#, c-format #, c-format
msgid "%s%s: failed to execute route \"%s %s\" for client %s%s%s" msgid "%s%s: failed to execute route \"%s %s\" for client %s%s%s"
@@ -15784,6 +15784,11 @@ msgstr ""
"Verbindung zum Relay herstellen oder trennen (durch Kommas getrennte Liste); " "Verbindung zum Relay herstellen oder trennen (durch Kommas getrennte Liste); "
"erlaubte Protokolle: \"irc\", \"weechat\", \"api\"" "erlaubte Protokolle: \"irc\", \"weechat\", \"api\""
msgid ""
"max number of chars to display in raw messages (very long messages can cause "
"slowness); 0 = display whole messages"
msgstr ""
msgid "text color for client description" msgid "text color for client description"
msgstr "Textfarbe für Client-Beschreibung" msgstr "Textfarbe für Client-Beschreibung"
@@ -16107,8 +16112,8 @@ msgid ""
"%s%s: error: file with TLS certificate/key is not readable: \"%s\" (option " "%s%s: error: file with TLS certificate/key is not readable: \"%s\" (option "
"relay.network.tls_cert_key)" "relay.network.tls_cert_key)"
msgstr "" msgstr ""
"%s%s: Fehler: Datei mit TLS Zertifikat/Schlüssel ist nicht lesbar: " "%s%s: Fehler: Datei mit TLS Zertifikat/Schlüssel ist nicht lesbar: \"%s\" "
"\"%s\" (Option relay.network.tls_cert_key)" "(Option relay.network.tls_cert_key)"
#, c-format #, c-format
msgid "%s%s: unable to initialize priority for TLS" msgid "%s%s: unable to initialize priority for TLS"
@@ -16252,8 +16257,8 @@ msgstr ""
#, c-format #, c-format
msgid "" msgid ""
"%s%s: too few arguments received from client %s%s%s for command " "%s%s: too few arguments received from client %s%s%s for command \"%s\" "
"\"%s\" (received: %d arguments, expected: at least %d)" "(received: %d arguments, expected: at least %d)"
msgstr "" msgstr ""
"%s%s: Zu wenige Argumente von Client %s%s%s für den Befehl \"%s\" erhalten " "%s%s: Zu wenige Argumente von Client %s%s%s für den Befehl \"%s\" erhalten "
"(Empfangen: %d Argumente, mindestens Erwartet: %d)" "(Empfangen: %d Argumente, mindestens Erwartet: %d)"
@@ -17422,22 +17427,22 @@ msgstr "verwaltet Trigger, das Schweizer Armeemesser für WeeChat"
#. TRANSLATORS: only text between angle brackets (eg: "<name>") must be translated #. TRANSLATORS: only text between angle brackets (eg: "<name>") must be translated
msgid "" msgid ""
"list [-o|-ol|-i|-il] || listfull || listdefault || add|addoff|addreplace " "list [-o|-ol|-i|-il] || listfull || listdefault || add|addoff|addreplace "
"<name> <hook> " "<name> <hook> [\"<arguments>\" [\"<conditions>\" [\"<regex>\" [\"<command>\" "
"[\"<arguments>\" [\"<conditions>\" [\"<regex>\" [\"<command>\" [\"<return_code>\" [\"<post_action>\"]]]]]] " "[\"<return_code>\" [\"<post_action>\"]]]]]] || addinput [<hook>] || input|"
"|| addinput [<hook>] || input|output|recreate <name> || set <name> <option> " "output|recreate <name> || set <name> <option> <value> || rename|copy <name> "
"<value> || rename|copy <name> <new_name> || enable|disable|toggle [<name>|" "<new_name> || enable|disable|toggle [<name>|<mask> [<name>|<mask>...]] || "
"<mask> [<name>|<mask>...]] || restart <name>|<mask> [<name>|<mask>...] || " "restart <name>|<mask> [<name>|<mask>...] || show <name> || del <name>|<mask> "
"show <name> || del <name>|<mask> [<name>|<mask>...] || restore <name>|<mask> " "[<name>|<mask>...] || restore <name>|<mask> [<name>|<mask>...] || default -"
"[<name>|<mask>...] || default -yes || monitor [<filter>]" "yes || monitor [<filter>]"
msgstr "" msgstr ""
"list [-o|-ol|-i|-il] || listfull || listdefault || add|addoff|addreplace " "list [-o|-ol|-i|-il] || listfull || listdefault || add|addoff|addreplace "
"<name> <hook> " "<name> <hook> [\"<arguments>\" [\"<conditions>\" [\"<regex>\" [\"<command>\" "
"[\"<arguments>\" [\"<conditions>\" [\"<regex>\" [\"<command>\" [\"<return_code>\" [\"<post_action>\"]]]]]] " "[\"<return_code>\" [\"<post_action>\"]]]]]] || addinput [<hook>] || input|"
"|| addinput [<hook>] || input|output|recreate <name> || set <name> <option> " "output|recreate <name> || set <name> <option> <value> || rename|copy <name> "
"<value> || rename|copy <name> <new_name> || enable|disable|toggle [<name>|" "<new_name> || enable|disable|toggle [<name>|<mask> [<name>|<mask>...]] || "
"<mask> [<name>|<mask>...]] || restart <name>|<mask> [<name>|<mask>...] || " "restart <name>|<mask> [<name>|<mask>...] || show <name> || del <name>|<mask> "
"show <name> || del <name>|<mask> [<name>|<mask>...] || restore <name>|<mask> " "[<name>|<mask>...] || restore <name>|<mask> [<name>|<mask>...] || default -"
"[<name>|<mask>...] || default -yes || monitor [<filter>]" "yes || monitor [<filter>]"
msgid "raw[list]: list triggers (without argument, this list is displayed)" msgid "raw[list]: list triggers (without argument, this list is displayed)"
msgstr "" msgstr ""
+6 -1
View File
@@ -22,7 +22,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2024-05-22 00:15+0200\n" "POT-Creation-Date: 2024-06-01 22:37+0200\n"
"PO-Revision-Date: 2024-04-07 14:50+0200\n" "PO-Revision-Date: 2024-04-07 14:50+0200\n"
"Last-Translator: Santiago Forero <santiago@forero.xyz>\n" "Last-Translator: Santiago Forero <santiago@forero.xyz>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -14733,6 +14733,11 @@ msgid ""
"\"weechat\", \"api\"" "\"weechat\", \"api\""
msgstr "" msgstr ""
msgid ""
"max number of chars to display in raw messages (very long messages can cause "
"slowness); 0 = display whole messages"
msgstr ""
msgid "text color for client description" msgid "text color for client description"
msgstr "color del texto para la descripción del cliente" msgstr "color del texto para la descripción del cliente"
+10 -2
View File
@@ -21,8 +21,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2024-05-22 00:15+0200\n" "POT-Creation-Date: 2024-06-01 22:37+0200\n"
"PO-Revision-Date: 2024-05-23 21:02+0200\n" "PO-Revision-Date: 2024-06-01 22:38+0200\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n" "Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: fr\n" "Language: fr\n"
@@ -15489,6 +15489,14 @@ msgstr ""
"relai qui utilisent un de ces protocoles (liste séparée par des virfules) ; " "relai qui utilisent un de ces protocoles (liste séparée par des virfules) ; "
"protocoles autorisés : \"irc\", \"weechat\", \"api\"" "protocoles autorisés : \"irc\", \"weechat\", \"api\""
msgid ""
"max number of chars to display in raw messages (very long messages can cause "
"slowness); 0 = display whole messages"
msgstr ""
"nombre maximum de caractères à afficher dans les messages bruts (les très "
"longs messages peuvent provoquer des lenteurs) ; 0 = afficher les messages "
"entiers"
msgid "text color for client description" msgid "text color for client description"
msgstr "couleur du texte pour la description du client" msgstr "couleur du texte pour la description du client"
+6 -1
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2024-05-22 00:15+0200\n" "POT-Creation-Date: 2024-06-01 22:37+0200\n"
"PO-Revision-Date: 2024-04-07 14:50+0200\n" "PO-Revision-Date: 2024-04-07 14:50+0200\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n" "Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -13793,6 +13793,11 @@ msgid ""
"\"weechat\", \"api\"" "\"weechat\", \"api\""
msgstr "" msgstr ""
msgid ""
"max number of chars to display in raw messages (very long messages can cause "
"slowness); 0 = display whole messages"
msgstr ""
#, fuzzy #, fuzzy
msgid "text color for client description" msgid "text color for client description"
msgstr "információs pult határolóinak színe" msgstr "információs pult határolóinak színe"
+6 -1
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2024-05-22 00:15+0200\n" "POT-Creation-Date: 2024-06-01 22:37+0200\n"
"PO-Revision-Date: 2024-04-07 14:50+0200\n" "PO-Revision-Date: 2024-04-07 14:50+0200\n"
"Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n" "Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -14771,6 +14771,11 @@ msgid ""
"\"weechat\", \"api\"" "\"weechat\", \"api\""
msgstr "" msgstr ""
msgid ""
"max number of chars to display in raw messages (very long messages can cause "
"slowness); 0 = display whole messages"
msgstr ""
msgid "text color for client description" msgid "text color for client description"
msgstr "colore del testo per la descrizione del client" msgstr "colore del testo per la descrizione del client"
+6 -1
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2024-05-22 00:15+0200\n" "POT-Creation-Date: 2024-06-01 22:37+0200\n"
"PO-Revision-Date: 2024-04-07 14:50+0200\n" "PO-Revision-Date: 2024-04-07 14:50+0200\n"
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n" "Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
"Language-Team: Japanese <https://github.com/l/weechat/tree/master/" "Language-Team: Japanese <https://github.com/l/weechat/tree/master/"
@@ -15206,6 +15206,11 @@ msgid ""
"\"weechat\", \"api\"" "\"weechat\", \"api\""
msgstr "" msgstr ""
msgid ""
"max number of chars to display in raw messages (very long messages can cause "
"slowness); 0 = display whole messages"
msgstr ""
msgid "text color for client description" msgid "text color for client description"
msgstr "クライアント説明用のテキスト色" msgstr "クライアント説明用のテキスト色"
+69 -66
View File
@@ -22,7 +22,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2024-05-22 00:15+0200\n" "POT-Creation-Date: 2024-06-01 22:37+0200\n"
"PO-Revision-Date: 2024-05-25 13:34+0200\n" "PO-Revision-Date: 2024-05-25 13:34+0200\n"
"Last-Translator: Krzysztof Korościk <soltys@soltys.info>\n" "Last-Translator: Krzysztof Korościk <soltys@soltys.info>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -813,8 +813,8 @@ msgstr "%sNie można ustawić opcji \"%s\" dla proxy \"%s\""
msgid "" msgid ""
"%sYou must confirm /%s command with extra argument \"-yes\" (see /help %s)" "%sYou must confirm /%s command with extra argument \"-yes\" (see /help %s)"
msgstr "" msgstr ""
"%sMusisz potwierdzić użycie komendy /%s dodatkowym argumentem \"-" "%sMusisz potwierdzić użycie komendy /%s dodatkowym argumentem \"-yes\" "
"yes\" (zobacz /help %s)" "(zobacz /help %s)"
#, c-format #, c-format
msgid "Options reloaded from %s" msgid "Options reloaded from %s"
@@ -2044,8 +2044,8 @@ msgstr ""
"*, /, //, %, **)" "*, /, //, %, **)"
msgid "" msgid ""
" - ${random:min,max}: a random integer number between \"min\" and " " - ${random:min,max}: a random integer number between \"min\" and \"max\" "
"\"max\" (inclusive)" "(inclusive)"
msgstr "" msgstr ""
" - ${random:min,max}: losowa liczba całkowita z przedziału od „min” do " " - ${random:min,max}: losowa liczba całkowita z przedziału od „min” do "
"„max” (włącznie)" "„max” (włącznie)"
@@ -4741,8 +4741,8 @@ msgstr ""
"\"-yes\" (zobacz /help quit)" "\"-yes\" (zobacz /help quit)"
msgid "" msgid ""
"if set, /upgrade command must be confirmed with extra argument \"-" "if set, /upgrade command must be confirmed with extra argument \"-yes\" "
"yes\" (see /help upgrade)" "(see /help upgrade)"
msgstr "" msgstr ""
"jeśli ustawione, komenda /upgrade musi być potwierdzona dodatkowym " "jeśli ustawione, komenda /upgrade musi być potwierdzona dodatkowym "
"argumentem \"-yes\" (zobacz /help upgrade)" "argumentem \"-yes\" (zobacz /help upgrade)"
@@ -6672,15 +6672,15 @@ msgid "bar position (bottom, top, left, right)"
msgstr "pozycja paska (bottom (dół), top (góra), left (lewo), right (prawo))" msgstr "pozycja paska (bottom (dół), top (góra), left (lewo), right (prawo))"
msgid "" msgid ""
"bar filling direction (\"horizontal\" (from left to right) or " "bar filling direction (\"horizontal\" (from left to right) or \"vertical\" "
"\"vertical\" (from top to bottom)) when bar position is top or bottom" "(from top to bottom)) when bar position is top or bottom"
msgstr "" msgstr ""
"kierunek wypełniania paska (\"horizontal\" (od lewej do prawej) lub " "kierunek wypełniania paska (\"horizontal\" (od lewej do prawej) lub "
"\"vertical\" (od góry do dołu)), kiedy pozycja paska to góra albo dół" "\"vertical\" (od góry do dołu)), kiedy pozycja paska to góra albo dół"
msgid "" msgid ""
"bar filling direction (\"horizontal\" (from left to right) or " "bar filling direction (\"horizontal\" (from left to right) or \"vertical\" "
"\"vertical\" (from top to bottom)) when bar position is left or right" "(from top to bottom)) when bar position is left or right"
msgstr "" msgstr ""
"kierunek wypełniania paska (\"horizontal\" (od lewej do prawej) lub " "kierunek wypełniania paska (\"horizontal\" (od lewej do prawej) lub "
"\"vertical\" (od góry do dołu)), kiedy pozycja paska to lewo albo prawo" "\"vertical\" (od góry do dołu)), kiedy pozycja paska to lewo albo prawo"
@@ -6719,9 +6719,9 @@ msgid "separator line between bar and other bars/windows"
msgstr "separator pomiędzy paskiem a innymi paskami/oknami" msgstr "separator pomiędzy paskiem a innymi paskami/oknami"
msgid "" msgid ""
"items of bar, they can be separated by comma (space between items) or \"+" "items of bar, they can be separated by comma (space between items) or \"+\" "
"\" (glued items); special syntax \"@buffer:item\" can be used to force " "(glued items); special syntax \"@buffer:item\" can be used to force buffer "
"buffer used when displaying the bar item" "used when displaying the bar item"
msgstr "" msgstr ""
"elementy paska, mogą być oddzielone przecinkiem (spacja pomiędzy elementami) " "elementy paska, mogą być oddzielone przecinkiem (spacja pomiędzy elementami) "
"lub \"+\" (skleja elementy); specjalna składnia \"@buffer:item\" może być " "lub \"+\" (skleja elementy); specjalna składnia \"@buffer:item\" może być "
@@ -7956,8 +7956,8 @@ msgid ""
msgstr "" msgstr ""
"powłoka używana przez komendę \"/exec -sh\"; może to być nazwa powłoki jeśli " "powłoka używana przez komendę \"/exec -sh\"; może to być nazwa powłoki jeśli "
"znajduje się ona w PATH (na przykład \"bash\") lub ścieżka absolutna (na " "znajduje się ona w PATH (na przykład \"bash\") lub ścieżka absolutna (na "
"przykład \"/bin/bash\"); jeśli wartość jest pusta, zostanie użyte " "przykład \"/bin/bash\"); jeśli wartość jest pusta, zostanie użyte \"sh\" "
"\"sh\" (uwaga: zawartość jest przetwarzana, zobacz /help eval)" "(uwaga: zawartość jest przetwarzana, zobacz /help eval)"
msgid "text color for a finished command flag in list of commands" msgid "text color for a finished command flag in list of commands"
msgstr "kolor tekstu dla flagi zakończonej komendy na liście komend" msgstr "kolor tekstu dla flagi zakończonej komendy na liście komend"
@@ -8380,8 +8380,8 @@ msgid " - ${description}: option description (translated)"
msgstr " - ${description}: opis opcji (przetłumaczony)" msgstr " - ${description}: opis opcji (przetłumaczony)"
msgid "" msgid ""
" - ${description2}: option description (translated), \"(no " " - ${description2}: option description (translated), \"(no description)\" "
"description)\" (translated) if there's no description" "(translated) if there's no description"
msgstr "" msgstr ""
" - ${description2}: opis opcji (przetłumaczony), „(brak opisu)” jeśli nie " " - ${description2}: opis opcji (przetłumaczony), „(brak opisu)” jeśli nie "
"ma opisu" "ma opisu"
@@ -9046,13 +9046,13 @@ msgstr ""
#, c-format #, c-format
msgid "" msgid ""
"%s%s: if you want to add a standard server, use the command \"/server " "%s%s: if you want to add a standard server, use the command \"/server add\" "
"add\" (see /help server); if you really want to add a temporary server (NOT " "(see /help server); if you really want to add a temporary server (NOT "
"SAVED), turn on the option irc.look.temporary_servers" "SAVED), turn on the option irc.look.temporary_servers"
msgstr "" msgstr ""
"%s%s: jeśli chcesz dodać standardowy serwer, użyj komendy \"/server " "%s%s: jeśli chcesz dodać standardowy serwer, użyj komendy \"/server add\" "
"add\" (zobacz /help server); jeśli naprawdę chcesz utworzyć serwer " "(zobacz /help server); jeśli naprawdę chcesz utworzyć serwer tymczasowy (NIE "
"tymczasowy (NIE ZAPISANY), włącz opcję irc.look.temporary_servers" "ZAPISANY), włącz opcję irc.look.temporary_servers"
#, c-format #, c-format
msgid "%s%s: \"%s\" command can not be executed on a server buffer" msgid "%s%s: \"%s\" command can not be executed on a server buffer"
@@ -11060,9 +11060,9 @@ msgid ""
"file with ECC private key for mechanism \"ecdsa-nist256p-challenge\" (path " "file with ECC private key for mechanism \"ecdsa-nist256p-challenge\" (path "
"is evaluated, see function string_eval_path_home in plugin API reference)" "is evaluated, see function string_eval_path_home in plugin API reference)"
msgstr "" msgstr ""
"plik z kluczem prywatnym ECC dla mechanizmu \"ecdsa-nist256p-" "plik z kluczem prywatnym ECC dla mechanizmu \"ecdsa-nist256p-challenge\" "
"challenge\" (ścieżka jest przetwarzana, zobacz funkcję string_eval_path_home " "(ścieżka jest przetwarzana, zobacz funkcję string_eval_path_home w opisie "
"w opisie API wtyczek)" "API wtyczek)"
msgid "timeout (in seconds) before giving up SASL authentication" msgid "timeout (in seconds) before giving up SASL authentication"
msgstr "" msgstr ""
@@ -14308,19 +14308,19 @@ msgstr "%s%s: nie można zwolnić interpretera"
#, c-format #, c-format
msgid "" msgid ""
"%s%s: too few arguments received from client %s%s%s for resource " "%s%s: too few arguments received from client %s%s%s for resource \"%s\" "
"\"%s\" (received: %d arguments, expected: at least %d)" "(received: %d arguments, expected: at least %d)"
msgstr "" msgstr ""
"%s%s: otrzymano za mało argumentów od klienta %s%s%s dla zasobu " "%s%s: otrzymano za mało argumentów od klienta %s%s%s dla zasobu „%s” "
"„%s” (otrzymano: %d argumentów, spodziewano się: przynajmniej %d)" "(otrzymano: %d argumentów, spodziewano się: przynajmniej %d)"
#, c-format #, c-format
msgid "" msgid ""
"%s%s: too many arguments received from client %s%s%s for resource " "%s%s: too many arguments received from client %s%s%s for resource \"%s\" "
"\"%s\" (received: %d arguments, expected: at most %d)" "(received: %d arguments, expected: at most %d)"
msgstr "" msgstr ""
"%s%s: otrzymano za mało argumentów od klienta %s%s%s dla zasobu " "%s%s: otrzymano za mało argumentów od klienta %s%s%s dla zasobu „%s” "
"„%s” (otrzymano: %d argumentów, spodziewano się: najwyżej %d)" "(otrzymano: %d argumentów, spodziewano się: najwyżej %d)"
#, c-format #, c-format
msgid "%s%s: failed to execute route \"%s %s\" for client %s%s%s" msgid "%s%s: failed to execute route \"%s %s\" for client %s%s%s"
@@ -15068,6 +15068,11 @@ msgstr ""
"używających jednego z tych protokołów (lista oddzielona przecinkami); " "używających jednego z tych protokołów (lista oddzielona przecinkami); "
"dozwolone protokoły: „irc”, „weechat”, „api”" "dozwolone protokoły: „irc”, „weechat”, „api”"
msgid ""
"max number of chars to display in raw messages (very long messages can cause "
"slowness); 0 = display whole messages"
msgstr ""
msgid "text color for client description" msgid "text color for client description"
msgstr "kolor tekstu dla opisu klienta" msgstr "kolor tekstu dla opisu klienta"
@@ -15206,8 +15211,8 @@ msgid ""
"(examples: \"*\", \"pbkdf2*\", \"*,!plain\")" "(examples: \"*\", \"pbkdf2*\", \"*,!plain\")"
msgstr "" msgstr ""
"oddzielona przecinkami lista algorytmów hashujących używanych dla " "oddzielona przecinkami lista algorytmów hashujących używanych dla "
"uwierzytelnienia hasłem w protokole weechat, dostępne wartości: " "uwierzytelnienia hasłem w protokole weechat, dostępne wartości: \"plain\" "
"\"plain\" (hasło w postaci jawnej, nie zahashowane), \"sha256\", \"sha512\", " "(hasło w postaci jawnej, nie zahashowane), \"sha256\", \"sha512\", "
"\"pbkdf2+sha256\", \"pbkdf2+sha512\", \"*\" oznacza wszystkie algorytmy, " "\"pbkdf2+sha256\", \"pbkdf2+sha512\", \"*\" oznacza wszystkie algorytmy, "
"nazwa zaczynająca się od \"!\" oznacza wartość negatywną w celu uniknięcia " "nazwa zaczynająca się od \"!\" oznacza wartość negatywną w celu uniknięcia "
"użycia algorytmu, znak \"*\" może zostać użyty w nazwie (przykłady: \"*\", " "użycia algorytmu, znak \"*\" może zostać użyty w nazwie (przykłady: \"*\", "
@@ -15375,8 +15380,8 @@ msgid ""
"%s%s: error: file with TLS certificate/key is not readable: \"%s\" (option " "%s%s: error: file with TLS certificate/key is not readable: \"%s\" (option "
"relay.network.tls_cert_key)" "relay.network.tls_cert_key)"
msgstr "" msgstr ""
"%s%s: błąd: nie można odczytać pliku z certyfikatem/kluczem TLS: " "%s%s: błąd: nie można odczytać pliku z certyfikatem/kluczem TLS: \"%s\" "
"\"%s\" (opcja relay.network.tls_cert_key)" "(opcja relay.network.tls_cert_key)"
#, c-format #, c-format
msgid "%s%s: unable to initialize priority for TLS" msgid "%s%s: unable to initialize priority for TLS"
@@ -15526,11 +15531,11 @@ msgstr "%s%s: nie udało się wykonać komendy \"%s\" dla klienta %s%s%s"
#, c-format #, c-format
msgid "" msgid ""
"%s%s: too few arguments received from client %s%s%s for command " "%s%s: too few arguments received from client %s%s%s for command \"%s\" "
"\"%s\" (received: %d arguments, expected: at least %d)" "(received: %d arguments, expected: at least %d)"
msgstr "" msgstr ""
"%s%s: otrzymano za mało argumentów od klienta %s%s%s dla komendy " "%s%s: otrzymano za mało argumentów od klienta %s%s%s dla komendy \"%s\" "
"\"%s\" (otrzymano: %d argumentów, spodziewano się: przynajmniej %d)" "(otrzymano: %d argumentów, spodziewano się: przynajmniej %d)"
msgid "Support of ruby scripts" msgid "Support of ruby scripts"
msgstr "Wsparcie dla skryptów ruby" msgstr "Wsparcie dla skryptów ruby"
@@ -16631,23 +16636,22 @@ msgstr "zarządzaj triggerami, scyzorykiem WeeChat"
#. TRANSLATORS: only text between angle brackets (eg: "<name>") must be translated #. TRANSLATORS: only text between angle brackets (eg: "<name>") must be translated
msgid "" msgid ""
"list [-o|-ol|-i|-il] || listfull || listdefault || add|addoff|addreplace " "list [-o|-ol|-i|-il] || listfull || listdefault || add|addoff|addreplace "
"<name> <hook> " "<name> <hook> [\"<arguments>\" [\"<conditions>\" [\"<regex>\" [\"<command>\" "
"[\"<arguments>\" [\"<conditions>\" [\"<regex>\" [\"<command>\" [\"<return_code>\" [\"<post_action>\"]]]]]] " "[\"<return_code>\" [\"<post_action>\"]]]]]] || addinput [<hook>] || input|"
"|| addinput [<hook>] || input|output|recreate <name> || set <name> <option> " "output|recreate <name> || set <name> <option> <value> || rename|copy <name> "
"<value> || rename|copy <name> <new_name> || enable|disable|toggle [<name>|" "<new_name> || enable|disable|toggle [<name>|<mask> [<name>|<mask>...]] || "
"<mask> [<name>|<mask>...]] || restart <name>|<mask> [<name>|<mask>...] || " "restart <name>|<mask> [<name>|<mask>...] || show <name> || del <name>|<mask> "
"show <name> || del <name>|<mask> [<name>|<mask>...] || restore <name>|<mask> " "[<name>|<mask>...] || restore <name>|<mask> [<name>|<mask>...] || default -"
"[<name>|<mask>...] || default -yes || monitor [<filter>]" "yes || monitor [<filter>]"
msgstr "" msgstr ""
"list [-o|-ol|-i|-il] || listfull || listdefault || add|addoff|addreplace " "list [-o|-ol|-i|-il] || listfull || listdefault || add|addoff|addreplace "
"<nazwa> <hook> " "<nazwa> <hook> [\"<argumenty>\" [\"<warunki>\" [\"<regex>\" [\"<komenda>\" "
"[\"<argumenty>\" [\"<warunki>\" [\"<regex>\" [\"<komenda>\" [\"<zwracany_kod>\" [\"<post_action>\"]]]]]] " "[\"<zwracany_kod>\" [\"<post_action>\"]]]]]] || addinput [<hook>] || input|"
"|| addinput [<hook>] || input|output|recreate <nazwa> || set <nazwa> <opcja> " "output|recreate <nazwa> || set <nazwa> <opcja> <wartość> || rename|copy "
"<wartość> || rename|copy <nazwa> <nowa_nazwa> || enable|disable|toggle " "<nazwa> <nowa_nazwa> || enable|disable|toggle [<nazwa>|<maska> [<nazwa>|"
"[<nazwa>|<maska> [<nazwa>|<maska>...]] || restart <nazwa>|<maska> [<nazwa>|" "<maska>...]] || restart <nazwa>|<maska> [<nazwa>|<maska>...] || show <nazwa> "
"<maska>...] || show <nazwa> || del <nazwa>|<maska> [<nazwa>|<maska>...] || " "|| del <nazwa>|<maska> [<nazwa>|<maska>...] || restore <nazwa>|<maska> "
"restore <nazwa>|<maska> [<nazwa>|<maska>...] || default -yes || monitor " "[<nazwa>|<maska>...] || default -yes || monitor [<filtr>]"
"[<filtr>]"
msgid "raw[list]: list triggers (without argument, this list is displayed)" msgid "raw[list]: list triggers (without argument, this list is displayed)"
msgstr "" msgstr ""
@@ -17023,15 +17027,14 @@ msgstr ""
"zastępuje tekst za pomocą rozszerzonego wyrażenia regularnego POSIX " "zastępuje tekst za pomocą rozszerzonego wyrażenia regularnego POSIX "
"(następuje to tylko wtedy, jeśli warunki są spełnione i przed wykonaniem " "(następuje to tylko wtedy, jeśli warunki są spełnione i przed wykonaniem "
"komendy) (uwaga: zawartość jest przetwarzana, kiedy trigger jest " "komendy) (uwaga: zawartość jest przetwarzana, kiedy trigger jest "
"uruchamiany, zobacz /help eval); format to: \"/regex/zastąp/" "uruchamiany, zobacz /help eval); format to: \"/regex/zastąp/zmienna\" "
"zmienna\" (zmienna to zmienna w tablicy hashy do zamiany, jest to " "(zmienna to zmienna w tablicy hashy do zamiany, jest to opcjonalne), wiele "
"opcjonalne), wiele wyrażeń można oddzielić spacja, na przykład: \"/regex1/" "wyrażeń można oddzielić spacja, na przykład: \"/regex1/replace1/var1 /regex2/"
"replace1/var1 /regex2/replace2/var2\"; wyescapowane znaki są interpretowane " "replace2/var2\"; wyescapowane znaki są interpretowane w wyrażeniu (na "
"w wyrażeniu (na przykład \"\\n\"); separator \"/\" może być zastąpiony " "przykład \"\\n\"); separator \"/\" może być zastąpiony dowolnym znakiem "
"dowolnym znakiem (jednym lub więcej identycznych znaków); pasujące grupy " "(jednym lub więcej identycznych znaków); pasujące grupy mogą być użyte w "
"mogą być użyte w zastępowaniu: ${re:0} do ${re:99}, ${re:+} dla ostatniego " "zastępowaniu: ${re:0} do ${re:99}, ${re:+} dla ostatniego dopasowania i "
"dopasowania i ${hide:c,${re:N}} do zastąpienia wszystkich znaków w grupie N " "${hide:c,${re:N}} do zastąpienia wszystkich znaków w grupie N znakiem 'c'"
"znakiem 'c'"
msgid "" msgid ""
"command(s) to run if conditions are OK, after regex replacements (many " "command(s) to run if conditions are OK, after regex replacements (many "
+6 -1
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2024-05-22 00:15+0200\n" "POT-Creation-Date: 2024-06-01 22:37+0200\n"
"PO-Revision-Date: 2024-04-07 14:50+0200\n" "PO-Revision-Date: 2024-04-07 14:50+0200\n"
"Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n" "Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n"
"Language-Team: Portuguese <>\n" "Language-Team: Portuguese <>\n"
@@ -15118,6 +15118,11 @@ msgid ""
"\"weechat\", \"api\"" "\"weechat\", \"api\""
msgstr "" msgstr ""
msgid ""
"max number of chars to display in raw messages (very long messages can cause "
"slowness); 0 = display whole messages"
msgstr ""
msgid "text color for client description" msgid "text color for client description"
msgstr "cor do texto da descrição do cliente" msgstr "cor do texto da descrição do cliente"
+6 -1
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2024-05-22 00:15+0200\n" "POT-Creation-Date: 2024-06-01 22:37+0200\n"
"PO-Revision-Date: 2024-04-07 14:50+0200\n" "PO-Revision-Date: 2024-04-07 14:50+0200\n"
"Last-Translator: Érico Nogueira <ericonr@disroot.org>\n" "Last-Translator: Érico Nogueira <ericonr@disroot.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -14243,6 +14243,11 @@ msgid ""
"\"weechat\", \"api\"" "\"weechat\", \"api\""
msgstr "" msgstr ""
msgid ""
"max number of chars to display in raw messages (very long messages can cause "
"slowness); 0 = display whole messages"
msgstr ""
#, fuzzy #, fuzzy
msgid "text color for client description" msgid "text color for client description"
msgstr "cor do texto para delimitadores de tempo" msgstr "cor do texto para delimitadores de tempo"
+6 -1
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2024-05-22 00:15+0200\n" "POT-Creation-Date: 2024-06-01 22:37+0200\n"
"PO-Revision-Date: 2024-04-07 14:50+0200\n" "PO-Revision-Date: 2024-04-07 14:50+0200\n"
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n" "Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -13847,6 +13847,11 @@ msgid ""
"\"weechat\", \"api\"" "\"weechat\", \"api\""
msgstr "" msgstr ""
msgid ""
"max number of chars to display in raw messages (very long messages can cause "
"slowness); 0 = display whole messages"
msgstr ""
#, fuzzy #, fuzzy
msgid "text color for client description" msgid "text color for client description"
msgstr "цвет разделителей информационной панели" msgstr "цвет разделителей информационной панели"
+6 -1
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2024-05-22 00:15+0200\n" "POT-Creation-Date: 2024-06-01 22:37+0200\n"
"PO-Revision-Date: 2024-05-07 14:00+0400\n" "PO-Revision-Date: 2024-05-07 14:00+0400\n"
"Last-Translator: Ivan Pešić <ivan.pesic@gmail.com>\n" "Last-Translator: Ivan Pešić <ivan.pesic@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -15056,6 +15056,11 @@ msgstr ""
"користећи један од следећих протокола (листа раздвојена запетама); дозвољени " "користећи један од следећих протокола (листа раздвојена запетама); дозвољени "
"протоколи: „irc”, „weechat”, „api”" "протоколи: „irc”, „weechat”, „api”"
msgid ""
"max number of chars to display in raw messages (very long messages can cause "
"slowness); 0 = display whole messages"
msgstr ""
msgid "text color for client description" msgid "text color for client description"
msgstr "боја текста за опис клијента" msgstr "боја текста за опис клијента"
+6 -1
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2024-05-22 00:15+0200\n" "POT-Creation-Date: 2024-06-01 22:37+0200\n"
"PO-Revision-Date: 2024-04-07 14:50+0200\n" "PO-Revision-Date: 2024-04-07 14:50+0200\n"
"Last-Translator: Emir SARI <emir_sari@icloud.com>\n" "Last-Translator: Emir SARI <emir_sari@icloud.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -15379,6 +15379,11 @@ msgid ""
"\"weechat\", \"api\"" "\"weechat\", \"api\""
msgstr "" msgstr ""
msgid ""
"max number of chars to display in raw messages (very long messages can cause "
"slowness); 0 = display whole messages"
msgstr ""
msgid "text color for client description" msgid "text color for client description"
msgstr "istemci açıklaması için metin rengi" msgstr "istemci açıklaması için metin rengi"
+6 -1
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2024-05-22 00:15+0200\n" "POT-Creation-Date: 2024-06-01 22:37+0200\n"
"PO-Revision-Date: 2014-08-16 10:27+0200\n" "PO-Revision-Date: 2014-08-16 10:27+0200\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n" "Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -12624,6 +12624,11 @@ msgid ""
"\"weechat\", \"api\"" "\"weechat\", \"api\""
msgstr "" msgstr ""
msgid ""
"max number of chars to display in raw messages (very long messages can cause "
"slowness); 0 = display whole messages"
msgstr ""
msgid "text color for client description" msgid "text color for client description"
msgstr "" msgstr ""
+2 -2
View File
@@ -92,11 +92,11 @@ include_directories(${GNUTLS_INCLUDE_PATH})
include_directories(${CURL_INCLUDE_DIRS}) include_directories(${CURL_INCLUDE_DIRS})
if(ENABLE_ZSTD) if(ENABLE_ZSTD)
include_directories(${ZSTD_INCLUDE_DIRS}) include_directories(${LIBZSTD_INCLUDE_DIRS})
endif() endif()
if(ENABLE_CJSON) if(ENABLE_CJSON)
include_directories(${CJSON_INCLUDE_DIRS}) include_directories(${LIBCJSON_INCLUDE_DIRS})
endif() endif()
include_directories("${CMAKE_BINARY_DIR}") include_directories("${CMAKE_BINARY_DIR}")
+5 -14
View File
@@ -38,6 +38,10 @@
#include "core-string.h" #include "core-string.h"
#include "../plugins/plugin.h" #include "../plugins/plugin.h"
#ifdef htonll
#define htobe64 htonll
#endif
char *weecrypto_hash_algo_string[] = { char *weecrypto_hash_algo_string[] = {
"crc32", "crc32",
"md5", "md5",
@@ -520,20 +524,7 @@ weecrypto_totp_generate_internal (const char *secret, int length_secret,
int rc, offset, length; int rc, offset, length;
unsigned long bin_code; unsigned long bin_code;
#if __BYTE_ORDER == __BIG_ENDIAN moving_factor_swapped = htobe64 (moving_factor);
/* Big endian does not need to swap bytes here! */
moving_factor_swapped = moving_factor;
#else
moving_factor_swapped = (moving_factor >> 56)
| ((moving_factor << 40) & 0x00FF000000000000)
| ((moving_factor << 24) & 0x0000FF0000000000)
| ((moving_factor << 8) & 0x000000FF00000000)
| ((moving_factor >> 8) & 0x00000000FF000000)
| ((moving_factor >> 24) & 0x0000000000FF0000)
| ((moving_factor >> 40) & 0x000000000000FF00)
| (moving_factor << 56);
#endif
rc = weecrypto_hmac (secret, length_secret, rc = weecrypto_hmac (secret, length_secret,
&moving_factor_swapped, sizeof (moving_factor_swapped), &moving_factor_swapped, sizeof (moving_factor_swapped),
GCRY_MD_SHA1, GCRY_MD_SHA1,
+10 -8
View File
@@ -1149,9 +1149,9 @@ eval_hdata_get_value (struct t_hdata *hdata, void *pointer, const char *path,
int type, debug_id; int type, debug_id;
struct t_hashtable *hashtable; struct t_hashtable *hashtable;
EVAL_DEBUG_MSG(1, "eval_hdata_get_value(\"%s\", %p, \"%s\")", EVAL_DEBUG_MSG(1, "eval_hdata_get_value(\"%s\", 0x%lx, \"%s\")",
(hdata) ? hdata->name : "(null)", (hdata) ? hdata->name : "(null)",
pointer, (unsigned long)pointer,
path); path);
value = NULL; value = NULL;
@@ -1167,7 +1167,7 @@ eval_hdata_get_value (struct t_hdata *hdata, void *pointer, const char *path,
/* no path? just return current pointer as string */ /* no path? just return current pointer as string */
if (!path || !path[0]) if (!path || !path[0])
{ {
snprintf (str_value, sizeof (str_value), "%p", pointer); snprintf (str_value, sizeof (str_value), "0x%lx", (unsigned long)pointer);
value = strdup (str_value); value = strdup (str_value);
goto end; goto end;
} }
@@ -1224,7 +1224,8 @@ eval_hdata_get_value (struct t_hdata *hdata, void *pointer, const char *path,
break; break;
case WEECHAT_HDATA_POINTER: case WEECHAT_HDATA_POINTER:
pointer = hdata_pointer (hdata, pointer, var_name); pointer = hdata_pointer (hdata, pointer, var_name);
snprintf (str_value, sizeof (str_value), "%p", pointer); snprintf (str_value, sizeof (str_value),
"0x%lx", (unsigned long)pointer);
value = strdup (str_value); value = strdup (str_value);
break; break;
case WEECHAT_HDATA_TIME: case WEECHAT_HDATA_TIME:
@@ -1273,7 +1274,7 @@ eval_hdata_get_value (struct t_hdata *hdata, void *pointer, const char *path,
case HASHTABLE_POINTER: case HASHTABLE_POINTER:
case HASHTABLE_BUFFER: case HASHTABLE_BUFFER:
snprintf (str_value, sizeof (str_value), snprintf (str_value, sizeof (str_value),
"%p", ptr_value); "0x%lx", (unsigned long)ptr_value);
value = strdup (str_value); value = strdup (str_value);
break; break;
case HASHTABLE_TIME: case HASHTABLE_TIME:
@@ -1288,7 +1289,8 @@ eval_hdata_get_value (struct t_hdata *hdata, void *pointer, const char *path,
} }
else else
{ {
snprintf (str_value, sizeof (str_value), "%p", pointer); snprintf (str_value, sizeof (str_value),
"0x%lx", (unsigned long)pointer);
value = strdup (str_value); value = strdup (str_value);
} }
break; break;
@@ -2432,8 +2434,8 @@ eval_replace_regex (const char *string, regex_t *regex, const char *replace,
result = NULL; result = NULL;
EVAL_DEBUG_MSG(1, "eval_replace_regex(\"%s\", %p, \"%s\")", EVAL_DEBUG_MSG(1, "eval_replace_regex(\"%s\", 0x%lx, \"%s\")",
string, regex, replace); string, (unsigned long)regex, replace);
if (!string || !regex || !replace) if (!string || !regex || !replace)
goto end; goto end;
+2 -1
View File
@@ -559,7 +559,8 @@ hashtable_to_string (enum t_hashtable_type type, const void *value)
break; break;
case HASHTABLE_POINTER: case HASHTABLE_POINTER:
case HASHTABLE_BUFFER: case HASHTABLE_BUFFER:
snprintf (str_value, sizeof (str_value), "%p", value); snprintf (str_value, sizeof (str_value), "0x%lx",
(unsigned long)value);
return str_value; return str_value;
break; break;
case HASHTABLE_TIME: case HASHTABLE_TIME:
+2 -1
View File
@@ -43,7 +43,8 @@ struct t_infolist_item;
#define HASHTABLE_SET_POINTER(__name, __pointer) \ #define HASHTABLE_SET_POINTER(__name, __pointer) \
if (__pointer) \ if (__pointer) \
{ \ { \
snprintf (str_value, sizeof (str_value), "%p", __pointer); \ snprintf (str_value, sizeof (str_value), \
"0x%lx", (unsigned long)__pointer); \
hashtable_set (hashtable, __name, str_value); \ hashtable_set (hashtable, __name, str_value); \
} \ } \
else \ else \
+1 -1
View File
@@ -265,7 +265,7 @@ input_data (struct t_gui_buffer *buffer, const char *data,
} }
/* execute modifier "input_text_for_buffer" */ /* execute modifier "input_text_for_buffer" */
snprintf (str_buffer, sizeof (str_buffer), "%p", buffer); snprintf (str_buffer, sizeof (str_buffer), "0x%lx", (unsigned long)buffer);
new_data = hook_modifier_exec (NULL, new_data = hook_modifier_exec (NULL,
"input_text_for_buffer", "input_text_for_buffer",
str_buffer, str_buffer,
+1 -1
View File
@@ -947,7 +947,7 @@ gui_bar_item_input_text_cb (const void *pointer, void *data,
} }
/* for modifiers */ /* for modifiers */
snprintf (str_buffer, sizeof (str_buffer), "%p", buffer); snprintf (str_buffer, sizeof (str_buffer), "0x%lx", (unsigned long)buffer);
/* execute modifier with basic string (without cursor tag) */ /* execute modifier with basic string (without cursor tag) */
ptr_input = NULL; ptr_input = NULL;
+8 -1
View File
@@ -434,7 +434,7 @@ gui_bar_check_conditions (struct t_gui_bar *bar,
*/ */
snprintf (str_modifier, sizeof (str_modifier), snprintf (str_modifier, sizeof (str_modifier),
"bar_condition_%s", bar->name); "bar_condition_%s", bar->name);
snprintf (str_window, sizeof (str_window), "%p", window); snprintf (str_window, sizeof (str_window), "0x%lx", (unsigned long)window);
str_displayed = hook_modifier_exec (NULL, str_displayed = hook_modifier_exec (NULL,
str_modifier, str_modifier,
str_window, str_window,
@@ -788,6 +788,13 @@ gui_bar_set_items_array (struct t_gui_bar *bar, const char *items)
&bar->items_suffix[i][j]); &bar->items_suffix[i][j]);
} }
} }
else
{
bar->items_buffer[i] = NULL;
bar->items_prefix[i] = NULL;
bar->items_name[i] = NULL;
bar->items_suffix[i] = NULL;
}
} }
} }
string_free_split (tmp_array); string_free_split (tmp_array);
+2 -2
View File
@@ -677,8 +677,8 @@ gui_chat_printf_datetime_tags_internal (struct t_gui_buffer *buffer,
if (modifier_data && string) if (modifier_data && string)
{ {
snprintf (modifier_data, length_data, snprintf (modifier_data, length_data,
"%p;%s", "0x%lx;%s",
buffer, (unsigned long)buffer,
(tags) ? tags : ""); (tags) ? tags : "");
if (display_time) if (display_time)
{ {
+1 -1
View File
@@ -192,7 +192,7 @@ gui_history_add (struct t_gui_buffer *buffer, const char *string)
{ {
char *string2, str_buffer[128]; char *string2, str_buffer[128];
snprintf (str_buffer, sizeof (str_buffer), "%p", buffer); snprintf (str_buffer, sizeof (str_buffer), "0x%lx", (unsigned long)buffer);
string2 = hook_modifier_exec (NULL, "history_add", str_buffer, string); string2 = hook_modifier_exec (NULL, "history_add", str_buffer, string);
/* /*
+2 -1
View File
@@ -158,7 +158,8 @@ gui_input_text_changed_modifier_and_signal (struct t_gui_buffer *buffer,
gui_buffer_undo_add (buffer); gui_buffer_undo_add (buffer);
/* send modifier, and change input if needed */ /* send modifier, and change input if needed */
snprintf (str_buffer, sizeof (str_buffer), "%p", buffer); snprintf (str_buffer, sizeof (str_buffer),
"0x%lx", (unsigned long)buffer);
new_input = hook_modifier_exec (NULL, new_input = hook_modifier_exec (NULL,
"input_text_content", "input_text_content",
str_buffer, str_buffer,
+2 -2
View File
@@ -69,8 +69,8 @@ gui_nicklist_send_signal (const char *signal, struct t_gui_buffer *buffer,
if (str_args) if (str_args)
{ {
snprintf (str_args, length, snprintf (str_args, length,
"%p,%s", "0x%lx,%s",
buffer, (unsigned long)buffer,
(arguments) ? arguments : ""); (arguments) ? arguments : "");
(void) hook_signal_send (signal, (void) hook_signal_send (signal,
WEECHAT_HOOK_SIGNAL_STRING, str_args); WEECHAT_HOOK_SIGNAL_STRING, str_args);
+1 -1
View File
@@ -155,7 +155,7 @@ end:
} }
/* add pointer and plugin name */ /* add pointer and plugin name */
snprintf (str_value, sizeof (str_value), "%p", ptr_buffer); snprintf (str_value, sizeof (str_value), "0x%lx", (unsigned long)ptr_buffer);
weechat_hashtable_set (info, "pointer", str_value); weechat_hashtable_set (info, "pointer", str_value);
weechat_hashtable_set (info, "plugin", weechat_hashtable_set (info, "plugin",
weechat_buffer_get_string (ptr_buffer, "plugin")); weechat_buffer_get_string (ptr_buffer, "plugin"));
+2 -1
View File
@@ -82,7 +82,8 @@ fset_mouse_focus_cb (const void *pointer, void *data, struct t_hashtable *info)
if (!ptr_fset_option) if (!ptr_fset_option)
return info; return info;
snprintf (str_value, sizeof (str_value), "%p", ptr_fset_option); snprintf (str_value, sizeof (str_value),
"0x%lx", (unsigned long)ptr_fset_option);
weechat_hashtable_set (info, "fset_option", str_value); weechat_hashtable_set (info, "fset_option", str_value);
snprintf (str_value, sizeof (str_value), "%ld", option_index); snprintf (str_value, sizeof (str_value), "%ld", option_index);
weechat_hashtable_set (info, "fset_option_index", str_value); weechat_hashtable_set (info, "fset_option_index", str_value);
+16 -6
View File
@@ -742,13 +742,15 @@ weechat_guile_eval (struct t_gui_buffer *buffer, int send_to_buffer_as_input,
int exec_commands, const char *code) int exec_commands, const char *code)
{ {
void *func_argv[1], *result; void *func_argv[1], *result;
int old_guile_quiet;
if (!guile_script_eval) if (!guile_script_eval)
{ {
old_guile_quiet = guile_quiet;
guile_quiet = 1; guile_quiet = 1;
guile_script_eval = weechat_guile_load (WEECHAT_SCRIPT_EVAL_NAME, guile_script_eval = weechat_guile_load (WEECHAT_SCRIPT_EVAL_NAME,
GUILE_EVAL_SCRIPT); GUILE_EVAL_SCRIPT);
guile_quiet = 0; guile_quiet = old_guile_quiet;
if (!guile_script_eval) if (!guile_script_eval)
return 0; return 0;
} }
@@ -777,9 +779,10 @@ weechat_guile_eval (struct t_gui_buffer *buffer, int send_to_buffer_as_input,
if (!weechat_config_boolean (guile_config_look_eval_keep_context)) if (!weechat_config_boolean (guile_config_look_eval_keep_context))
{ {
old_guile_quiet = guile_quiet;
guile_quiet = 1; guile_quiet = 1;
weechat_guile_unload (guile_script_eval); weechat_guile_unload (guile_script_eval);
guile_quiet = 0; guile_quiet = old_guile_quiet;
guile_script_eval = NULL; guile_script_eval = NULL;
} }
@@ -796,7 +799,7 @@ weechat_guile_command_cb (const void *pointer, void *data,
int argc, char **argv, char **argv_eol) int argc, char **argv, char **argv_eol)
{ {
char *ptr_name, *ptr_code, *path_script; char *ptr_name, *ptr_code, *path_script;
int i, send_to_buffer_as_input, exec_commands; int i, send_to_buffer_as_input, exec_commands, old_guile_quiet;
/* make C compiler happy */ /* make C compiler happy */
(void) pointer; (void) pointer;
@@ -855,6 +858,7 @@ weechat_guile_command_cb (const void *pointer, void *data,
|| (weechat_strcmp (argv[1], "reload") == 0) || (weechat_strcmp (argv[1], "reload") == 0)
|| (weechat_strcmp (argv[1], "unload") == 0)) || (weechat_strcmp (argv[1], "unload") == 0))
{ {
old_guile_quiet = guile_quiet;
ptr_name = argv_eol[2]; ptr_name = argv_eol[2];
if (strncmp (ptr_name, "-q ", 3) == 0) if (strncmp (ptr_name, "-q ", 3) == 0)
{ {
@@ -884,7 +888,7 @@ weechat_guile_command_cb (const void *pointer, void *data,
/* unload guile script */ /* unload guile script */
weechat_guile_unload_name (ptr_name); weechat_guile_unload_name (ptr_name);
} }
guile_quiet = 0; guile_quiet = old_guile_quiet;
} }
else if (weechat_strcmp (argv[1], "eval") == 0) else if (weechat_strcmp (argv[1], "eval") == 0)
{ {
@@ -1243,6 +1247,7 @@ int
weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
{ {
char str_version[128]; char str_version[128];
int old_guile_quiet;
/* make C compiler happy */ /* make C compiler happy */
(void) argc; (void) argc;
@@ -1316,11 +1321,13 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
guile_data.callback_signal_debug_dump = &weechat_guile_signal_debug_dump_cb; guile_data.callback_signal_debug_dump = &weechat_guile_signal_debug_dump_cb;
guile_data.callback_signal_script_action = &weechat_guile_signal_script_action_cb; guile_data.callback_signal_script_action = &weechat_guile_signal_script_action_cb;
guile_data.callback_load_file = &weechat_guile_load_cb; guile_data.callback_load_file = &weechat_guile_load_cb;
guile_data.init_before_autoload = NULL;
guile_data.unload_all = &weechat_guile_unload_all; guile_data.unload_all = &weechat_guile_unload_all;
old_guile_quiet = guile_quiet;
guile_quiet = 1; guile_quiet = 1;
plugin_script_init (weechat_guile_plugin, &guile_data); plugin_script_init (weechat_guile_plugin, &guile_data);
guile_quiet = 0; guile_quiet = old_guile_quiet;
plugin_script_display_short_list (weechat_guile_plugin, plugin_script_display_short_list (weechat_guile_plugin,
guile_scripts); guile_scripts);
@@ -1336,7 +1343,10 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
int int
weechat_plugin_end (struct t_weechat_plugin *plugin) weechat_plugin_end (struct t_weechat_plugin *plugin)
{ {
int old_guile_quiet;
/* unload all scripts */ /* unload all scripts */
old_guile_quiet = guile_quiet;
guile_quiet = 1; guile_quiet = 1;
if (guile_script_eval) if (guile_script_eval)
{ {
@@ -1344,7 +1354,7 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
guile_script_eval = NULL; guile_script_eval = NULL;
} }
plugin_script_end (plugin, &guile_data); plugin_script_end (plugin, &guile_data);
guile_quiet = 0; guile_quiet = old_guile_quiet;
/* unprotect module */ /* unprotect module */
weechat_guile_catch (scm_gc_unprotect_object, (void *)guile_module_weechat); weechat_guile_catch (scm_gc_unprotect_object, (void *)guile_module_weechat);
+1 -1
View File
@@ -56,7 +56,7 @@ set(LINK_LIBS)
include_directories(${GNUTLS_INCLUDE_PATH}) include_directories(${GNUTLS_INCLUDE_PATH})
list(APPEND LINK_LIBS ${GNUTLS_LIBRARY}) list(APPEND LINK_LIBS ${GNUTLS_LIBRARY})
list(APPEND LINK_LIBS ${GCRYPT_LDFLAGS}) list(APPEND LINK_LIBS ${LIBGCRYPT_LDFLAGS})
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
# link with resolv lib on macOS # link with resolv lib on macOS
+2 -1
View File
@@ -661,7 +661,8 @@ irc_bar_item_focus_buffer_nicklist (const void *pointer, void *data,
ptr_nick = irc_nick_search (ptr_server, ptr_channel, nick); ptr_nick = irc_nick_search (ptr_server, ptr_channel, nick);
if (ptr_nick) if (ptr_nick)
{ {
snprintf (str_value, sizeof (str_value), "%p", ptr_nick); snprintf (str_value, sizeof (str_value),
"0x%lx", (unsigned long)ptr_nick);
weechat_hashtable_set (info, "irc_nick", str_value); weechat_hashtable_set (info, "irc_nick", str_value);
if (ptr_nick->host) if (ptr_nick->host)
+4
View File
@@ -244,6 +244,10 @@ irc_buffer_close_cb (const void *pointer, void *data,
*/ */
irc_buffer_close_server_channels (ptr_server); irc_buffer_close_server_channels (ptr_server);
/* close list buffer */
if (ptr_server->list->buffer)
weechat_buffer_close (ptr_server->list->buffer);
ptr_server->buffer = NULL; ptr_server->buffer = NULL;
} }
else if (ptr_server && (ptr_server->list->buffer == buffer)) else if (ptr_server && (ptr_server->list->buffer == buffer))
+68 -49
View File
@@ -49,6 +49,10 @@ char *irc_channel_typing_state_string[IRC_CHANNEL_NUM_TYPING_STATES] =
char *irc_channel_default_chantypes = "#&"; char *irc_channel_default_chantypes = "#&";
char *irc_channel_get_buffer_input_prompt (struct t_irc_server *server,
struct t_irc_channel *channel);
/* /*
* Checks if a channel pointer is valid for a server. * Checks if a channel pointer is valid for a server.
* *
@@ -185,7 +189,7 @@ irc_channel_create_buffer (struct t_irc_server *server,
struct t_hashtable *buffer_props; struct t_hashtable *buffer_props;
int buffer_created, current_buffer_number, buffer_position; int buffer_created, current_buffer_number, buffer_position;
int autojoin_join, manual_join, noswitch; int autojoin_join, manual_join, noswitch;
char str_number[32], *channel_name_lower, *buffer_name; char str_number[32], *channel_name_lower, *buffer_name, *prompt;
const char *short_name, *localvar_channel; const char *short_name, *localvar_channel;
buffer_created = 0; buffer_created = 0;
@@ -225,6 +229,9 @@ irc_channel_create_buffer (struct t_irc_server *server,
buffer_props, buffer_props,
"localvar_set_type", "localvar_set_type",
(channel_type == IRC_CHANNEL_TYPE_CHANNEL) ? "channel" : "private"); (channel_type == IRC_CHANNEL_TYPE_CHANNEL) ? "channel" : "private");
prompt = irc_channel_get_buffer_input_prompt (server, NULL);
weechat_hashtable_set (buffer_props, "input_prompt", (prompt) ? prompt : "");
free (prompt);
weechat_hashtable_set (buffer_props, "localvar_set_nick", server->nick); weechat_hashtable_set (buffer_props, "localvar_set_nick", server->nick);
weechat_hashtable_set (buffer_props, "localvar_set_host", server->host); weechat_hashtable_set (buffer_props, "localvar_set_host", server->host);
weechat_hashtable_set (buffer_props, "localvar_set_server", server->name); weechat_hashtable_set (buffer_props, "localvar_set_server", server->name);
@@ -611,6 +618,62 @@ irc_channel_set_buffer_modes (struct t_irc_server *server,
} }
} }
/*
* Gets input prompt for a channel (channel is optional: when channel is not
* given, the prefix for nick is not returned).
*
* Note: result must be freed after use.
*/
char *
irc_channel_get_buffer_input_prompt (struct t_irc_server *server,
struct t_irc_channel *channel)
{
struct t_irc_nick *ptr_nick;
int display_modes;
char str_prefix[64], *prompt;
if (!server || !server->nick)
return NULL;
/* build prefix */
str_prefix[0] = '\0';
if (channel
&& (channel->type == IRC_CHANNEL_TYPE_CHANNEL)
&& weechat_config_boolean (irc_config_look_item_nick_prefix))
{
ptr_nick = irc_nick_search (server, channel, server->nick);
if (ptr_nick)
{
if (weechat_config_boolean (irc_config_look_nick_mode_empty)
|| (ptr_nick->prefix[0] != ' '))
{
snprintf (str_prefix, sizeof (str_prefix), "%s%s",
weechat_color (
irc_nick_get_prefix_color_name (
server, ptr_nick->prefix[0])),
ptr_nick->prefix);
}
}
}
display_modes = (weechat_config_boolean (irc_config_look_item_nick_modes)
&& server->nick_modes && server->nick_modes[0]);
weechat_asprintf (&prompt, "%s%s%s%s%s%s%s%s%s",
str_prefix,
IRC_COLOR_INPUT_NICK,
server->nick,
(display_modes) ? IRC_COLOR_BAR_DELIM : "",
(display_modes) ? "(" : "",
(display_modes) ? IRC_COLOR_ITEM_NICK_MODES : "",
(display_modes) ? server->nick_modes : "",
(display_modes) ? IRC_COLOR_BAR_DELIM : "",
(display_modes) ? ")" : "");
return prompt;
}
/* /*
* Sets input prompt on channel buffer. * Sets input prompt on channel buffer.
*/ */
@@ -619,58 +682,14 @@ void
irc_channel_set_buffer_input_prompt (struct t_irc_server *server, irc_channel_set_buffer_input_prompt (struct t_irc_server *server,
struct t_irc_channel *channel) struct t_irc_channel *channel)
{ {
struct t_irc_nick *ptr_nick; char *prompt;
int display_modes;
char str_prefix[64], *prompt;
if (!server || !channel || !channel->buffer) if (!server || !channel || !channel->buffer)
return; return;
if (server->nick) prompt = irc_channel_get_buffer_input_prompt (server, channel);
{ weechat_buffer_set (channel->buffer, "input_prompt", (prompt) ? prompt : "");
/* build prefix */ free (prompt);
str_prefix[0] = '\0';
if (weechat_config_boolean (irc_config_look_item_nick_prefix)
&& (channel->type == IRC_CHANNEL_TYPE_CHANNEL))
{
ptr_nick = irc_nick_search (server, channel, server->nick);
if (ptr_nick)
{
if (weechat_config_boolean (irc_config_look_nick_mode_empty)
|| (ptr_nick->prefix[0] != ' '))
{
snprintf (str_prefix, sizeof (str_prefix), "%s%s",
weechat_color (
irc_nick_get_prefix_color_name (
server, ptr_nick->prefix[0])),
ptr_nick->prefix);
}
}
}
display_modes = (weechat_config_boolean (irc_config_look_item_nick_modes)
&& server->nick_modes && server->nick_modes[0]);
weechat_asprintf (&prompt, "%s%s%s%s%s%s%s%s%s",
str_prefix,
IRC_COLOR_INPUT_NICK,
server->nick,
(display_modes) ? IRC_COLOR_BAR_DELIM : "",
(display_modes) ? "(" : "",
(display_modes) ? IRC_COLOR_ITEM_NICK_MODES : "",
(display_modes) ? server->nick_modes : "",
(display_modes) ? IRC_COLOR_BAR_DELIM : "",
(display_modes) ? ")" : "");
if (prompt)
{
weechat_buffer_set (channel->buffer, "input_prompt", prompt);
free (prompt);
}
}
else
{
weechat_buffer_set (channel->buffer, "input_prompt", "");
}
} }
/* /*
+5 -1
View File
@@ -57,7 +57,7 @@ irc_info_create_string_with_pointer (char **string, void *pointer)
*string = malloc (64); *string = malloc (64);
if (*string) if (*string)
{ {
snprintf (*string, 64, "%p", pointer); snprintf (*string, 64, "0x%lx", (unsigned long)pointer);
} }
} }
} }
@@ -298,7 +298,11 @@ irc_info_info_irc_buffer_cb (const void *pointer, void *data,
/* search for server or channel buffer */ /* search for server or channel buffer */
if (server && ptr_server && channel) if (server && ptr_server && channel)
{
ptr_channel = irc_channel_search (ptr_server, channel); ptr_channel = irc_channel_search (ptr_server, channel);
if (!ptr_channel)
ptr_server = NULL;
}
free (server); free (server);
free (channel); free (channel);
+8 -2
View File
@@ -2988,8 +2988,14 @@ irc_server_outqueue_send (struct t_irc_server *server)
if (!server->outqueue[priority]) if (!server->outqueue[priority])
continue; continue;
irc_server_outqueue_send_one_msg (server, server->outqueue[priority]); /* send all messages with anti_flood == 0, or just one */
irc_server_outqueue_free (server, priority, server->outqueue[priority]); while (server->outqueue[priority])
{
irc_server_outqueue_send_one_msg (server, server->outqueue[priority]);
irc_server_outqueue_free (server, priority, server->outqueue[priority]);
if (anti_flood > 0)
break;
}
/* /*
* continue to send for immediate priority (= 0), * continue to send for immediate priority (= 0),
+2 -2
View File
@@ -143,8 +143,8 @@ irc_typing_channel_set_nick (struct t_irc_channel *channel, const char *nick,
char signal_data[1024]; char signal_data[1024];
snprintf (signal_data, sizeof (signal_data), snprintf (signal_data, sizeof (signal_data),
"%p;%s;%s", "0x%lx;%s;%s",
channel->buffer, (unsigned long)channel->buffer,
(state == IRC_CHANNEL_TYPING_STATE_ACTIVE) ? "typing" : (state == IRC_CHANNEL_TYPING_STATE_ACTIVE) ? "typing" :
((state == IRC_CHANNEL_TYPING_STATE_PAUSED) ? "paused" : "off"), ((state == IRC_CHANNEL_TYPING_STATE_PAUSED) ? "paused" : "off"),
nick); nick);
+11 -4
View File
@@ -582,7 +582,7 @@ weechat_js_command_cb (const void *pointer, void *data,
int argc, char **argv, char **argv_eol) int argc, char **argv, char **argv_eol)
{ {
char *ptr_name, *ptr_code, *path_script; char *ptr_name, *ptr_code, *path_script;
int i, send_to_buffer_as_input, exec_commands; int i, send_to_buffer_as_input, exec_commands, old_js_quiet;
/* make C++ compiler happy */ /* make C++ compiler happy */
(void) pointer; (void) pointer;
@@ -641,6 +641,7 @@ weechat_js_command_cb (const void *pointer, void *data,
|| (weechat_strcmp (argv[1], "reload") == 0) || (weechat_strcmp (argv[1], "reload") == 0)
|| (weechat_strcmp (argv[1], "unload") == 0)) || (weechat_strcmp (argv[1], "unload") == 0))
{ {
old_js_quiet = js_quiet;
ptr_name = argv_eol[2]; ptr_name = argv_eol[2];
if (strncmp (ptr_name, "-q ", 3) == 0) if (strncmp (ptr_name, "-q ", 3) == 0)
{ {
@@ -670,7 +671,7 @@ weechat_js_command_cb (const void *pointer, void *data,
/* unload javascript script */ /* unload javascript script */
weechat_js_unload_name (ptr_name); weechat_js_unload_name (ptr_name);
} }
js_quiet = 0; js_quiet = old_js_quiet;
} }
else if (weechat_strcmp (argv[1], "eval") == 0) else if (weechat_strcmp (argv[1], "eval") == 0)
{ {
@@ -920,6 +921,7 @@ EXPORT int
weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
{ {
char str_interpreter[64]; char str_interpreter[64];
int old_js_quiet;
/* make C compiler happy */ /* make C compiler happy */
(void) argc; (void) argc;
@@ -953,11 +955,13 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
js_data.callback_signal_debug_dump = &weechat_js_signal_debug_dump_cb; js_data.callback_signal_debug_dump = &weechat_js_signal_debug_dump_cb;
js_data.callback_signal_script_action = &weechat_js_signal_script_action_cb; js_data.callback_signal_script_action = &weechat_js_signal_script_action_cb;
js_data.callback_load_file = &weechat_js_load_cb; js_data.callback_load_file = &weechat_js_load_cb;
js_data.init_before_autoload = NULL;
js_data.unload_all = &weechat_js_unload_all; js_data.unload_all = &weechat_js_unload_all;
old_js_quiet = js_quiet;
js_quiet = 1; js_quiet = 1;
plugin_script_init (plugin, &js_data); plugin_script_init (plugin, &js_data);
js_quiet = 0; js_quiet = old_js_quiet;
plugin_script_display_short_list (weechat_js_plugin, js_scripts); plugin_script_display_short_list (weechat_js_plugin, js_scripts);
@@ -971,6 +975,9 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
EXPORT int EXPORT int
weechat_plugin_end (struct t_weechat_plugin *plugin) weechat_plugin_end (struct t_weechat_plugin *plugin)
{ {
int old_js_quiet;
old_js_quiet = js_quiet;
js_quiet = 1; js_quiet = 1;
if (js_script_eval) if (js_script_eval)
{ {
@@ -978,7 +985,7 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
js_script_eval = NULL; js_script_eval = NULL;
} }
plugin_script_end (plugin, &js_data); plugin_script_end (plugin, &js_data);
js_quiet = 0; js_quiet = old_js_quiet;
/* free some data */ /* free some data */
if (js_action_install_list) if (js_action_install_list)
+17 -6
View File
@@ -861,13 +861,15 @@ weechat_lua_eval (struct t_gui_buffer *buffer, int send_to_buffer_as_input,
int exec_commands, const char *code) int exec_commands, const char *code)
{ {
void *func_argv[1], *result; void *func_argv[1], *result;
int old_lua_quiet;
if (!lua_script_eval) if (!lua_script_eval)
{ {
old_lua_quiet = lua_quiet;
lua_quiet = 1; lua_quiet = 1;
lua_script_eval = weechat_lua_load (WEECHAT_SCRIPT_EVAL_NAME, lua_script_eval = weechat_lua_load (WEECHAT_SCRIPT_EVAL_NAME,
LUA_EVAL_SCRIPT); LUA_EVAL_SCRIPT);
lua_quiet = 0; lua_quiet = old_lua_quiet;
if (!lua_script_eval) if (!lua_script_eval)
return 0; return 0;
} }
@@ -896,9 +898,10 @@ weechat_lua_eval (struct t_gui_buffer *buffer, int send_to_buffer_as_input,
if (!weechat_config_boolean (lua_config_look_eval_keep_context)) if (!weechat_config_boolean (lua_config_look_eval_keep_context))
{ {
old_lua_quiet = lua_quiet;
lua_quiet = 1; lua_quiet = 1;
weechat_lua_unload (lua_script_eval); weechat_lua_unload (lua_script_eval);
lua_quiet = 0; lua_quiet = old_lua_quiet;
lua_script_eval = NULL; lua_script_eval = NULL;
} }
@@ -915,7 +918,7 @@ weechat_lua_command_cb (const void *pointer, void *data,
int argc, char **argv, char **argv_eol) int argc, char **argv, char **argv_eol)
{ {
char *ptr_name, *ptr_code, *path_script; char *ptr_name, *ptr_code, *path_script;
int i, send_to_buffer_as_input, exec_commands; int i, send_to_buffer_as_input, exec_commands, old_lua_quiet;
/* make C compiler happy */ /* make C compiler happy */
(void) pointer; (void) pointer;
@@ -974,6 +977,7 @@ weechat_lua_command_cb (const void *pointer, void *data,
|| (weechat_strcmp (argv[1], "reload") == 0) || (weechat_strcmp (argv[1], "reload") == 0)
|| (weechat_strcmp (argv[1], "unload") == 0)) || (weechat_strcmp (argv[1], "unload") == 0))
{ {
old_lua_quiet = lua_quiet;
ptr_name = argv_eol[2]; ptr_name = argv_eol[2];
if (strncmp (ptr_name, "-q ", 3) == 0) if (strncmp (ptr_name, "-q ", 3) == 0)
{ {
@@ -1003,7 +1007,7 @@ weechat_lua_command_cb (const void *pointer, void *data,
/* unload lua script */ /* unload lua script */
weechat_lua_unload_name (ptr_name); weechat_lua_unload_name (ptr_name);
} }
lua_quiet = 0; lua_quiet = old_lua_quiet;
} }
else if (weechat_strcmp (argv[1], "eval") == 0) else if (weechat_strcmp (argv[1], "eval") == 0)
{ {
@@ -1249,6 +1253,8 @@ weechat_lua_signal_script_action_cb (const void *pointer, void *data,
int int
weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
{ {
int old_lua_quiet;
/* make C compiler happy */ /* make C compiler happy */
(void) argc; (void) argc;
(void) argv; (void) argv;
@@ -1289,11 +1295,13 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
lua_data.callback_signal_debug_dump = &weechat_lua_signal_debug_dump_cb; lua_data.callback_signal_debug_dump = &weechat_lua_signal_debug_dump_cb;
lua_data.callback_signal_script_action = &weechat_lua_signal_script_action_cb; lua_data.callback_signal_script_action = &weechat_lua_signal_script_action_cb;
lua_data.callback_load_file = &weechat_lua_load_cb; lua_data.callback_load_file = &weechat_lua_load_cb;
lua_data.init_before_autoload = NULL;
lua_data.unload_all = &weechat_lua_unload_all; lua_data.unload_all = &weechat_lua_unload_all;
old_lua_quiet = lua_quiet;
lua_quiet = 1; lua_quiet = 1;
plugin_script_init (weechat_lua_plugin, &lua_data); plugin_script_init (weechat_lua_plugin, &lua_data);
lua_quiet = 0; lua_quiet = old_lua_quiet;
plugin_script_display_short_list (weechat_lua_plugin, plugin_script_display_short_list (weechat_lua_plugin,
lua_scripts); lua_scripts);
@@ -1309,7 +1317,10 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
int int
weechat_plugin_end (struct t_weechat_plugin *plugin) weechat_plugin_end (struct t_weechat_plugin *plugin)
{ {
int old_lua_quiet;
/* unload all scripts */ /* unload all scripts */
old_lua_quiet = lua_quiet;
lua_quiet = 1; lua_quiet = 1;
if (lua_script_eval) if (lua_script_eval)
{ {
@@ -1317,7 +1328,7 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
lua_script_eval = NULL; lua_script_eval = NULL;
} }
plugin_script_end (plugin, &lua_data); plugin_script_end (plugin, &lua_data);
lua_quiet = 0; lua_quiet = old_lua_quiet;
/* free some data */ /* free some data */
if (lua_action_install_list) if (lua_action_install_list)
+1 -1
View File
@@ -32,7 +32,7 @@ if(PERL_FOUND)
add_definitions(${PERL_CFLAGS}) add_definitions(${PERL_CFLAGS})
include_directories(${PERL_INCLUDE_PATH}) include_directories(${PERL_INCLUDE_PATH})
# ugly hack to force linking against Dynaloader.a # ugly hack to force linking against Dynaloader.a
string(REGEX MATCH "/[^ $]*/DynaLoader.a" PERL_DYNALOADER ${PERL_LFLAGS}) string(REGEX MATCH "/[^ $]*/DynaLoader.a" PERL_DYNALOADER "${PERL_LFLAGS}")
if(PERL_DYNALOADER) if(PERL_DYNALOADER)
string(REPLACE "${PERL_DYNALOADER}" "" PERL_LFLAGS "${PERL_LFLAGS}") string(REPLACE "${PERL_DYNALOADER}" "" PERL_LFLAGS "${PERL_LFLAGS}")
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${PERL_LFLAGS}") set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${PERL_LFLAGS}")
+17 -6
View File
@@ -832,13 +832,15 @@ weechat_perl_eval (struct t_gui_buffer *buffer, int send_to_buffer_as_input,
int exec_commands, const char *code) int exec_commands, const char *code)
{ {
void *func_argv[1], *result; void *func_argv[1], *result;
int old_perl_quiet;
if (!perl_script_eval) if (!perl_script_eval)
{ {
old_perl_quiet = perl_quiet;
perl_quiet = 1; perl_quiet = 1;
perl_script_eval = weechat_perl_load (WEECHAT_SCRIPT_EVAL_NAME, perl_script_eval = weechat_perl_load (WEECHAT_SCRIPT_EVAL_NAME,
PERL_EVAL_SCRIPT); PERL_EVAL_SCRIPT);
perl_quiet = 0; perl_quiet = old_perl_quiet;
if (!perl_script_eval) if (!perl_script_eval)
return 0; return 0;
} }
@@ -867,9 +869,10 @@ weechat_perl_eval (struct t_gui_buffer *buffer, int send_to_buffer_as_input,
if (!weechat_config_boolean (perl_config_look_eval_keep_context)) if (!weechat_config_boolean (perl_config_look_eval_keep_context))
{ {
old_perl_quiet = perl_quiet;
perl_quiet = 1; perl_quiet = 1;
weechat_perl_unload (perl_script_eval); weechat_perl_unload (perl_script_eval);
perl_quiet = 0; perl_quiet = old_perl_quiet;
perl_script_eval = NULL; perl_script_eval = NULL;
} }
@@ -886,7 +889,7 @@ weechat_perl_command_cb (const void *pointer, void *data,
int argc, char **argv, char **argv_eol) int argc, char **argv, char **argv_eol)
{ {
char *ptr_name, *ptr_code, *path_script; char *ptr_name, *ptr_code, *path_script;
int i, send_to_buffer_as_input, exec_commands; int i, send_to_buffer_as_input, exec_commands, old_perl_quiet;
/* make C compiler happy */ /* make C compiler happy */
(void) pointer; (void) pointer;
@@ -945,6 +948,7 @@ weechat_perl_command_cb (const void *pointer, void *data,
|| (weechat_strcmp (argv[1], "reload") == 0) || (weechat_strcmp (argv[1], "reload") == 0)
|| (weechat_strcmp (argv[1], "unload") == 0)) || (weechat_strcmp (argv[1], "unload") == 0))
{ {
old_perl_quiet = perl_quiet;
ptr_name = argv_eol[2]; ptr_name = argv_eol[2];
if (strncmp (ptr_name, "-q ", 3) == 0) if (strncmp (ptr_name, "-q ", 3) == 0)
{ {
@@ -974,7 +978,7 @@ weechat_perl_command_cb (const void *pointer, void *data,
/* unload perl script */ /* unload perl script */
weechat_perl_unload_name (ptr_name); weechat_perl_unload_name (ptr_name);
} }
perl_quiet = 0; perl_quiet = old_perl_quiet;
} }
else if (weechat_strcmp (argv[1], "eval") == 0) else if (weechat_strcmp (argv[1], "eval") == 0)
{ {
@@ -1243,6 +1247,8 @@ weechat_perl_signal_quit_upgrade_cb (const void *pointer, void *data,
int int
weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
{ {
int old_perl_quiet;
#ifdef PERL_SYS_INIT3 #ifdef PERL_SYS_INIT3
int a; int a;
char **perl_args_local; char **perl_args_local;
@@ -1314,11 +1320,13 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
perl_data.callback_signal_debug_dump = &weechat_perl_signal_debug_dump_cb; perl_data.callback_signal_debug_dump = &weechat_perl_signal_debug_dump_cb;
perl_data.callback_signal_script_action = &weechat_perl_signal_script_action_cb; perl_data.callback_signal_script_action = &weechat_perl_signal_script_action_cb;
perl_data.callback_load_file = &weechat_perl_load_cb; perl_data.callback_load_file = &weechat_perl_load_cb;
perl_data.init_before_autoload = NULL;
perl_data.unload_all = &weechat_perl_unload_all; perl_data.unload_all = &weechat_perl_unload_all;
old_perl_quiet = perl_quiet;
perl_quiet = 1; perl_quiet = 1;
plugin_script_init (weechat_perl_plugin, &perl_data); plugin_script_init (weechat_perl_plugin, &perl_data);
perl_quiet = 0; perl_quiet = old_perl_quiet;
plugin_script_display_short_list (weechat_perl_plugin, plugin_script_display_short_list (weechat_perl_plugin,
perl_scripts); perl_scripts);
@@ -1337,7 +1345,10 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
int int
weechat_plugin_end (struct t_weechat_plugin *plugin) weechat_plugin_end (struct t_weechat_plugin *plugin)
{ {
int old_perl_quiet;
/* unload all scripts */ /* unload all scripts */
old_perl_quiet = perl_quiet;
perl_quiet = 1; perl_quiet = 1;
if (perl_script_eval) if (perl_script_eval)
{ {
@@ -1345,7 +1356,7 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
perl_script_eval = NULL; perl_script_eval = NULL;
} }
plugin_script_end (plugin, &perl_data); plugin_script_end (plugin, &perl_data);
perl_quiet = 0; perl_quiet = old_perl_quiet;
#ifndef MULTIPLICITY #ifndef MULTIPLICITY
/* free perl interpreter */ /* free perl interpreter */
+2 -1
View File
@@ -81,6 +81,7 @@
RETURN_STRING(""); RETURN_STRING("");
#define API_RETURN_INT(__int) RETURN_LONG(__int) #define API_RETURN_INT(__int) RETURN_LONG(__int)
#define API_RETURN_LONG(__long) RETURN_LONG(__long) #define API_RETURN_LONG(__long) RETURN_LONG(__long)
#define API_RETURN_LONGLONG(__longlong) RETURN_DOUBLE(__longlong)
#define weechat_php_get_function_name(__zfunc, __str) \ #define weechat_php_get_function_name(__zfunc, __str) \
const char *(__str); \ const char *(__str); \
do \ do \
@@ -5545,7 +5546,7 @@ API_FUNC(hdata_longlong)
result = weechat_hdata_longlong (hdata, pointer, (const char *)name); result = weechat_hdata_longlong (hdata, pointer, (const char *)name);
API_RETURN_LONG(result); API_RETURN_LONGLONG(result);
} }
API_FUNC(hdata_string) API_FUNC(hdata_string)
+12 -4
View File
@@ -870,7 +870,7 @@ weechat_php_command_cb (const void *pointer, void *data,
int argc, char **argv, char **argv_eol) int argc, char **argv, char **argv_eol)
{ {
char *ptr_name, *ptr_code, *path_script; char *ptr_name, *ptr_code, *path_script;
int i, send_to_buffer_as_input, exec_commands; int i, send_to_buffer_as_input, exec_commands, old_php_quiet;
/* make C compiler happy */ /* make C compiler happy */
(void) pointer; (void) pointer;
@@ -929,6 +929,7 @@ weechat_php_command_cb (const void *pointer, void *data,
|| (weechat_strcmp (argv[1], "reload") == 0) || (weechat_strcmp (argv[1], "reload") == 0)
|| (weechat_strcmp (argv[1], "unload") == 0)) || (weechat_strcmp (argv[1], "unload") == 0))
{ {
old_php_quiet = php_quiet;
ptr_name = argv_eol[2]; ptr_name = argv_eol[2];
if (strncmp (ptr_name, "-q ", 3) == 0) if (strncmp (ptr_name, "-q ", 3) == 0)
{ {
@@ -958,7 +959,7 @@ weechat_php_command_cb (const void *pointer, void *data,
/* unload PHP script */ /* unload PHP script */
weechat_php_unload_name (ptr_name); weechat_php_unload_name (ptr_name);
} }
php_quiet = 0; php_quiet = old_php_quiet;
} }
else if (weechat_strcmp (argv[1], "eval") == 0) else if (weechat_strcmp (argv[1], "eval") == 0)
{ {
@@ -1267,6 +1268,8 @@ php_weechat_log_message (char *message)
int int
weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
{ {
int old_php_quiet;
/* make C compiler happy */ /* make C compiler happy */
(void) argc; (void) argc;
(void) argv; (void) argv;
@@ -1302,6 +1305,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
php_data.callback_signal_debug_dump = &weechat_php_signal_debug_dump_cb; php_data.callback_signal_debug_dump = &weechat_php_signal_debug_dump_cb;
php_data.callback_signal_script_action = &weechat_php_signal_script_action_cb; php_data.callback_signal_script_action = &weechat_php_signal_script_action_cb;
php_data.callback_load_file = &weechat_php_load_cb; php_data.callback_load_file = &weechat_php_load_cb;
php_data.init_before_autoload = NULL;
php_data.unload_all = &weechat_php_unload_all; php_data.unload_all = &weechat_php_unload_all;
php_embed_module.startup = php_weechat_startup; php_embed_module.startup = php_weechat_startup;
@@ -1314,9 +1318,10 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
PG(report_zend_debug) = 0; /* Turn off --enable-debug output */ PG(report_zend_debug) = 0; /* Turn off --enable-debug output */
old_php_quiet = php_quiet;
php_quiet = 1; php_quiet = 1;
plugin_script_init (weechat_php_plugin, &php_data); plugin_script_init (weechat_php_plugin, &php_data);
php_quiet = 0; php_quiet = old_php_quiet;
plugin_script_display_short_list (weechat_php_plugin, plugin_script_display_short_list (weechat_php_plugin,
php_scripts); php_scripts);
@@ -1332,7 +1337,10 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
int int
weechat_plugin_end (struct t_weechat_plugin *plugin) weechat_plugin_end (struct t_weechat_plugin *plugin)
{ {
int old_php_quiet;
/* unload all scripts */ /* unload all scripts */
old_php_quiet = php_quiet;
php_quiet = 1; php_quiet = 1;
if (php_script_eval) if (php_script_eval)
{ {
@@ -1340,7 +1348,7 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
php_script_eval = NULL; php_script_eval = NULL;
} }
plugin_script_end (plugin, &php_data); plugin_script_end (plugin, &php_data);
php_quiet = 0; php_quiet = old_php_quiet;
if (weechat_php_func_map) if (weechat_php_func_map)
{ {
+1 -1
View File
@@ -512,7 +512,7 @@ plugin_api_info_buffer_cb (const void *pointer, void *data,
if (!ptr_buffer) if (!ptr_buffer)
return NULL; return NULL;
snprintf (value, sizeof (value), "%p", ptr_buffer); snprintf (value, sizeof (value), "0x%lx", (unsigned long)ptr_buffer);
return strdup (value); return strdup (value);
} }
+8 -1
View File
@@ -317,6 +317,13 @@ plugin_script_init (struct t_weechat_plugin *weechat_plugin,
&plugin_script_info_version_cb, &plugin_script_info_version_cb,
weechat_plugin, NULL); weechat_plugin, NULL);
/*
* call function "init_before_autoload"
* (called even if no scripts are auto-loaded)
*/
if (plugin_data->init_before_autoload)
(void)(plugin_data->init_before_autoload) ();
/* check if auto-load of scripts is enabled */ /* check if auto-load of scripts is enabled */
info_auto_load_scripts = weechat_info_get ("auto_load_scripts", NULL); info_auto_load_scripts = weechat_info_get ("auto_load_scripts", NULL);
auto_load_scripts = (info_auto_load_scripts auto_load_scripts = (info_auto_load_scripts
@@ -379,7 +386,7 @@ plugin_script_ptr2str (void *pointer)
return str_pointer[index_pointer]; return str_pointer[index_pointer];
snprintf (str_pointer[index_pointer], sizeof (str_pointer[index_pointer]), snprintf (str_pointer[index_pointer], sizeof (str_pointer[index_pointer]),
"%p", pointer); "0x%lx", (unsigned long)pointer);
return str_pointer[index_pointer]; return str_pointer[index_pointer];
} }
+1
View File
@@ -122,6 +122,7 @@ struct t_plugin_script_data
void (*callback_load_file) (void *data, const char *filename); void (*callback_load_file) (void *data, const char *filename);
/* functions */ /* functions */
void (*init_before_autoload) ();
void (*unload_all) (); void (*unload_all) ();
}; };
+35 -7
View File
@@ -1041,13 +1041,15 @@ weechat_python_eval (struct t_gui_buffer *buffer, int send_to_buffer_as_input,
int exec_commands, const char *code) int exec_commands, const char *code)
{ {
void *func_argv[1], *result; void *func_argv[1], *result;
int old_python_quiet;
if (!python_script_eval) if (!python_script_eval)
{ {
old_python_quiet = python_quiet;
python_quiet = 1; python_quiet = 1;
python_script_eval = weechat_python_load (WEECHAT_SCRIPT_EVAL_NAME, python_script_eval = weechat_python_load (WEECHAT_SCRIPT_EVAL_NAME,
PYTHON_EVAL_SCRIPT); PYTHON_EVAL_SCRIPT);
python_quiet = 0; python_quiet = old_python_quiet;
if (!python_script_eval) if (!python_script_eval)
return 0; return 0;
} }
@@ -1076,15 +1078,33 @@ weechat_python_eval (struct t_gui_buffer *buffer, int send_to_buffer_as_input,
if (!weechat_config_boolean (python_config_look_eval_keep_context)) if (!weechat_config_boolean (python_config_look_eval_keep_context))
{ {
old_python_quiet = python_quiet;
python_quiet = 1; python_quiet = 1;
weechat_python_unload (python_script_eval); weechat_python_unload (python_script_eval);
python_quiet = 0; python_quiet = old_python_quiet;
python_script_eval = NULL; python_script_eval = NULL;
} }
return 1; return 1;
} }
/*
* Function called before the auto-load of scripts.
*/
void
weechat_python_init_before_autoload ()
{
#if PY_VERSION_HEX >= 0x030C0000 && PY_VERSION_HEX < 0x030D0000
/*
* Workaround for crash when ending interpreters in Python 3.12:
* the first time we load a script, we eval an empty string.
* See https://github.com/weechat/weechat/issues/2046
*/
weechat_python_eval (NULL, 0, 0, "");
#endif
}
/* /*
* Callback for command "/python". * Callback for command "/python".
*/ */
@@ -1095,7 +1115,7 @@ weechat_python_command_cb (const void *pointer, void *data,
int argc, char **argv, char **argv_eol) int argc, char **argv, char **argv_eol)
{ {
char *ptr_name, *ptr_code, *path_script; char *ptr_name, *ptr_code, *path_script;
int i, send_to_buffer_as_input, exec_commands; int i, send_to_buffer_as_input, exec_commands, old_python_quiet;
/* make C compiler happy */ /* make C compiler happy */
(void) pointer; (void) pointer;
@@ -1154,6 +1174,7 @@ weechat_python_command_cb (const void *pointer, void *data,
|| (weechat_strcmp (argv[1], "reload") == 0) || (weechat_strcmp (argv[1], "reload") == 0)
|| (weechat_strcmp (argv[1], "unload") == 0)) || (weechat_strcmp (argv[1], "unload") == 0))
{ {
old_python_quiet = python_quiet;
ptr_name = argv_eol[2]; ptr_name = argv_eol[2];
if (strncmp (ptr_name, "-q ", 3) == 0) if (strncmp (ptr_name, "-q ", 3) == 0)
{ {
@@ -1183,7 +1204,7 @@ weechat_python_command_cb (const void *pointer, void *data,
/* unload python script */ /* unload python script */
weechat_python_unload_name (ptr_name); weechat_python_unload_name (ptr_name);
} }
python_quiet = 0; python_quiet = old_python_quiet;
} }
else if (weechat_strcmp (argv[1], "eval") == 0) else if (weechat_strcmp (argv[1], "eval") == 0)
{ {
@@ -1513,6 +1534,8 @@ weechat_python_signal_script_action_cb (const void *pointer, void *data,
int int
weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
{ {
int old_python_quiet;
/* make C compiler happy */ /* make C compiler happy */
(void) argc; (void) argc;
(void) argv; (void) argv;
@@ -1586,11 +1609,13 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
python_data.callback_signal_debug_dump = &weechat_python_signal_debug_dump_cb; python_data.callback_signal_debug_dump = &weechat_python_signal_debug_dump_cb;
python_data.callback_signal_script_action = &weechat_python_signal_script_action_cb; python_data.callback_signal_script_action = &weechat_python_signal_script_action_cb;
python_data.callback_load_file = &weechat_python_load_cb; python_data.callback_load_file = &weechat_python_load_cb;
python_data.init_before_autoload = &weechat_python_init_before_autoload;
python_data.unload_all = &weechat_python_unload_all; python_data.unload_all = &weechat_python_unload_all;
old_python_quiet = python_quiet;
python_quiet = 1; python_quiet = 1;
plugin_script_init (weechat_python_plugin, &python_data); plugin_script_init (weechat_python_plugin, &python_data);
python_quiet = 0; python_quiet = old_python_quiet;
plugin_script_display_short_list (weechat_python_plugin, plugin_script_display_short_list (weechat_python_plugin,
python_scripts); python_scripts);
@@ -1617,15 +1642,18 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
int int
weechat_plugin_end (struct t_weechat_plugin *plugin) weechat_plugin_end (struct t_weechat_plugin *plugin)
{ {
int old_python_quiet;
/* unload all scripts */ /* unload all scripts */
old_python_quiet = python_quiet;
python_quiet = 1; python_quiet = 1;
plugin_script_end (plugin, &python_data);
if (python_script_eval) if (python_script_eval)
{ {
weechat_python_unload (python_script_eval); weechat_python_unload (python_script_eval);
python_script_eval = NULL; python_script_eval = NULL;
} }
plugin_script_end (plugin, &python_data); python_quiet = old_python_quiet;
python_quiet = 0;
/* free python interpreter */ /* free python interpreter */
if (python_mainThreadState != NULL) if (python_mainThreadState != NULL)
+3 -3
View File
@@ -63,17 +63,17 @@ set(LINK_LIBS)
include_directories(${GNUTLS_INCLUDE_PATH}) include_directories(${GNUTLS_INCLUDE_PATH})
list(APPEND LINK_LIBS ${GNUTLS_LIBRARY}) list(APPEND LINK_LIBS ${GNUTLS_LIBRARY})
list(APPEND LINK_LIBS ${GCRYPT_LDFLAGS}) list(APPEND LINK_LIBS ${LIBGCRYPT_LDFLAGS})
list(APPEND LINK_LIBS ${ZLIB_LIBRARY}) list(APPEND LINK_LIBS ${ZLIB_LIBRARY})
if(ENABLE_ZSTD) if(ENABLE_ZSTD)
include_directories(${ZSTD_INCLUDE_DIRS}) include_directories(${LIBZSTD_INCLUDE_DIRS})
list(APPEND LINK_LIBS ${LIBZSTD_LDFLAGS}) list(APPEND LINK_LIBS ${LIBZSTD_LDFLAGS})
endif() endif()
if(ENABLE_CJSON) if(ENABLE_CJSON)
include_directories(${CJSON_INCLUDE_DIRS}) include_directories(${LIBCJSON_INCLUDE_DIRS})
list(APPEND LINK_LIBS ${LIBCJSON_LDFLAGS}) list(APPEND LINK_LIBS ${LIBCJSON_LDFLAGS})
endif() endif()
+6 -9
View File
@@ -55,16 +55,13 @@
cJSON_Create##__json_type ( \ cJSON_Create##__json_type ( \
weechat_hdata_##__var_type (hdata, pointer, __var_name))); weechat_hdata_##__var_type (hdata, pointer, __var_name)));
#define MSG_ADD_HDATA_TIME(__json_name, __var_name) \
date = weechat_hdata_time (hdata, pointer, __var_name); \
strftime (str_time, sizeof (str_time), "%FT%TZ", gmtime (&date)); \
MSG_ADD_STR_BUF(__json_name, str_time);
#define MSG_ADD_HDATA_TIME_USEC(__json_name, \ #define MSG_ADD_HDATA_TIME_USEC(__json_name, \
__var_name, __var_name_usec) \ __var_name, __var_name_usec) \
time_value = weechat_hdata_time (hdata, pointer, __var_name); \ time_value = weechat_hdata_time (hdata, pointer, __var_name); \
gmtime_r (&time_value, &gm_time); \ local_time = localtime (&time_value); \
tv.tv_sec = mktime (&gm_time); \ time_value -= local_time->tm_gmtoff; \
local_time = localtime (&time_value); \
tv.tv_sec = mktime (local_time); \
tv.tv_usec = weechat_hdata_integer (hdata, pointer, \ tv.tv_usec = weechat_hdata_integer (hdata, pointer, \
__var_name_usec); \ __var_name_usec); \
weechat_util_strftimeval (str_time, sizeof (str_time), \ weechat_util_strftimeval (str_time, sizeof (str_time), \
@@ -497,7 +494,7 @@ relay_api_msg_line_data_to_json (struct t_gui_line_data *line_data,
int i, tags_count; int i, tags_count;
time_t time_value; time_t time_value;
struct timeval tv; struct timeval tv;
struct tm gm_time; struct tm *local_time;
hdata = relay_hdata_line_data; hdata = relay_hdata_line_data;
pointer = line_data; pointer = line_data;
@@ -736,7 +733,7 @@ relay_api_msg_hotlist_to_json (struct t_gui_hotlist *hotlist)
cJSON *json, *json_count; cJSON *json, *json_count;
time_t time_value; time_t time_value;
struct timeval tv; struct timeval tv;
struct tm gm_time; struct tm *local_time;
char str_time[256], str_key[32]; char str_time[256], str_key[32];
int i, array_size; int i, array_size;
long long buffer_id; long long buffer_id;
+18 -1
View File
@@ -511,6 +511,8 @@ RELAY_API_PROTOCOL_CALLBACK(buffers)
int nicks; int nicks;
enum t_relay_api_colors colors; enum t_relay_api_colors colors;
json = NULL;
ptr_buffer = NULL; ptr_buffer = NULL;
if (client->http_req->num_path_items > 2) if (client->http_req->num_path_items > 2)
{ {
@@ -536,6 +538,11 @@ RELAY_API_PROTOCOL_CALLBACK(buffers)
{ {
lines = relay_http_get_param_long (client->http_req, "lines", LONG_MAX); lines = relay_http_get_param_long (client->http_req, "lines", LONG_MAX);
json = relay_api_msg_lines_to_json (ptr_buffer, lines, colors); json = relay_api_msg_lines_to_json (ptr_buffer, lines, colors);
if (json)
{
relay_api_msg_send_json (client, RELAY_HTTP_200_OK, NULL,
"line", json);
}
} }
else if (strcmp (client->http_req->path_items[3], "nicks") == 0) else if (strcmp (client->http_req->path_items[3], "nicks") == 0)
{ {
@@ -543,6 +550,11 @@ RELAY_API_PROTOCOL_CALLBACK(buffers)
weechat_hdata_pointer (relay_hdata_buffer, weechat_hdata_pointer (relay_hdata_buffer,
ptr_buffer, "nicklist_root"), ptr_buffer, "nicklist_root"),
colors); colors);
if (json)
{
relay_api_msg_send_json (client, RELAY_HTTP_200_OK, NULL,
"nick_group", json);
}
} }
else else
{ {
@@ -580,13 +592,18 @@ RELAY_API_PROTOCOL_CALLBACK(buffers)
ptr_buffer = weechat_hdata_move (relay_hdata_buffer, ptr_buffer, 1); ptr_buffer = weechat_hdata_move (relay_hdata_buffer, ptr_buffer, 1);
} }
} }
if (json)
{
relay_api_msg_send_json (client, RELAY_HTTP_200_OK, NULL,
"buffer", json);
}
} }
if (!json) if (!json)
return RELAY_API_PROTOCOL_RC_MEMORY; return RELAY_API_PROTOCOL_RC_MEMORY;
relay_api_msg_send_json (client, RELAY_HTTP_200_OK, NULL, "buffer", json);
cJSON_Delete (json); cJSON_Delete (json);
return RELAY_API_PROTOCOL_RC_OK; return RELAY_API_PROTOCOL_RC_OK;
} }
@@ -444,14 +444,17 @@ relay_remote_event_buffer_input_cb (const void *pointer,
struct t_gui_buffer *buffer, struct t_gui_buffer *buffer,
const char *input_data) const char *input_data)
{ {
struct t_relay_remote *remote; struct t_relay_remote *ptr_remote;
cJSON *json, *json_body; cJSON *json, *json_body;
long long buffer_id; long long buffer_id;
/* make C compiler happy */ /* make C compiler happy */
(void) pointer;
(void) data; (void) data;
remote = (struct t_relay_remote *)pointer; ptr_remote = relay_remote_search (weechat_buffer_get_string (buffer, "localvar_relay_remote"));
if (!ptr_remote)
return WEECHAT_RC_OK;
json = NULL; json = NULL;
@@ -475,7 +478,7 @@ relay_remote_event_buffer_input_cb (const void *pointer,
cJSON_CreateString (input_data)); cJSON_CreateString (input_data));
cJSON_AddItemToObject (json, "body", json_body); cJSON_AddItemToObject (json, "body", json_body);
relay_remote_network_send_json (remote, json); relay_remote_network_send_json (ptr_remote, json);
cJSON_Delete (json); cJSON_Delete (json);
@@ -643,7 +646,7 @@ RELAY_REMOTE_EVENT_CALLBACK(buffer)
{ {
ptr_buffer = weechat_buffer_new_props ( ptr_buffer = weechat_buffer_new_props (
full_name, buffer_props, full_name, buffer_props,
&relay_remote_event_buffer_input_cb, event->remote, NULL, &relay_remote_event_buffer_input_cb, NULL, NULL,
NULL, NULL, NULL); NULL, NULL, NULL);
apply_props = 0; apply_props = 0;
} }
@@ -206,7 +206,8 @@ relay_remote_network_check_auth (struct t_relay_remote *remote,
relay_websocket_parse_extensions ( relay_websocket_parse_extensions (
weechat_hashtable_get (http_resp->headers, "sec-websocket-extensions"), weechat_hashtable_get (http_resp->headers, "sec-websocket-extensions"),
remote->ws_deflate); remote->ws_deflate,
1); /* ws_deflate_allowed */
if (!accept_ok) if (!accept_ok)
{ {
+4 -2
View File
@@ -215,7 +215,8 @@ relay_irc_sendf (struct t_relay_client *client, const char *format, ...)
hashtable_in = NULL; hashtable_in = NULL;
hashtable_out = NULL; hashtable_out = NULL;
snprintf (modifier_data, sizeof (modifier_data), "%p", client); snprintf (modifier_data, sizeof (modifier_data),
"0x%lx", (unsigned long)client);
new_msg1 = weechat_hook_modifier_exec ("relay_client_irc_out1", new_msg1 = weechat_hook_modifier_exec ("relay_client_irc_out1",
modifier_data, vbuffer); modifier_data, vbuffer);
@@ -1641,7 +1642,8 @@ relay_irc_recv (struct t_relay_client *client, const char *data)
data); data);
} }
snprintf (modifier_data, sizeof (modifier_data), "%p", client); snprintf (modifier_data, sizeof (modifier_data),
"0x%lx", (unsigned long)client);
new_data = weechat_hook_modifier_exec ("relay_client_irc_in", new_data = weechat_hook_modifier_exec ("relay_client_irc_in",
modifier_data, data); modifier_data, data);
+6
View File
@@ -1620,6 +1620,8 @@ relay_client_new_with_infolist (struct t_infolist *infolist)
new_client->ws_deflate->client_context_takeover = weechat_infolist_integer (infolist, "ws_deflate_client_context_takeover"); new_client->ws_deflate->client_context_takeover = weechat_infolist_integer (infolist, "ws_deflate_client_context_takeover");
new_client->ws_deflate->window_bits_deflate = weechat_infolist_integer (infolist, "ws_deflate_window_bits_deflate"); new_client->ws_deflate->window_bits_deflate = weechat_infolist_integer (infolist, "ws_deflate_window_bits_deflate");
new_client->ws_deflate->window_bits_inflate = weechat_infolist_integer (infolist, "ws_deflate_window_bits_inflate"); new_client->ws_deflate->window_bits_inflate = weechat_infolist_integer (infolist, "ws_deflate_window_bits_inflate");
new_client->ws_deflate->server_max_window_bits_recv = weechat_infolist_integer (infolist, "ws_deflate_server_max_window_bits_recv");
new_client->ws_deflate->client_max_window_bits_recv = weechat_infolist_integer (infolist, "ws_deflate_client_max_window_bits_recv");
new_client->ws_deflate->strm_deflate = NULL; new_client->ws_deflate->strm_deflate = NULL;
new_client->ws_deflate->strm_inflate = NULL; new_client->ws_deflate->strm_inflate = NULL;
if (weechat_infolist_search_var (infolist, "ws_deflate_strm_deflate_dict")) if (weechat_infolist_search_var (infolist, "ws_deflate_strm_deflate_dict"))
@@ -2073,6 +2075,10 @@ relay_client_add_to_infolist (struct t_infolist *infolist,
return 0; return 0;
if (!weechat_infolist_new_var_integer (ptr_item, "ws_deflate_window_bits_inflate", client->ws_deflate->window_bits_inflate)) if (!weechat_infolist_new_var_integer (ptr_item, "ws_deflate_window_bits_inflate", client->ws_deflate->window_bits_inflate))
return 0; return 0;
if (!weechat_infolist_new_var_integer (ptr_item, "ws_deflate_server_max_window_bits_recv", client->ws_deflate->server_max_window_bits_recv))
return 0;
if (!weechat_infolist_new_var_integer (ptr_item, "ws_deflate_client_max_window_bits_recv", client->ws_deflate->client_max_window_bits_recv))
return 0;
if (!weechat_infolist_new_var_pointer (ptr_item, "ws_deflate_strm_deflate", client->ws_deflate->strm_deflate)) if (!weechat_infolist_new_var_pointer (ptr_item, "ws_deflate_strm_deflate", client->ws_deflate->strm_deflate))
return 0; return 0;
if (!weechat_infolist_new_var_pointer (ptr_item, "ws_deflate_strm_inflate", client->ws_deflate->strm_inflate)) if (!weechat_infolist_new_var_pointer (ptr_item, "ws_deflate_strm_inflate", client->ws_deflate->strm_inflate))
+8
View File
@@ -59,6 +59,7 @@ struct t_config_section *relay_config_section_remote = NULL;
struct t_config_option *relay_config_look_auto_open_buffer = NULL; struct t_config_option *relay_config_look_auto_open_buffer = NULL;
struct t_config_option *relay_config_look_display_clients = NULL; struct t_config_option *relay_config_look_display_clients = NULL;
struct t_config_option *relay_config_look_raw_messages = NULL; struct t_config_option *relay_config_look_raw_messages = NULL;
struct t_config_option *relay_config_look_raw_messages_max_length = NULL;
/* relay config, color section */ /* relay config, color section */
@@ -1455,6 +1456,13 @@ relay_config_init ()
"buffer)"), "buffer)"),
NULL, 0, 65535, "256", NULL, 0, NULL, 0, 65535, "256", NULL, 0,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
relay_config_look_raw_messages_max_length = weechat_config_new_option (
relay_config_file, relay_config_section_look,
"raw_messages_max_length", "integer",
N_("max number of chars to display in raw messages (very long "
"messages can cause slowness); 0 = display whole messages"),
NULL, 0, INT_MAX, "4096", NULL, 0,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
} }
/* section color */ /* section color */
+1
View File
@@ -34,6 +34,7 @@ extern struct t_config_section *relay_config_section_path;
extern struct t_config_option *relay_config_look_auto_open_buffer; extern struct t_config_option *relay_config_look_auto_open_buffer;
extern struct t_config_option *relay_config_look_raw_messages; extern struct t_config_option *relay_config_look_raw_messages;
extern struct t_config_option *relay_config_look_raw_messages_max_length;
extern struct t_config_option *relay_config_color_client; extern struct t_config_option *relay_config_color_client;
extern struct t_config_option *relay_config_color_status[]; extern struct t_config_option *relay_config_color_status[];
+17 -4
View File
@@ -385,6 +385,10 @@ error:
/* /*
* Parses and saves a HTTP header in hashtable "headers". * Parses and saves a HTTP header in hashtable "headers".
* *
* The parameter "ws_deflate_allowed" controls whether the websocket extension
* "permessage-deflate" is allowed or not (it is allowed only with "api"
* protocol).
*
* Returns: * Returns:
* 1: OK, header saved * 1: OK, header saved
* 0: error: invalid format * 0: error: invalid format
@@ -392,7 +396,8 @@ error:
int int
relay_http_parse_header (struct t_relay_http_request *request, relay_http_parse_header (struct t_relay_http_request *request,
const char *header) const char *header,
int ws_deflate_allowed)
{ {
char *pos, *name, *name_lower, *error, **items; char *pos, *name, *name_lower, *error, **items;
const char *ptr_value; const char *ptr_value;
@@ -465,7 +470,12 @@ relay_http_parse_header (struct t_relay_http_request *request,
* extensions * extensions
*/ */
if (strcmp (name_lower, "sec-websocket-extensions") == 0) if (strcmp (name_lower, "sec-websocket-extensions") == 0)
relay_websocket_parse_extensions (ptr_value, request->ws_deflate); {
relay_websocket_parse_extensions (
ptr_value,
request->ws_deflate,
ws_deflate_allowed);
}
free (name); free (name);
free (name_lower); free (name_lower);
@@ -891,7 +901,7 @@ void
relay_http_recv (struct t_relay_client *client, const char *data) relay_http_recv (struct t_relay_client *client, const char *data)
{ {
char *new_partial, *pos; char *new_partial, *pos;
int length; int length, ws_deflate_allowed;
if (client->partial_message) if (client->partial_message)
{ {
@@ -924,8 +934,11 @@ relay_http_recv (struct t_relay_client *client, const char *data)
} }
else else
{ {
ws_deflate_allowed = (client->protocol == RELAY_PROTOCOL_API) ?
1 : 0;
relay_http_parse_header (client->http_req, relay_http_parse_header (client->http_req,
client->partial_message); client->partial_message,
ws_deflate_allowed);
} }
pos[0] = '\r'; pos[0] = '\r';
pos++; pos++;
+13 -9
View File
@@ -303,8 +303,9 @@ relay_raw_message_add (enum t_relay_msg_type msg_type,
const char *peer_id, const char *peer_id,
const char *data, int data_size) const char *data, int data_size)
{ {
char *raw_data, *buf, prefix[1024], prefix_arrow[16]; char *raw_data, *raw_data_cut, *buf, prefix[1024], prefix_arrow[16];
int length; const char *ptr_raw_data;
int max_length;
struct t_relay_raw_message *new_raw_message; struct t_relay_raw_message *new_raw_message;
struct timeval tv_now; struct timeval tv_now;
@@ -350,15 +351,18 @@ relay_raw_message_add (enum t_relay_msg_type msg_type,
(peer_id && peer_id[0]) ? peer_id : ""); (peer_id && peer_id[0]) ? peer_id : "");
} }
length = strlen (relay_msg_type_string[msg_type]) + strlen (raw_data) + 1; raw_data_cut = NULL;
buf = malloc (length); ptr_raw_data = raw_data;
if (buf) max_length = weechat_config_integer (relay_config_look_raw_messages_max_length);
if (max_length > 0)
{ {
snprintf (buf, length, "%s%s", raw_data_cut = weechat_string_cut (raw_data, max_length, 0, 0, " (...)");
relay_msg_type_string[msg_type], ptr_raw_data = raw_data_cut;
raw_data);
} }
weechat_asprintf (&buf, "%s%s",
relay_msg_type_string[msg_type],
(ptr_raw_data) ? ptr_raw_data : "");
free (raw_data_cut);
gettimeofday (&tv_now, NULL); gettimeofday (&tv_now, NULL);
new_raw_message = relay_raw_message_add_to_list ( new_raw_message = relay_raw_message_add_to_list (
tv_now.tv_sec, tv_now.tv_sec,
+2
View File
@@ -544,6 +544,8 @@ relay_remote_new_with_infolist (struct t_infolist *infolist)
new_remote->ws_deflate->client_context_takeover = weechat_infolist_integer (infolist, "ws_deflate_client_context_takeover"); new_remote->ws_deflate->client_context_takeover = weechat_infolist_integer (infolist, "ws_deflate_client_context_takeover");
new_remote->ws_deflate->window_bits_deflate = weechat_infolist_integer (infolist, "ws_deflate_window_bits_deflate"); new_remote->ws_deflate->window_bits_deflate = weechat_infolist_integer (infolist, "ws_deflate_window_bits_deflate");
new_remote->ws_deflate->window_bits_inflate = weechat_infolist_integer (infolist, "ws_deflate_window_bits_inflate"); new_remote->ws_deflate->window_bits_inflate = weechat_infolist_integer (infolist, "ws_deflate_window_bits_inflate");
new_remote->ws_deflate->server_max_window_bits_recv = weechat_infolist_integer (infolist, "ws_deflate_server_max_window_bits_recv");
new_remote->ws_deflate->client_max_window_bits_recv = weechat_infolist_integer (infolist, "ws_deflate_client_max_window_bits_recv");
new_remote->ws_deflate->strm_deflate = NULL; new_remote->ws_deflate->strm_deflate = NULL;
new_remote->ws_deflate->strm_inflate = NULL; new_remote->ws_deflate->strm_inflate = NULL;
if (weechat_infolist_search_var (infolist, "ws_deflate_strm_deflate_dict")) if (weechat_infolist_search_var (infolist, "ws_deflate_strm_deflate_dict"))
+60 -20
View File
@@ -49,9 +49,11 @@ relay_websocket_deflate_alloc ()
new_ws_deflate->enabled = 0; new_ws_deflate->enabled = 0;
new_ws_deflate->server_context_takeover = 0; new_ws_deflate->server_context_takeover = 0;
new_ws_deflate->server_context_takeover = 0; new_ws_deflate->client_context_takeover = 0;
new_ws_deflate->window_bits_deflate = 0; new_ws_deflate->window_bits_deflate = 0;
new_ws_deflate->window_bits_inflate = 0; new_ws_deflate->window_bits_inflate = 0;
new_ws_deflate->server_max_window_bits_recv = 0;
new_ws_deflate->client_max_window_bits_recv = 0;
new_ws_deflate->strm_deflate = NULL; new_ws_deflate->strm_deflate = NULL;
new_ws_deflate->strm_inflate = NULL; new_ws_deflate->strm_inflate = NULL;
@@ -145,9 +147,11 @@ relay_websocket_deflate_reinit (struct t_relay_websocket_deflate *ws_deflate)
{ {
ws_deflate->enabled = 0; ws_deflate->enabled = 0;
ws_deflate->server_context_takeover = 0; ws_deflate->server_context_takeover = 0;
ws_deflate->server_context_takeover = 0; ws_deflate->client_context_takeover = 0;
ws_deflate->window_bits_deflate = 0; ws_deflate->window_bits_deflate = 0;
ws_deflate->window_bits_inflate = 0; ws_deflate->window_bits_inflate = 0;
ws_deflate->server_max_window_bits_recv = 0;
ws_deflate->client_max_window_bits_recv = 0;
relay_websocket_deflate_free_stream_deflate (ws_deflate); relay_websocket_deflate_free_stream_deflate (ws_deflate);
relay_websocket_deflate_free_stream_inflate (ws_deflate); relay_websocket_deflate_free_stream_inflate (ws_deflate);
} }
@@ -297,7 +301,8 @@ relay_websocket_client_handshake_valid (struct t_relay_http_request *request)
void void
relay_websocket_parse_extensions (const char *extensions, relay_websocket_parse_extensions (const char *extensions,
struct t_relay_websocket_deflate *ws_deflate) struct t_relay_websocket_deflate *ws_deflate,
int ws_deflate_allowed)
{ {
char **exts, **params, **items, *error; char **exts, **params, **items, *error;
int i, j, num_exts, num_params, num_items; int i, j, num_exts, num_params, num_items;
@@ -315,6 +320,7 @@ relay_websocket_parse_extensions (const char *extensions,
params = weechat_string_split (exts[i], ";", " ", 0, 0, &num_params); params = weechat_string_split (exts[i], ";", " ", 0, 0, &num_params);
if (params && (num_params >= 1) if (params && (num_params >= 1)
&& (strcmp (params[0], "permessage-deflate") == 0) && (strcmp (params[0], "permessage-deflate") == 0)
&& ws_deflate_allowed
&& (weechat_config_integer (relay_config_network_compression) > 0)) && (weechat_config_integer (relay_config_network_compression) > 0))
{ {
ws_deflate->enabled = 1; ws_deflate->enabled = 1;
@@ -322,6 +328,8 @@ relay_websocket_parse_extensions (const char *extensions,
ws_deflate->client_context_takeover = 1; ws_deflate->client_context_takeover = 1;
ws_deflate->window_bits_deflate = 15; ws_deflate->window_bits_deflate = 15;
ws_deflate->window_bits_inflate = 15; ws_deflate->window_bits_inflate = 15;
ws_deflate->server_max_window_bits_recv = 0;
ws_deflate->client_max_window_bits_recv = 0;
for (j = 1; j < num_params; j++) for (j = 1; j < num_params; j++)
{ {
items = weechat_string_split (params[j], "=", " ", 0, 0, &num_items); items = weechat_string_split (params[j], "=", " ", 0, 0, &num_items);
@@ -356,9 +364,15 @@ relay_websocket_parse_extensions (const char *extensions,
} }
} }
if (strcmp (items[0], "server_max_window_bits") == 0) if (strcmp (items[0], "server_max_window_bits") == 0)
{
ws_deflate->server_max_window_bits_recv = 1;
ws_deflate->window_bits_deflate = (int)number; ws_deflate->window_bits_deflate = (int)number;
}
else else
{
ws_deflate->client_max_window_bits_recv = 1;
ws_deflate->window_bits_inflate = (int)number; ws_deflate->window_bits_inflate = (int)number;
}
} }
} }
weechat_string_free_split (items); weechat_string_free_split (items);
@@ -388,7 +402,7 @@ relay_websocket_build_handshake (struct t_relay_http_request *request)
{ {
const char *sec_websocket_key; const char *sec_websocket_key;
char *key, sec_websocket_accept[128], handshake[4096], hash[160 / 8]; char *key, sec_websocket_accept[128], handshake[4096], hash[160 / 8];
char sec_websocket_extensions[512]; char **extensions, str_window_bits[128], sec_websocket_extensions[1024];
int length, hash_size; int length, hash_size;
if (!request) if (!request)
@@ -426,17 +440,41 @@ relay_websocket_build_handshake (struct t_relay_http_request *request)
if (request->ws_deflate->enabled) if (request->ws_deflate->enabled)
{ {
extensions = weechat_string_dyn_alloc (128);
if (!extensions)
return NULL;
weechat_string_dyn_concat (extensions, "permessage-deflate", -1);
if (!request->ws_deflate->server_context_takeover)
{
weechat_string_dyn_concat (extensions, "; ", -1);
weechat_string_dyn_concat (extensions, "server_no_context_takeover", -1);
}
if (!request->ws_deflate->client_context_takeover)
{
weechat_string_dyn_concat (extensions, "; ", -1);
weechat_string_dyn_concat (extensions, "client_no_context_takeover", -1);
}
if (request->ws_deflate->server_max_window_bits_recv)
{
weechat_string_dyn_concat (extensions, "; ", -1);
snprintf (str_window_bits, sizeof (str_window_bits),
"server_max_window_bits=%d",
request->ws_deflate->window_bits_deflate);
weechat_string_dyn_concat (extensions, str_window_bits, -1);
}
if (request->ws_deflate->client_max_window_bits_recv)
{
weechat_string_dyn_concat (extensions, "; ", -1);
snprintf (str_window_bits, sizeof (str_window_bits),
"client_max_window_bits=%d",
request->ws_deflate->window_bits_inflate);
weechat_string_dyn_concat (extensions, str_window_bits, -1);
}
snprintf ( snprintf (
sec_websocket_extensions, sizeof (sec_websocket_extensions), sec_websocket_extensions, sizeof (sec_websocket_extensions),
"Sec-WebSocket-Extensions: permessage-deflate; " "Sec-WebSocket-Extensions: %s\r\n",
"%s" *extensions);
"%s" weechat_string_dyn_free (extensions, 1);
"server_max_window_bits=%d; "
"client_max_window_bits=%d\r\n",
(!request->ws_deflate->server_context_takeover) ? "server_no_context_takeover; " : "",
(!request->ws_deflate->client_context_takeover) ? "client_no_context_takeover; " : "",
request->ws_deflate->window_bits_deflate,
request->ws_deflate->window_bits_inflate);
} }
else else
{ {
@@ -951,11 +989,13 @@ relay_websocket_deflate_print_log (struct t_relay_websocket_deflate *ws_deflate,
const char *prefix) const char *prefix)
{ {
weechat_log_printf ("%s ws_deflate:", prefix); weechat_log_printf ("%s ws_deflate:", prefix);
weechat_log_printf ("%s enabled . . . . . . . . : %d", prefix, ws_deflate->enabled); weechat_log_printf ("%s enabled. . . . . . . . . . : %d", prefix, ws_deflate->enabled);
weechat_log_printf ("%s server_context_takeover : %d", prefix, ws_deflate->server_context_takeover); weechat_log_printf ("%s server_context_takeover. . : %d", prefix, ws_deflate->server_context_takeover);
weechat_log_printf ("%s client_context_takeover : %d", prefix, ws_deflate->client_context_takeover); weechat_log_printf ("%s client_context_takeover. . : %d", prefix, ws_deflate->client_context_takeover);
weechat_log_printf ("%s window_bits_deflate . . : %d", prefix, ws_deflate->window_bits_deflate); weechat_log_printf ("%s window_bits_deflate. . . . : %d", prefix, ws_deflate->window_bits_deflate);
weechat_log_printf ("%s window_bits_inflate . . : %d", prefix, ws_deflate->window_bits_inflate); weechat_log_printf ("%s window_bits_inflate. . . . : %d", prefix, ws_deflate->window_bits_inflate);
weechat_log_printf ("%s strm_deflate. . . . . . : %p", prefix, ws_deflate->strm_deflate); weechat_log_printf ("%s server_max_window_bits_recv: %d", prefix, ws_deflate->server_max_window_bits_recv);
weechat_log_printf ("%s strm_inflate. . . . . . : %p", prefix, ws_deflate->strm_inflate); weechat_log_printf ("%s client_max_window_bits_recv: %d", prefix, ws_deflate->client_max_window_bits_recv);
weechat_log_printf ("%s strm_deflate . . . . . . . : %p", prefix, ws_deflate->strm_deflate);
weechat_log_printf ("%s strm_inflate . . . . . . . : %p", prefix, ws_deflate->strm_inflate);
} }
+4 -1
View File
@@ -49,6 +49,8 @@ struct t_relay_websocket_deflate
/* ("server_max_window_bits") */ /* ("server_max_window_bits") */
int window_bits_inflate; /* window bits for client (decomp.) */ int window_bits_inflate; /* window bits for client (decomp.) */
/* ("client_max_window_bits") */ /* ("client_max_window_bits") */
int server_max_window_bits_recv; /* "server_max_window_bits" received?*/
int client_max_window_bits_recv; /* "client_max_window_bits" received?*/
z_stream *strm_deflate; /* stream for deflate (compression) */ z_stream *strm_deflate; /* stream for deflate (compression) */
z_stream *strm_inflate; /* stream for inflate (decompression)*/ z_stream *strm_inflate; /* stream for inflate (decompression)*/
}; };
@@ -69,7 +71,8 @@ extern int relay_websocket_is_valid_http_get (enum t_relay_protocol protocol,
const char *message); const char *message);
extern int relay_websocket_client_handshake_valid (struct t_relay_http_request *request); extern int relay_websocket_client_handshake_valid (struct t_relay_http_request *request);
extern void relay_websocket_parse_extensions (const char *extensions, extern void relay_websocket_parse_extensions (const char *extensions,
struct t_relay_websocket_deflate *ws_deflate); struct t_relay_websocket_deflate *ws_deflate,
int ws_deflate_allowed);
extern char *relay_websocket_build_handshake (struct t_relay_http_request *request); extern char *relay_websocket_build_handshake (struct t_relay_http_request *request);
extern int relay_websocket_decode_frame (const unsigned char *buffer, extern int relay_websocket_decode_frame (const unsigned char *buffer,
unsigned long long length, unsigned long long length,
@@ -872,7 +872,8 @@ relay_weechat_protocol_signal_buffer_cb (const void *pointer, void *data,
msg = relay_weechat_msg_new (str_signal); msg = relay_weechat_msg_new (str_signal);
if (msg) if (msg)
{ {
snprintf (cmd_hdata, sizeof (cmd_hdata), "buffer:%p", ptr_buffer); snprintf (cmd_hdata, sizeof (cmd_hdata),
"buffer:0x%lx", (unsigned long)ptr_buffer);
relay_weechat_msg_add_hdata (msg, cmd_hdata, relay_weechat_msg_add_hdata (msg, cmd_hdata,
"id,number,full_name,short_name," "id,number,full_name,short_name,"
"nicklist,title,local_variables," "nicklist,title,local_variables,"
@@ -896,7 +897,8 @@ relay_weechat_protocol_signal_buffer_cb (const void *pointer, void *data,
msg = relay_weechat_msg_new (str_signal); msg = relay_weechat_msg_new (str_signal);
if (msg) if (msg)
{ {
snprintf (cmd_hdata, sizeof (cmd_hdata), "buffer:%p", ptr_buffer); snprintf (cmd_hdata, sizeof (cmd_hdata),
"buffer:0x%lx", (unsigned long)ptr_buffer);
relay_weechat_msg_add_hdata (msg, cmd_hdata, relay_weechat_msg_add_hdata (msg, cmd_hdata,
"id,number,full_name,type"); "id,number,full_name,type");
relay_weechat_msg_send (ptr_client, msg); relay_weechat_msg_send (ptr_client, msg);
@@ -918,7 +920,8 @@ relay_weechat_protocol_signal_buffer_cb (const void *pointer, void *data,
msg = relay_weechat_msg_new (str_signal); msg = relay_weechat_msg_new (str_signal);
if (msg) if (msg)
{ {
snprintf (cmd_hdata, sizeof (cmd_hdata), "buffer:%p", ptr_buffer); snprintf (cmd_hdata, sizeof (cmd_hdata),
"buffer:0x%lx", (unsigned long)ptr_buffer);
relay_weechat_msg_add_hdata (msg, cmd_hdata, relay_weechat_msg_add_hdata (msg, cmd_hdata,
"id,number,full_name," "id,number,full_name,"
"prev_buffer,next_buffer"); "prev_buffer,next_buffer");
@@ -942,7 +945,8 @@ relay_weechat_protocol_signal_buffer_cb (const void *pointer, void *data,
msg = relay_weechat_msg_new (str_signal); msg = relay_weechat_msg_new (str_signal);
if (msg) if (msg)
{ {
snprintf (cmd_hdata, sizeof (cmd_hdata), "buffer:%p", ptr_buffer); snprintf (cmd_hdata, sizeof (cmd_hdata),
"buffer:0x%lx", (unsigned long)ptr_buffer);
relay_weechat_msg_add_hdata (msg, cmd_hdata, relay_weechat_msg_add_hdata (msg, cmd_hdata,
"id,number,full_name," "id,number,full_name,"
"prev_buffer,next_buffer"); "prev_buffer,next_buffer");
@@ -966,7 +970,8 @@ relay_weechat_protocol_signal_buffer_cb (const void *pointer, void *data,
msg = relay_weechat_msg_new (str_signal); msg = relay_weechat_msg_new (str_signal);
if (msg) if (msg)
{ {
snprintf (cmd_hdata, sizeof (cmd_hdata), "buffer:%p", ptr_buffer); snprintf (cmd_hdata, sizeof (cmd_hdata),
"buffer:0x%lx", (unsigned long)ptr_buffer);
relay_weechat_msg_add_hdata (msg, cmd_hdata, relay_weechat_msg_add_hdata (msg, cmd_hdata,
"id,number,full_name," "id,number,full_name,"
"prev_buffer,next_buffer"); "prev_buffer,next_buffer");
@@ -1010,7 +1015,8 @@ relay_weechat_protocol_signal_buffer_cb (const void *pointer, void *data,
msg = relay_weechat_msg_new (str_signal); msg = relay_weechat_msg_new (str_signal);
if (msg) if (msg)
{ {
snprintf (cmd_hdata, sizeof (cmd_hdata), "buffer:%p", ptr_buffer); snprintf (cmd_hdata, sizeof (cmd_hdata),
"buffer:0x%lx", (unsigned long)ptr_buffer);
relay_weechat_msg_add_hdata (msg, cmd_hdata, relay_weechat_msg_add_hdata (msg, cmd_hdata,
"id,number,full_name,short_name," "id,number,full_name,short_name,"
"local_variables"); "local_variables");
@@ -1033,7 +1039,8 @@ relay_weechat_protocol_signal_buffer_cb (const void *pointer, void *data,
msg = relay_weechat_msg_new (str_signal); msg = relay_weechat_msg_new (str_signal);
if (msg) if (msg)
{ {
snprintf (cmd_hdata, sizeof (cmd_hdata), "buffer:%p", ptr_buffer); snprintf (cmd_hdata, sizeof (cmd_hdata),
"buffer:0x%lx", (unsigned long)ptr_buffer);
relay_weechat_msg_add_hdata (msg, cmd_hdata, relay_weechat_msg_add_hdata (msg, cmd_hdata,
"id,number,full_name,title"); "id,number,full_name,title");
relay_weechat_msg_send (ptr_client, msg); relay_weechat_msg_send (ptr_client, msg);
@@ -1055,7 +1062,8 @@ relay_weechat_protocol_signal_buffer_cb (const void *pointer, void *data,
msg = relay_weechat_msg_new (str_signal); msg = relay_weechat_msg_new (str_signal);
if (msg) if (msg)
{ {
snprintf (cmd_hdata, sizeof (cmd_hdata), "buffer:%p", ptr_buffer); snprintf (cmd_hdata, sizeof (cmd_hdata),
"buffer:0x%lx", (unsigned long)ptr_buffer);
relay_weechat_msg_add_hdata (msg, cmd_hdata, relay_weechat_msg_add_hdata (msg, cmd_hdata,
"id,number,full_name,local_variables"); "id,number,full_name,local_variables");
relay_weechat_msg_send (ptr_client, msg); relay_weechat_msg_send (ptr_client, msg);
@@ -1076,7 +1084,8 @@ relay_weechat_protocol_signal_buffer_cb (const void *pointer, void *data,
msg = relay_weechat_msg_new (str_signal); msg = relay_weechat_msg_new (str_signal);
if (msg) if (msg)
{ {
snprintf (cmd_hdata, sizeof (cmd_hdata), "buffer:%p", ptr_buffer); snprintf (cmd_hdata, sizeof (cmd_hdata),
"buffer:0x%lx", (unsigned long)ptr_buffer);
relay_weechat_msg_add_hdata (msg, cmd_hdata, relay_weechat_msg_add_hdata (msg, cmd_hdata,
"id,number,full_name"); "id,number,full_name");
relay_weechat_msg_send (ptr_client, msg); relay_weechat_msg_send (ptr_client, msg);
@@ -1107,8 +1116,8 @@ relay_weechat_protocol_signal_buffer_cb (const void *pointer, void *data,
if (msg) if (msg)
{ {
snprintf (cmd_hdata, sizeof (cmd_hdata), snprintf (cmd_hdata, sizeof (cmd_hdata),
"line_data:%p", "line_data:0x%lx",
ptr_line_data); (unsigned long)ptr_line_data);
relay_weechat_msg_add_hdata ( relay_weechat_msg_add_hdata (
msg, cmd_hdata, msg, cmd_hdata,
"buffer,date,date_usec,date_printed,date_usec_printed," "buffer,date,date_usec,date_printed,date_usec_printed,"
@@ -1133,7 +1142,8 @@ relay_weechat_protocol_signal_buffer_cb (const void *pointer, void *data,
msg = relay_weechat_msg_new (str_signal); msg = relay_weechat_msg_new (str_signal);
if (msg) if (msg)
{ {
snprintf (cmd_hdata, sizeof (cmd_hdata), "buffer:%p", ptr_buffer); snprintf (cmd_hdata, sizeof (cmd_hdata),
"buffer:0x%lx", (unsigned long)ptr_buffer);
relay_weechat_msg_add_hdata (msg, cmd_hdata, relay_weechat_msg_add_hdata (msg, cmd_hdata,
"id,number,full_name"); "id,number,full_name");
relay_weechat_msg_send (ptr_client, msg); relay_weechat_msg_send (ptr_client, msg);
+19 -7
View File
@@ -872,13 +872,15 @@ weechat_ruby_eval (struct t_gui_buffer *buffer, int send_to_buffer_as_input,
{ {
void *func_argv[1], *result; void *func_argv[1], *result;
char empty_arg[1] = { '\0' }; char empty_arg[1] = { '\0' };
int old_ruby_quiet;
if (!ruby_script_eval) if (!ruby_script_eval)
{ {
old_ruby_quiet = ruby_quiet;
ruby_quiet = 1; ruby_quiet = 1;
ruby_script_eval = weechat_ruby_load (WEECHAT_SCRIPT_EVAL_NAME, ruby_script_eval = weechat_ruby_load (WEECHAT_SCRIPT_EVAL_NAME,
RUBY_EVAL_SCRIPT); RUBY_EVAL_SCRIPT);
ruby_quiet = 0; ruby_quiet = old_ruby_quiet;
if (!ruby_script_eval) if (!ruby_script_eval)
return 0; return 0;
} }
@@ -907,9 +909,10 @@ weechat_ruby_eval (struct t_gui_buffer *buffer, int send_to_buffer_as_input,
if (!weechat_config_boolean (ruby_config_look_eval_keep_context)) if (!weechat_config_boolean (ruby_config_look_eval_keep_context))
{ {
old_ruby_quiet = ruby_quiet;
ruby_quiet = 1; ruby_quiet = 1;
weechat_ruby_unload (ruby_script_eval); weechat_ruby_unload (ruby_script_eval);
ruby_quiet = 0; ruby_quiet = old_ruby_quiet;
ruby_script_eval = NULL; ruby_script_eval = NULL;
} }
@@ -926,7 +929,7 @@ weechat_ruby_command_cb (const void *pointer, void *data,
int argc, char **argv, char **argv_eol) int argc, char **argv, char **argv_eol)
{ {
char *ptr_name, *ptr_code, *path_script; char *ptr_name, *ptr_code, *path_script;
int i, send_to_buffer_as_input, exec_commands; int i, send_to_buffer_as_input, exec_commands, old_ruby_quiet;
/* make C compiler happy */ /* make C compiler happy */
(void) pointer; (void) pointer;
@@ -985,6 +988,7 @@ weechat_ruby_command_cb (const void *pointer, void *data,
|| (weechat_strcmp (argv[1], "reload") == 0) || (weechat_strcmp (argv[1], "reload") == 0)
|| (weechat_strcmp (argv[1], "unload") == 0)) || (weechat_strcmp (argv[1], "unload") == 0))
{ {
old_ruby_quiet = ruby_quiet;
ptr_name = argv_eol[2]; ptr_name = argv_eol[2];
if (strncmp (ptr_name, "-q ", 3) == 0) if (strncmp (ptr_name, "-q ", 3) == 0)
{ {
@@ -1014,7 +1018,7 @@ weechat_ruby_command_cb (const void *pointer, void *data,
/* unload ruby script */ /* unload ruby script */
weechat_ruby_unload_name (ptr_name); weechat_ruby_unload_name (ptr_name);
} }
ruby_quiet = 0; ruby_quiet = old_ruby_quiet;
} }
else if (weechat_strcmp (argv[1], "eval") == 0) else if (weechat_strcmp (argv[1], "eval") == 0)
{ {
@@ -1260,8 +1264,9 @@ weechat_ruby_signal_script_action_cb (const void *pointer, void *data,
int int
weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
{ {
int ruby_error; int ruby_error, old_ruby_quiet;
VALUE err; VALUE err;
char* ruby_options_argv[] = { "ruby", "-enil", NULL };
char *weechat_ruby_code = { char *weechat_ruby_code = {
"$stdout = WeechatOutputs\n" "$stdout = WeechatOutputs\n"
"$stderr = WeechatOutputs\n" "$stderr = WeechatOutputs\n"
@@ -1360,6 +1365,8 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
ruby_init (); ruby_init ();
ruby_options (2, ruby_options_argv);
/* redirect stdin and stdout */ /* redirect stdin and stdout */
ruby_mWeechatOutputs = rb_define_module ("WeechatOutputs"); ruby_mWeechatOutputs = rb_define_module ("WeechatOutputs");
rb_define_singleton_method (ruby_mWeechatOutputs, "write", rb_define_singleton_method (ruby_mWeechatOutputs, "write",
@@ -1404,11 +1411,13 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
ruby_data.callback_signal_debug_dump = &weechat_ruby_signal_debug_dump_cb; ruby_data.callback_signal_debug_dump = &weechat_ruby_signal_debug_dump_cb;
ruby_data.callback_signal_script_action = &weechat_ruby_signal_script_action_cb; ruby_data.callback_signal_script_action = &weechat_ruby_signal_script_action_cb;
ruby_data.callback_load_file = &weechat_ruby_load_cb; ruby_data.callback_load_file = &weechat_ruby_load_cb;
ruby_data.init_before_autoload = NULL;
ruby_data.unload_all = &weechat_ruby_unload_all; ruby_data.unload_all = &weechat_ruby_unload_all;
old_ruby_quiet = ruby_quiet;
ruby_quiet = 1; ruby_quiet = 1;
plugin_script_init (weechat_ruby_plugin, &ruby_data); plugin_script_init (weechat_ruby_plugin, &ruby_data);
ruby_quiet = 0; ruby_quiet = old_ruby_quiet;
plugin_script_display_short_list (weechat_ruby_plugin, plugin_script_display_short_list (weechat_ruby_plugin,
ruby_scripts); ruby_scripts);
@@ -1424,7 +1433,10 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
int int
weechat_plugin_end (struct t_weechat_plugin *plugin) weechat_plugin_end (struct t_weechat_plugin *plugin)
{ {
int old_ruby_quiet;
/* unload all scripts */ /* unload all scripts */
old_ruby_quiet = ruby_quiet;
ruby_quiet = 1; ruby_quiet = 1;
if (ruby_script_eval) if (ruby_script_eval)
{ {
@@ -1432,7 +1444,7 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
ruby_script_eval = NULL; ruby_script_eval = NULL;
} }
plugin_script_end (plugin, &ruby_data); plugin_script_end (plugin, &ruby_data);
ruby_quiet = 0; ruby_quiet = old_ruby_quiet;
ruby_cleanup (0); ruby_cleanup (0);
signal (SIGCHLD, SIG_DFL); signal (SIGCHLD, SIG_DFL);
+6 -1
View File
@@ -125,6 +125,11 @@
Tcl_SetObjResult (interp, Tcl_NewLongObj (__long)); \ Tcl_SetObjResult (interp, Tcl_NewLongObj (__long)); \
return TCL_OK; \ return TCL_OK; \
} }
#define API_RETURN_LONGLONG(__longlong) \
{ \
Tcl_SetObjResult (interp, Tcl_NewWideIntObj (__longlong)); \
return TCL_OK; \
}
#define API_RETURN_OBJ(__obj) \ #define API_RETURN_OBJ(__obj) \
{ \ { \
Tcl_SetObjResult (interp, __obj); \ Tcl_SetObjResult (interp, __obj); \
@@ -5368,7 +5373,7 @@ API_FUNC(hdata_longlong)
API_STR2PTR(pointer), API_STR2PTR(pointer),
name); name);
API_RETURN_LONG(result); API_RETURN_LONGLONG(result);
} }
API_FUNC(hdata_string) API_FUNC(hdata_string)
+12 -4
View File
@@ -574,7 +574,7 @@ weechat_tcl_command_cb (const void *pointer, void *data,
int argc, char **argv, char **argv_eol) int argc, char **argv, char **argv_eol)
{ {
char *ptr_name, *ptr_code, *path_script; char *ptr_name, *ptr_code, *path_script;
int i, send_to_buffer_as_input, exec_commands; int i, send_to_buffer_as_input, exec_commands, old_tcl_quiet;
/* make C compiler happy */ /* make C compiler happy */
(void) pointer; (void) pointer;
@@ -633,6 +633,7 @@ weechat_tcl_command_cb (const void *pointer, void *data,
|| (weechat_strcmp (argv[1], "reload") == 0) || (weechat_strcmp (argv[1], "reload") == 0)
|| (weechat_strcmp (argv[1], "unload") == 0)) || (weechat_strcmp (argv[1], "unload") == 0))
{ {
old_tcl_quiet = tcl_quiet;
ptr_name = argv_eol[2]; ptr_name = argv_eol[2];
if (strncmp (ptr_name, "-q ", 3) == 0) if (strncmp (ptr_name, "-q ", 3) == 0)
{ {
@@ -662,7 +663,7 @@ weechat_tcl_command_cb (const void *pointer, void *data,
/* unload tcl script */ /* unload tcl script */
weechat_tcl_unload_name (ptr_name); weechat_tcl_unload_name (ptr_name);
} }
tcl_quiet = 0; tcl_quiet = old_tcl_quiet;
} }
else if (weechat_strcmp (argv[1], "eval") == 0) else if (weechat_strcmp (argv[1], "eval") == 0)
{ {
@@ -910,6 +911,8 @@ weechat_tcl_signal_script_action_cb (const void *pointer, void *data,
int int
weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
{ {
int old_tcl_quiet;
/* make C compiler happy */ /* make C compiler happy */
(void) argc; (void) argc;
(void) argv; (void) argv;
@@ -945,11 +948,13 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
tcl_data.callback_signal_debug_dump = &weechat_tcl_signal_debug_dump_cb; tcl_data.callback_signal_debug_dump = &weechat_tcl_signal_debug_dump_cb;
tcl_data.callback_signal_script_action = &weechat_tcl_signal_script_action_cb; tcl_data.callback_signal_script_action = &weechat_tcl_signal_script_action_cb;
tcl_data.callback_load_file = &weechat_tcl_load_cb; tcl_data.callback_load_file = &weechat_tcl_load_cb;
tcl_data.init_before_autoload = NULL;
tcl_data.unload_all = &weechat_tcl_unload_all; tcl_data.unload_all = &weechat_tcl_unload_all;
old_tcl_quiet = tcl_quiet;
tcl_quiet = 1; tcl_quiet = 1;
plugin_script_init (weechat_tcl_plugin, &tcl_data); plugin_script_init (weechat_tcl_plugin, &tcl_data);
tcl_quiet = 0; tcl_quiet = old_tcl_quiet;
plugin_script_display_short_list (weechat_tcl_plugin, plugin_script_display_short_list (weechat_tcl_plugin,
tcl_scripts); tcl_scripts);
@@ -965,7 +970,10 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
int int
weechat_plugin_end (struct t_weechat_plugin *plugin) weechat_plugin_end (struct t_weechat_plugin *plugin)
{ {
int old_tcl_quiet;
/* unload all scripts */ /* unload all scripts */
old_tcl_quiet = tcl_quiet;
tcl_quiet = 1; tcl_quiet = 1;
if (tcl_script_eval) if (tcl_script_eval)
{ {
@@ -973,7 +981,7 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
tcl_script_eval = NULL; tcl_script_eval = NULL;
} }
plugin_script_end (plugin, &tcl_data); plugin_script_end (plugin, &tcl_data);
tcl_quiet = 0; tcl_quiet = old_tcl_quiet;
/* free some data */ /* free some data */
if (tcl_action_install_list) if (tcl_action_install_list)
+4 -1
View File
@@ -733,7 +733,10 @@ trigger_callback_signal_cb (const void *pointer, void *data,
{ {
str_data[0] = '\0'; str_data[0] = '\0';
if (signal_data) if (signal_data)
snprintf (str_data, sizeof (str_data), "%p", signal_data); {
snprintf (str_data, sizeof (str_data),
"0x%lx", (unsigned long)signal_data);
}
ptr_signal_data = str_data; ptr_signal_data = str_data;
} }
weechat_hashtable_set (ctx.extra_vars, "tg_signal_data", ptr_signal_data); weechat_hashtable_set (ctx.extra_vars, "tg_signal_data", ptr_signal_data);
+1 -1
View File
@@ -34,7 +34,7 @@ set_target_properties(xfer PROPERTIES PREFIX "")
set(LINK_LIBS) set(LINK_LIBS)
list(APPEND LINK_LIBS ${GCRYPT_LDFLAGS}) list(APPEND LINK_LIBS ${LIBGCRYPT_LDFLAGS})
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
# link with resolv lib on macOS # link with resolv lib on macOS
+1
View File
@@ -380,6 +380,7 @@ xfer_chat_open_buffer (struct t_xfer *xfer)
weechat_buffer_set (xfer->buffer, "short_name", weechat_buffer_set (xfer->buffer, "short_name",
xfer->remote_nick); xfer->remote_nick);
} }
weechat_buffer_set (xfer->buffer, "input_prompt", xfer->local_nick);
weechat_buffer_set (xfer->buffer, "localvar_set_type", "private"); weechat_buffer_set (xfer->buffer, "localvar_set_type", "private");
weechat_buffer_set (xfer->buffer, "localvar_set_nick", xfer->local_nick); weechat_buffer_set (xfer->buffer, "localvar_set_nick", xfer->local_nick);
weechat_buffer_set (xfer->buffer, "localvar_set_channel", xfer->remote_nick); weechat_buffer_set (xfer->buffer, "localvar_set_channel", xfer->remote_nick);
+5
View File
@@ -22,6 +22,11 @@
extern void xfer_chat_sendf (struct t_xfer *xfer, const char *format, ...); extern void xfer_chat_sendf (struct t_xfer *xfer, const char *format, ...);
extern int xfer_chat_recv_cb (const void *pointer, void *data, int fd); extern int xfer_chat_recv_cb (const void *pointer, void *data, int fd);
extern int xfer_chat_buffer_input_cb (const void *pointer, void *data,
struct t_gui_buffer *buffer,
const char *input_data);
extern int xfer_chat_buffer_close_cb (const void *pointer, void *data,
struct t_gui_buffer *buffer);
extern void xfer_chat_open_buffer (struct t_xfer *xfer); extern void xfer_chat_open_buffer (struct t_xfer *xfer);
#endif /* WEECHAT_PLUGIN_XFER_CHAT_H */ #endif /* WEECHAT_PLUGIN_XFER_CHAT_H */
+14 -2
View File
@@ -26,6 +26,7 @@
#include "xfer.h" #include "xfer.h"
#include "xfer-upgrade.h" #include "xfer-upgrade.h"
#include "xfer-buffer.h" #include "xfer-buffer.h"
#include "xfer-chat.h"
/* /*
@@ -80,6 +81,7 @@ xfer_upgrade_set_buffer_callbacks ()
{ {
struct t_infolist *infolist; struct t_infolist *infolist;
struct t_gui_buffer *ptr_buffer; struct t_gui_buffer *ptr_buffer;
const char *type;
infolist = weechat_infolist_get ("buffer", NULL, NULL); infolist = weechat_infolist_get ("buffer", NULL, NULL);
if (infolist) if (infolist)
@@ -89,12 +91,22 @@ xfer_upgrade_set_buffer_callbacks ()
if (weechat_infolist_pointer (infolist, "plugin") == weechat_xfer_plugin) if (weechat_infolist_pointer (infolist, "plugin") == weechat_xfer_plugin)
{ {
ptr_buffer = weechat_infolist_pointer (infolist, "pointer"); ptr_buffer = weechat_infolist_pointer (infolist, "pointer");
weechat_buffer_set_pointer (ptr_buffer, "close_callback", &xfer_buffer_close_cb); type = weechat_buffer_get_string (ptr_buffer, "localvar_type");
weechat_buffer_set_pointer (ptr_buffer, "input_callback", &xfer_buffer_input_cb);
if (strcmp (weechat_infolist_string (infolist, "name"), if (strcmp (weechat_infolist_string (infolist, "name"),
XFER_BUFFER_NAME) == 0) XFER_BUFFER_NAME) == 0)
{ {
xfer_buffer = ptr_buffer; xfer_buffer = ptr_buffer;
weechat_buffer_set_pointer (
ptr_buffer, "close_callback", &xfer_buffer_close_cb);
weechat_buffer_set_pointer (
ptr_buffer, "input_callback", &xfer_buffer_input_cb);
}
else if (type && (strcmp (type, "private") == 0))
{
weechat_buffer_set_pointer (
ptr_buffer, "close_callback", &xfer_chat_buffer_close_cb);
weechat_buffer_set_pointer (
ptr_buffer, "input_callback", &xfer_chat_buffer_input_cb);
} }
} }
} }
+5 -1
View File
@@ -22,6 +22,10 @@ enable_language(CXX)
remove_definitions(-DHAVE_CONFIG_H) remove_definitions(-DHAVE_CONFIG_H)
include_directories(${CPPUTEST_INCLUDE_DIRS} ${PROJECT_BINARY_DIR} ${PROJECT_SOURCE_DIR}) include_directories(${CPPUTEST_INCLUDE_DIRS} ${PROJECT_BINARY_DIR} ${PROJECT_SOURCE_DIR})
if(NOT CYGWIN)
add_definitions(-fPIC)
endif()
if(ENABLE_PYTHON) if(ENABLE_PYTHON)
add_definitions(-DHAVE_PYTHON) add_definitions(-DHAVE_PYTHON)
endif() endif()
@@ -196,7 +200,7 @@ if(ICONV_LIBRARY)
list(APPEND EXTRA_LIBS ${ICONV_LIBRARY}) list(APPEND EXTRA_LIBS ${ICONV_LIBRARY})
endif() endif()
if(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") if(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD" OR ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD")
list(APPEND EXTRA_LIBS "intl") list(APPEND EXTRA_LIBS "intl")
if(HAVE_BACKTRACE) if(HAVE_BACKTRACE)
list(APPEND EXTRA_LIBS "execinfo") list(APPEND EXTRA_LIBS "execinfo")
+1 -1
View File
@@ -153,7 +153,7 @@ TEST(Scripts, API)
#ifdef HAVE_JAVASCRIPT #ifdef HAVE_JAVASCRIPT
{ "javascript", "js" }, { "javascript", "js" },
#endif #endif
#ifdef HAVE_PYTHON #ifdef HAVE_PHP
{ "php", "php" }, { "php", "php" },
#endif #endif
{ NULL, NULL } { NULL, NULL }
+3
View File
@@ -1016,6 +1016,9 @@ TEST(CoreEval, EvalExpression)
WEE_CHECK_EVAL("", "${my_null_pointer}"); WEE_CHECK_EVAL("", "${my_null_pointer}");
snprintf (str_value, sizeof (str_value), "%p", gui_buffers); snprintf (str_value, sizeof (str_value), "%p", gui_buffers);
WEE_CHECK_EVAL(str_value, "${my_buffer_pointer}"); WEE_CHECK_EVAL(str_value, "${my_buffer_pointer}");
WEE_CHECK_EVAL(str_value, "${buffer}");
WEE_CHECK_EVAL("0x0", "${buffer.prev_buffer}");
WEE_CHECK_EVAL("0x0", "${buffer.next_buffer}");
WEE_CHECK_EVAL("0x1234abcd", "${my_other_pointer}"); WEE_CHECK_EVAL("0x1234abcd", "${my_other_pointer}");
WEE_CHECK_EVAL("", "${buffer[unknown_pointer].full_name}"); WEE_CHECK_EVAL("", "${buffer[unknown_pointer].full_name}");
WEE_CHECK_EVAL("", "${buffer[my_null_pointer].full_name}"); WEE_CHECK_EVAL("", "${buffer[my_null_pointer].full_name}");
@@ -25,6 +25,7 @@
extern "C" extern "C"
{ {
#include <string.h>
#include <cjson/cJSON.h> #include <cjson/cJSON.h>
#include "src/core/core-config-file.h" #include "src/core/core-config-file.h"
#include "src/plugins/relay/relay.h" #include "src/plugins/relay/relay.h"
@@ -26,6 +26,7 @@ extern "C"
#include <time.h> #include <time.h>
#include <sys/time.h> #include <sys/time.h>
#include <cjson/cJSON.h> #include <cjson/cJSON.h>
#include "src/core/core-hdata.h"
#include "src/core/core-util.h" #include "src/core/core-util.h"
#include "src/gui/gui-buffer.h" #include "src/gui/gui-buffer.h"
#include "src/gui/gui-chat.h" #include "src/gui/gui-chat.h"
@@ -502,6 +503,7 @@ TEST(RelayApiMsg, HotlistToJson)
{ {
char str_date[128]; char str_date[128];
cJSON *json, *json_obj, *json_count; cJSON *json, *json_obj, *json_count;
time_t time_value;
struct timeval tv; struct timeval tv;
struct tm gm_time; struct tm gm_time;
@@ -526,9 +528,10 @@ TEST(RelayApiMsg, HotlistToJson)
CHECK(json); CHECK(json);
CHECK(cJSON_IsObject (json)); CHECK(cJSON_IsObject (json));
WEE_CHECK_OBJ_NUM(GUI_HOTLIST_HIGHLIGHT, json, "priority"); WEE_CHECK_OBJ_NUM(GUI_HOTLIST_HIGHLIGHT, json, "priority");
gmtime_r (&(gui_hotlist->creation_time.tv_sec), &gm_time); time_value = hdata_time (relay_hdata_hotlist, gui_hotlist, "time");
gmtime_r (&time_value, &gm_time);
tv.tv_sec = mktime (&gm_time); tv.tv_sec = mktime (&gm_time);
tv.tv_usec = gui_hotlist->creation_time.tv_usec; tv.tv_usec = hdata_integer (relay_hdata_hotlist, gui_hotlist, "time_usec");
util_strftimeval (str_date, sizeof (str_date), "%FT%T.%fZ", &tv); util_strftimeval (str_date, sizeof (str_date), "%FT%T.%fZ", &tv);
WEE_CHECK_OBJ_STR(str_date, json, "date"); WEE_CHECK_OBJ_STR(str_date, json, "date");
WEE_CHECK_OBJ_NUM(gui_buffers->id, json, "buffer_id"); WEE_CHECK_OBJ_NUM(gui_buffers->id, json, "buffer_id");
+17 -15
View File
@@ -47,7 +47,8 @@ extern void relay_http_parse_path (const char *url,
char ***paths, int *num_paths, char ***paths, int *num_paths,
struct t_hashtable *params); struct t_hashtable *params);
extern int relay_http_parse_header (struct t_relay_http_request *request, extern int relay_http_parse_header (struct t_relay_http_request *request,
const char *header); const char *header,
int ws_deflate_allowed);
extern void relay_http_add_to_body (struct t_relay_http_request *request, extern void relay_http_add_to_body (struct t_relay_http_request *request,
char **partial_message); char **partial_message);
extern int relay_http_get_auth_status (struct t_relay_client *client); extern int relay_http_get_auth_status (struct t_relay_client *client);
@@ -103,7 +104,7 @@ TEST(RelayHttp, RequestAllocReinitFree)
CHECK(request->ws_deflate); CHECK(request->ws_deflate);
LONGS_EQUAL(0, request->ws_deflate->enabled); LONGS_EQUAL(0, request->ws_deflate->enabled);
LONGS_EQUAL(0, request->ws_deflate->server_context_takeover); LONGS_EQUAL(0, request->ws_deflate->server_context_takeover);
LONGS_EQUAL(0, request->ws_deflate->server_context_takeover); LONGS_EQUAL(0, request->ws_deflate->client_context_takeover);
LONGS_EQUAL(0, request->ws_deflate->window_bits_deflate); LONGS_EQUAL(0, request->ws_deflate->window_bits_deflate);
LONGS_EQUAL(0, request->ws_deflate->window_bits_inflate); LONGS_EQUAL(0, request->ws_deflate->window_bits_inflate);
POINTERS_EQUAL(NULL, request->ws_deflate->strm_deflate); POINTERS_EQUAL(NULL, request->ws_deflate->strm_deflate);
@@ -146,7 +147,7 @@ TEST(RelayHttp, RequestAllocReinitFree)
CHECK(request->ws_deflate); CHECK(request->ws_deflate);
LONGS_EQUAL(0, request->ws_deflate->enabled); LONGS_EQUAL(0, request->ws_deflate->enabled);
LONGS_EQUAL(0, request->ws_deflate->server_context_takeover); LONGS_EQUAL(0, request->ws_deflate->server_context_takeover);
LONGS_EQUAL(0, request->ws_deflate->server_context_takeover); LONGS_EQUAL(0, request->ws_deflate->client_context_takeover);
LONGS_EQUAL(0, request->ws_deflate->window_bits_deflate); LONGS_EQUAL(0, request->ws_deflate->window_bits_deflate);
LONGS_EQUAL(0, request->ws_deflate->window_bits_inflate); LONGS_EQUAL(0, request->ws_deflate->window_bits_inflate);
POINTERS_EQUAL(NULL, request->ws_deflate->strm_deflate); POINTERS_EQUAL(NULL, request->ws_deflate->strm_deflate);
@@ -478,7 +479,7 @@ TEST(RelayHttp, ParseHeader)
request = relay_http_request_alloc (); request = relay_http_request_alloc ();
CHECK(request); CHECK(request);
relay_http_parse_method_path (request, "GET /api/version"); relay_http_parse_method_path (request, "GET /api/version");
relay_http_parse_header (request, NULL); relay_http_parse_header (request, NULL, 1);
LONGS_EQUAL(RELAY_HTTP_END, request->status); LONGS_EQUAL(RELAY_HTTP_END, request->status);
STRCMP_EQUAL("GET /api/version\n" STRCMP_EQUAL("GET /api/version\n"
"\n", "\n",
@@ -489,7 +490,7 @@ TEST(RelayHttp, ParseHeader)
request = relay_http_request_alloc (); request = relay_http_request_alloc ();
CHECK(request); CHECK(request);
relay_http_parse_method_path (request, "GET /api/version"); relay_http_parse_method_path (request, "GET /api/version");
relay_http_parse_header (request, ""); relay_http_parse_header (request, "", 1);
LONGS_EQUAL(RELAY_HTTP_END, request->status); LONGS_EQUAL(RELAY_HTTP_END, request->status);
STRCMP_EQUAL("GET /api/version\n" STRCMP_EQUAL("GET /api/version\n"
"\n", "\n",
@@ -500,7 +501,7 @@ TEST(RelayHttp, ParseHeader)
request = relay_http_request_alloc (); request = relay_http_request_alloc ();
CHECK(request); CHECK(request);
relay_http_parse_method_path (request, "GET /api/version"); relay_http_parse_method_path (request, "GET /api/version");
relay_http_parse_header (request, "Test"); relay_http_parse_header (request, "Test", 1);
LONGS_EQUAL(RELAY_HTTP_HEADERS, request->status); LONGS_EQUAL(RELAY_HTTP_HEADERS, request->status);
STRCMP_EQUAL("GET /api/version\n" STRCMP_EQUAL("GET /api/version\n"
"Test\n", "Test\n",
@@ -511,7 +512,7 @@ TEST(RelayHttp, ParseHeader)
request = relay_http_request_alloc (); request = relay_http_request_alloc ();
CHECK(request); CHECK(request);
relay_http_parse_method_path (request, "GET /api/version"); relay_http_parse_method_path (request, "GET /api/version");
relay_http_parse_header (request, "X-Test: value"); relay_http_parse_header (request, "X-Test: value", 1);
LONGS_EQUAL(RELAY_HTTP_HEADERS, request->status); LONGS_EQUAL(RELAY_HTTP_HEADERS, request->status);
STRCMP_EQUAL("GET /api/version\n" STRCMP_EQUAL("GET /api/version\n"
"X-Test: value\n", "X-Test: value\n",
@@ -523,7 +524,7 @@ TEST(RelayHttp, ParseHeader)
request = relay_http_request_alloc (); request = relay_http_request_alloc ();
CHECK(request); CHECK(request);
relay_http_parse_method_path (request, "GET /api/version"); relay_http_parse_method_path (request, "GET /api/version");
relay_http_parse_header (request, "Accept-Encoding: gzip, zstd, br"); relay_http_parse_header (request, "Accept-Encoding: gzip, zstd, br", 1);
LONGS_EQUAL(RELAY_HTTP_HEADERS, request->status); LONGS_EQUAL(RELAY_HTTP_HEADERS, request->status);
STRCMP_EQUAL("GET /api/version\n" STRCMP_EQUAL("GET /api/version\n"
"Accept-Encoding: gzip, zstd, br\n", "Accept-Encoding: gzip, zstd, br\n",
@@ -540,7 +541,7 @@ TEST(RelayHttp, ParseHeader)
request = relay_http_request_alloc (); request = relay_http_request_alloc ();
CHECK(request); CHECK(request);
relay_http_parse_method_path (request, "GET /api/version"); relay_http_parse_method_path (request, "GET /api/version");
relay_http_parse_header (request, "Content-Length: 123"); relay_http_parse_header (request, "Content-Length: 123", 1);
LONGS_EQUAL(RELAY_HTTP_HEADERS, request->status); LONGS_EQUAL(RELAY_HTTP_HEADERS, request->status);
STRCMP_EQUAL("GET /api/version\n" STRCMP_EQUAL("GET /api/version\n"
"Content-Length: 123\n", "Content-Length: 123\n",
@@ -555,7 +556,8 @@ TEST(RelayHttp, ParseHeader)
relay_http_parse_method_path (request, "GET /api HTTP/1.1"); relay_http_parse_method_path (request, "GET /api HTTP/1.1");
relay_http_parse_header ( relay_http_parse_header (
request, request,
"Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits"); "Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits",
1);
LONGS_EQUAL(RELAY_HTTP_HEADERS, request->status); LONGS_EQUAL(RELAY_HTTP_HEADERS, request->status);
STRCMP_EQUAL( STRCMP_EQUAL(
"GET /api HTTP/1.1\n" "GET /api HTTP/1.1\n"
@@ -565,7 +567,7 @@ TEST(RelayHttp, ParseHeader)
CHECK(request->ws_deflate); CHECK(request->ws_deflate);
LONGS_EQUAL(1, request->ws_deflate->enabled); LONGS_EQUAL(1, request->ws_deflate->enabled);
LONGS_EQUAL(1, request->ws_deflate->server_context_takeover); LONGS_EQUAL(1, request->ws_deflate->server_context_takeover);
LONGS_EQUAL(1, request->ws_deflate->server_context_takeover); LONGS_EQUAL(1, request->ws_deflate->client_context_takeover);
LONGS_EQUAL(15, request->ws_deflate->window_bits_deflate); LONGS_EQUAL(15, request->ws_deflate->window_bits_deflate);
LONGS_EQUAL(15, request->ws_deflate->window_bits_inflate); LONGS_EQUAL(15, request->ws_deflate->window_bits_inflate);
POINTERS_EQUAL(NULL, request->ws_deflate->strm_deflate); POINTERS_EQUAL(NULL, request->ws_deflate->strm_deflate);
@@ -589,8 +591,8 @@ TEST(RelayHttp, AddToBody)
LONGS_EQUAL(RELAY_HTTP_METHOD, request->status); LONGS_EQUAL(RELAY_HTTP_METHOD, request->status);
relay_http_parse_method_path (request, "GET /api/version"); relay_http_parse_method_path (request, "GET /api/version");
LONGS_EQUAL(RELAY_HTTP_HEADERS, request->status); LONGS_EQUAL(RELAY_HTTP_HEADERS, request->status);
relay_http_parse_header (request, "Content-Length: 10"); relay_http_parse_header (request, "Content-Length: 10", 1);
relay_http_parse_header (request, ""); relay_http_parse_header (request, "", 1);
LONGS_EQUAL(RELAY_HTTP_BODY, request->status); LONGS_EQUAL(RELAY_HTTP_BODY, request->status);
LONGS_EQUAL(10, request->content_length); LONGS_EQUAL(10, request->content_length);
LONGS_EQUAL(0, request->body_size); LONGS_EQUAL(0, request->body_size);
@@ -616,8 +618,8 @@ TEST(RelayHttp, AddToBody)
LONGS_EQUAL(RELAY_HTTP_METHOD, request->status); LONGS_EQUAL(RELAY_HTTP_METHOD, request->status);
relay_http_parse_method_path (request, "GET /api/version"); relay_http_parse_method_path (request, "GET /api/version");
LONGS_EQUAL(RELAY_HTTP_HEADERS, request->status); LONGS_EQUAL(RELAY_HTTP_HEADERS, request->status);
relay_http_parse_header (request, "Content-Length: 5"); relay_http_parse_header (request, "Content-Length: 5", 1);
relay_http_parse_header (request, ""); relay_http_parse_header (request, "", 1);
LONGS_EQUAL(RELAY_HTTP_BODY, request->status); LONGS_EQUAL(RELAY_HTTP_BODY, request->status);
LONGS_EQUAL(5, request->content_length); LONGS_EQUAL(5, request->content_length);
LONGS_EQUAL(0, request->body_size); LONGS_EQUAL(0, request->body_size);
@@ -62,9 +62,11 @@ TEST(RelayWebsocket, DeflateAllocFree)
ws_deflate = relay_websocket_deflate_alloc (); ws_deflate = relay_websocket_deflate_alloc ();
LONGS_EQUAL(0, ws_deflate->enabled); LONGS_EQUAL(0, ws_deflate->enabled);
LONGS_EQUAL(0, ws_deflate->server_context_takeover); LONGS_EQUAL(0, ws_deflate->server_context_takeover);
LONGS_EQUAL(0, ws_deflate->server_context_takeover); LONGS_EQUAL(0, ws_deflate->client_context_takeover);
LONGS_EQUAL(0, ws_deflate->window_bits_deflate); LONGS_EQUAL(0, ws_deflate->window_bits_deflate);
LONGS_EQUAL(0, ws_deflate->window_bits_inflate); LONGS_EQUAL(0, ws_deflate->window_bits_inflate);
LONGS_EQUAL(0, ws_deflate->server_max_window_bits_recv);
LONGS_EQUAL(0, ws_deflate->client_max_window_bits_recv);
POINTERS_EQUAL(NULL, ws_deflate->strm_deflate); POINTERS_EQUAL(NULL, ws_deflate->strm_deflate);
POINTERS_EQUAL(NULL, ws_deflate->strm_inflate); POINTERS_EQUAL(NULL, ws_deflate->strm_inflate);
@@ -163,34 +165,80 @@ TEST(RelayWebsocket, ClientHandshakeValid)
LONGS_EQUAL(-2, relay_websocket_client_handshake_valid (request)); LONGS_EQUAL(-2, relay_websocket_client_handshake_valid (request));
hashtable_set (request->headers, "origin", "example.com"); hashtable_set (request->headers, "origin", "example.com");
LONGS_EQUAL(0, relay_websocket_client_handshake_valid (request)); LONGS_EQUAL(0, relay_websocket_client_handshake_valid (request));
config_file_option_reset (relay_config_network_websocket_allowed_origins, 1);
relay_websocket_deflate_reinit (request->ws_deflate);
relay_websocket_parse_extensions ("permessage-deflate", request->ws_deflate, 1);
LONGS_EQUAL(1, request->ws_deflate->enabled);
LONGS_EQUAL(1, request->ws_deflate->server_context_takeover);
LONGS_EQUAL(1, request->ws_deflate->client_context_takeover);
LONGS_EQUAL(15, request->ws_deflate->window_bits_deflate);
LONGS_EQUAL(15, request->ws_deflate->window_bits_inflate);
LONGS_EQUAL(0, request->ws_deflate->server_max_window_bits_recv);
LONGS_EQUAL(0, request->ws_deflate->client_max_window_bits_recv);
WEE_TEST_STR(
"HTTP/1.1 101 Switching Protocols\r\n"
"Upgrade: websocket\r\n"
"Connection: Upgrade\r\n"
"Sec-WebSocket-Accept: fhLJYtv//ugX2vQXpifQgByRZ5Y=\r\n"
"Sec-WebSocket-Extensions: permessage-deflate\r\n"
"\r\n",
relay_websocket_build_handshake (request));
relay_websocket_deflate_reinit (request->ws_deflate);
relay_websocket_parse_extensions ( relay_websocket_parse_extensions (
"permessage-deflate; client_max_window_bits", "permessage-deflate; client_max_window_bits",
request->ws_deflate); request->ws_deflate,
1);
LONGS_EQUAL(1, request->ws_deflate->enabled);
LONGS_EQUAL(1, request->ws_deflate->server_context_takeover);
LONGS_EQUAL(1, request->ws_deflate->client_context_takeover);
LONGS_EQUAL(15, request->ws_deflate->window_bits_deflate);
LONGS_EQUAL(15, request->ws_deflate->window_bits_inflate);
LONGS_EQUAL(0, request->ws_deflate->server_max_window_bits_recv);
LONGS_EQUAL(1, request->ws_deflate->client_max_window_bits_recv);
WEE_TEST_STR( WEE_TEST_STR(
"HTTP/1.1 101 Switching Protocols\r\n" "HTTP/1.1 101 Switching Protocols\r\n"
"Upgrade: websocket\r\n" "Upgrade: websocket\r\n"
"Connection: Upgrade\r\n" "Connection: Upgrade\r\n"
"Sec-WebSocket-Accept: fhLJYtv//ugX2vQXpifQgByRZ5Y=\r\n" "Sec-WebSocket-Accept: fhLJYtv//ugX2vQXpifQgByRZ5Y=\r\n"
"Sec-WebSocket-Extensions: permessage-deflate; server_max_window_bits=15; client_max_window_bits=15\r\n" "Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits=15\r\n"
"\r\n", "\r\n",
relay_websocket_build_handshake (request)); relay_websocket_build_handshake (request));
relay_websocket_deflate_reinit (request->ws_deflate);
relay_websocket_parse_extensions ( relay_websocket_parse_extensions (
"permessage-deflate; client_max_window_bits = 12; server_no_context_takeover", "permessage-deflate; client_max_window_bits = 12; server_no_context_takeover",
request->ws_deflate); request->ws_deflate,
1);
LONGS_EQUAL(1, request->ws_deflate->enabled);
LONGS_EQUAL(0, request->ws_deflate->server_context_takeover);
LONGS_EQUAL(1, request->ws_deflate->client_context_takeover);
LONGS_EQUAL(15, request->ws_deflate->window_bits_deflate);
LONGS_EQUAL(12, request->ws_deflate->window_bits_inflate);
LONGS_EQUAL(0, request->ws_deflate->server_max_window_bits_recv);
LONGS_EQUAL(1, request->ws_deflate->client_max_window_bits_recv);
WEE_TEST_STR( WEE_TEST_STR(
"HTTP/1.1 101 Switching Protocols\r\n" "HTTP/1.1 101 Switching Protocols\r\n"
"Upgrade: websocket\r\n" "Upgrade: websocket\r\n"
"Connection: Upgrade\r\n" "Connection: Upgrade\r\n"
"Sec-WebSocket-Accept: fhLJYtv//ugX2vQXpifQgByRZ5Y=\r\n" "Sec-WebSocket-Accept: fhLJYtv//ugX2vQXpifQgByRZ5Y=\r\n"
"Sec-WebSocket-Extensions: permessage-deflate; server_no_context_takeover; server_max_window_bits=15; client_max_window_bits=12\r\n" "Sec-WebSocket-Extensions: permessage-deflate; server_no_context_takeover; client_max_window_bits=12\r\n"
"\r\n", "\r\n",
relay_websocket_build_handshake (request)); relay_websocket_build_handshake (request));
relay_websocket_deflate_reinit (request->ws_deflate);
relay_websocket_parse_extensions ( relay_websocket_parse_extensions (
"permessage-deflate; client_max_window_bits = 12; server_max_window_bits=8; client_no_context_takeover; server_no_context_takeover", "permessage-deflate; client_max_window_bits = 12; server_max_window_bits=8; client_no_context_takeover; server_no_context_takeover",
request->ws_deflate); request->ws_deflate,
1);
LONGS_EQUAL(1, request->ws_deflate->enabled);
LONGS_EQUAL(0, request->ws_deflate->server_context_takeover);
LONGS_EQUAL(0, request->ws_deflate->client_context_takeover);
LONGS_EQUAL(8, request->ws_deflate->window_bits_deflate);
LONGS_EQUAL(12, request->ws_deflate->window_bits_inflate);
LONGS_EQUAL(1, request->ws_deflate->server_max_window_bits_recv);
LONGS_EQUAL(1, request->ws_deflate->client_max_window_bits_recv);
WEE_TEST_STR( WEE_TEST_STR(
"HTTP/1.1 101 Switching Protocols\r\n" "HTTP/1.1 101 Switching Protocols\r\n"
"Upgrade: websocket\r\n" "Upgrade: websocket\r\n"
@@ -212,16 +260,26 @@ TEST(RelayWebsocket, ParseExtensions)
{ {
struct t_relay_websocket_deflate ws_deflate; struct t_relay_websocket_deflate ws_deflate;
relay_websocket_parse_extensions (NULL, NULL); relay_websocket_parse_extensions (NULL, NULL, 1);
relay_websocket_parse_extensions ("test", NULL); relay_websocket_parse_extensions ("test", NULL, 1);
relay_websocket_parse_extensions (NULL, &ws_deflate); relay_websocket_parse_extensions (NULL, &ws_deflate, 1);
memset (&ws_deflate, 0, sizeof (ws_deflate)); memset (&ws_deflate, 0, sizeof (ws_deflate));
relay_websocket_parse_extensions ("test", &ws_deflate); relay_websocket_parse_extensions ("test", &ws_deflate, 1);
LONGS_EQUAL(0, ws_deflate.enabled); LONGS_EQUAL(0, ws_deflate.enabled);
memset (&ws_deflate, 0, sizeof (ws_deflate)); memset (&ws_deflate, 0, sizeof (ws_deflate));
relay_websocket_parse_extensions ("permessage-deflate", &ws_deflate); relay_websocket_parse_extensions ("permessage-deflate", &ws_deflate, 0);
LONGS_EQUAL(0, ws_deflate.enabled);
LONGS_EQUAL(0, ws_deflate.server_context_takeover);
LONGS_EQUAL(0, ws_deflate.client_context_takeover);
LONGS_EQUAL(0, ws_deflate.window_bits_deflate);
LONGS_EQUAL(0, ws_deflate.window_bits_inflate);
POINTERS_EQUAL(NULL, ws_deflate.strm_deflate);
POINTERS_EQUAL(NULL, ws_deflate.strm_inflate);
memset (&ws_deflate, 0, sizeof (ws_deflate));
relay_websocket_parse_extensions ("permessage-deflate", &ws_deflate, 1);
LONGS_EQUAL(1, ws_deflate.enabled); LONGS_EQUAL(1, ws_deflate.enabled);
LONGS_EQUAL(1, ws_deflate.server_context_takeover); LONGS_EQUAL(1, ws_deflate.server_context_takeover);
LONGS_EQUAL(1, ws_deflate.client_context_takeover); LONGS_EQUAL(1, ws_deflate.client_context_takeover);
@@ -232,7 +290,8 @@ TEST(RelayWebsocket, ParseExtensions)
memset (&ws_deflate, 0, sizeof (ws_deflate)); memset (&ws_deflate, 0, sizeof (ws_deflate));
relay_websocket_parse_extensions ("permessage-deflate; client_max_window_bits", relay_websocket_parse_extensions ("permessage-deflate; client_max_window_bits",
&ws_deflate); &ws_deflate,
1);
LONGS_EQUAL(1, ws_deflate.enabled); LONGS_EQUAL(1, ws_deflate.enabled);
LONGS_EQUAL(1, ws_deflate.server_context_takeover); LONGS_EQUAL(1, ws_deflate.server_context_takeover);
LONGS_EQUAL(1, ws_deflate.client_context_takeover); LONGS_EQUAL(1, ws_deflate.client_context_takeover);
@@ -245,7 +304,8 @@ TEST(RelayWebsocket, ParseExtensions)
memset (&ws_deflate, 0, sizeof (ws_deflate)); memset (&ws_deflate, 0, sizeof (ws_deflate));
relay_websocket_parse_extensions ( relay_websocket_parse_extensions (
"permessage-deflate; client_max_window_bits=4", "permessage-deflate; client_max_window_bits=4",
&ws_deflate); &ws_deflate,
1);
LONGS_EQUAL(1, ws_deflate.enabled); LONGS_EQUAL(1, ws_deflate.enabled);
LONGS_EQUAL(1, ws_deflate.server_context_takeover); LONGS_EQUAL(1, ws_deflate.server_context_takeover);
LONGS_EQUAL(1, ws_deflate.client_context_takeover); LONGS_EQUAL(1, ws_deflate.client_context_takeover);
@@ -258,7 +318,8 @@ TEST(RelayWebsocket, ParseExtensions)
memset (&ws_deflate, 0, sizeof (ws_deflate)); memset (&ws_deflate, 0, sizeof (ws_deflate));
relay_websocket_parse_extensions ( relay_websocket_parse_extensions (
"permessage-deflate; client_max_window_bits=30", "permessage-deflate; client_max_window_bits=30",
&ws_deflate); &ws_deflate,
1);
LONGS_EQUAL(1, ws_deflate.enabled); LONGS_EQUAL(1, ws_deflate.enabled);
LONGS_EQUAL(1, ws_deflate.server_context_takeover); LONGS_EQUAL(1, ws_deflate.server_context_takeover);
LONGS_EQUAL(1, ws_deflate.client_context_takeover); LONGS_EQUAL(1, ws_deflate.client_context_takeover);
@@ -271,7 +332,8 @@ TEST(RelayWebsocket, ParseExtensions)
memset (&ws_deflate, 0, sizeof (ws_deflate)); memset (&ws_deflate, 0, sizeof (ws_deflate));
relay_websocket_parse_extensions ( relay_websocket_parse_extensions (
"permessage-deflate; client_max_window_bits=test", "permessage-deflate; client_max_window_bits=test",
&ws_deflate); &ws_deflate,
1);
LONGS_EQUAL(1, ws_deflate.enabled); LONGS_EQUAL(1, ws_deflate.enabled);
LONGS_EQUAL(1, ws_deflate.server_context_takeover); LONGS_EQUAL(1, ws_deflate.server_context_takeover);
LONGS_EQUAL(1, ws_deflate.client_context_takeover); LONGS_EQUAL(1, ws_deflate.client_context_takeover);
@@ -283,7 +345,8 @@ TEST(RelayWebsocket, ParseExtensions)
memset (&ws_deflate, 0, sizeof (ws_deflate)); memset (&ws_deflate, 0, sizeof (ws_deflate));
relay_websocket_parse_extensions ( relay_websocket_parse_extensions (
"permessage-deflate; client_max_window_bits=9", "permessage-deflate; client_max_window_bits=9",
&ws_deflate); &ws_deflate,
1);
LONGS_EQUAL(1, ws_deflate.enabled); LONGS_EQUAL(1, ws_deflate.enabled);
LONGS_EQUAL(1, ws_deflate.server_context_takeover); LONGS_EQUAL(1, ws_deflate.server_context_takeover);
LONGS_EQUAL(1, ws_deflate.client_context_takeover); LONGS_EQUAL(1, ws_deflate.client_context_takeover);
@@ -295,7 +358,8 @@ TEST(RelayWebsocket, ParseExtensions)
memset (&ws_deflate, 0, sizeof (ws_deflate)); memset (&ws_deflate, 0, sizeof (ws_deflate));
relay_websocket_parse_extensions ( relay_websocket_parse_extensions (
"permessage-deflate; client_max_window_bits=9; server_max_window_bits=10", "permessage-deflate; client_max_window_bits=9; server_max_window_bits=10",
&ws_deflate); &ws_deflate,
1);
LONGS_EQUAL(1, ws_deflate.enabled); LONGS_EQUAL(1, ws_deflate.enabled);
LONGS_EQUAL(1, ws_deflate.server_context_takeover); LONGS_EQUAL(1, ws_deflate.server_context_takeover);
LONGS_EQUAL(1, ws_deflate.client_context_takeover); LONGS_EQUAL(1, ws_deflate.client_context_takeover);
@@ -308,7 +372,8 @@ TEST(RelayWebsocket, ParseExtensions)
relay_websocket_parse_extensions ( relay_websocket_parse_extensions (
"permessage-deflate; client_max_window_bits=9; server_max_window_bits=10; " "permessage-deflate; client_max_window_bits=9; server_max_window_bits=10; "
"server_no_context_takeover", "server_no_context_takeover",
&ws_deflate); &ws_deflate,
1);
LONGS_EQUAL(1, ws_deflate.enabled); LONGS_EQUAL(1, ws_deflate.enabled);
LONGS_EQUAL(0, ws_deflate.server_context_takeover); LONGS_EQUAL(0, ws_deflate.server_context_takeover);
LONGS_EQUAL(1, ws_deflate.client_context_takeover); LONGS_EQUAL(1, ws_deflate.client_context_takeover);
@@ -321,7 +386,8 @@ TEST(RelayWebsocket, ParseExtensions)
relay_websocket_parse_extensions ( relay_websocket_parse_extensions (
"permessage-deflate; client_max_window_bits=9; server_max_window_bits=10; " "permessage-deflate; client_max_window_bits=9; server_max_window_bits=10; "
"server_no_context_takeover; client_no_context_takeover", "server_no_context_takeover; client_no_context_takeover",
&ws_deflate); &ws_deflate,
1);
LONGS_EQUAL(1, ws_deflate.enabled); LONGS_EQUAL(1, ws_deflate.enabled);
LONGS_EQUAL(0, ws_deflate.server_context_takeover); LONGS_EQUAL(0, ws_deflate.server_context_takeover);
LONGS_EQUAL(0, ws_deflate.client_context_takeover); LONGS_EQUAL(0, ws_deflate.client_context_takeover);
@@ -1,50 +0,0 @@
diff --git a/debian-devel/control b/debian-devel/control
index a5d24b6a8..edae1ec5e 100644
--- a/debian-devel/control
+++ b/debian-devel/control
@@ -14,7 +14,7 @@ Build-Depends:
libaspell-dev,
liblua5.3-dev,
tcl8.6-dev,
- guile-3.0-dev,
+ guile-2.2-dev,
php-dev, libphp-embed, libargon2-dev, libsodium-dev,
libxml2-dev,
libcurl4-gnutls-dev,
diff --git a/debian-devel/rules b/debian-devel/rules
index cab713c93..d2756333b 100755
--- a/debian-devel/rules
+++ b/debian-devel/rules
@@ -8,6 +8,7 @@ override_dh_auto_configure:
dh_auto_configure --buildsystem=cmake -- \
-DCMAKE_INSTALL_PREFIX:FILEPATH=/usr \
-DLIBDIR=/usr/lib/${DEB_HOST_MULTIARCH} \
+ -DENABLE_CJSON:BOOL=OFF \
-DENABLE_DOC:BOOL=ON \
-DENABLE_MAN:BOOL=ON \
-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \
diff --git a/debian-stable/control b/debian-stable/control
index a75e6fee5..50c4f69a8 100644
--- a/debian-stable/control
+++ b/debian-stable/control
@@ -14,7 +14,7 @@ Build-Depends:
libaspell-dev,
liblua5.3-dev,
tcl8.6-dev,
- guile-3.0-dev,
+ guile-2.2-dev,
php-dev, libphp-embed, libargon2-dev, libsodium-dev,
libxml2-dev,
libcurl4-gnutls-dev,
diff --git a/debian-stable/rules b/debian-stable/rules
index cab713c93..d2756333b 100755
--- a/debian-stable/rules
+++ b/debian-stable/rules
@@ -8,6 +8,7 @@ override_dh_auto_configure:
dh_auto_configure --buildsystem=cmake -- \
-DCMAKE_INSTALL_PREFIX:FILEPATH=/usr \
-DLIBDIR=/usr/lib/${DEB_HOST_MULTIARCH} \
+ -DENABLE_CJSON:BOOL=OFF \
-DENABLE_DOC:BOOL=ON \
-DENABLE_MAN:BOOL=ON \
-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \
@@ -1 +0,0 @@
weechat_debian_buster.patch
@@ -1,106 +0,0 @@
diff --git a/debian-devel/compat b/debian-devel/compat
index 48082f72f..b4de39476 100644
--- a/debian-devel/compat
+++ b/debian-devel/compat
@@ -1 +1 @@
-12
+11
diff --git a/debian-devel/control b/debian-devel/control
index a5d24b6a8..81ae98045 100644
--- a/debian-devel/control
+++ b/debian-devel/control
@@ -5,24 +5,23 @@ Maintainer: Sébastien Helleu <flashcode@flashtux.org>
Build-Depends:
asciidoctor (>= 1.5.4),
ruby-pygments.rb,
- debhelper (>= 12),
+ debhelper (>= 11),
cmake, pkg-config,
- libncurses-dev,
+ libncursesw5-dev,
gem2deb,
libperl-dev,
python3-dev,
libaspell-dev,
liblua5.3-dev,
tcl8.6-dev,
- guile-3.0-dev,
- php-dev, libphp-embed, libargon2-dev, libsodium-dev,
+ guile-2.2-dev,
+ php-dev, libphp-embed, libargon2-0-dev, libsodium-dev,
libxml2-dev,
libcurl4-gnutls-dev,
libgcrypt20-dev,
libgnutls28-dev,
libzstd-dev,
- zlib1g-dev,
- libcjson-dev
+ zlib1g-dev
Standards-Version: 4.6.2
Homepage: https://weechat.org/
Vcs-Git: https://salsa.debian.org/kolter/weechat.git
diff --git a/debian-devel/rules b/debian-devel/rules
index cab713c93..d2756333b 100755
--- a/debian-devel/rules
+++ b/debian-devel/rules
@@ -8,6 +8,7 @@ override_dh_auto_configure:
dh_auto_configure --buildsystem=cmake -- \
-DCMAKE_INSTALL_PREFIX:FILEPATH=/usr \
-DLIBDIR=/usr/lib/${DEB_HOST_MULTIARCH} \
+ -DENABLE_CJSON:BOOL=OFF \
-DENABLE_DOC:BOOL=ON \
-DENABLE_MAN:BOOL=ON \
-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \
diff --git a/debian-stable/compat b/debian-stable/compat
index 48082f72f..b4de39476 100644
--- a/debian-stable/compat
+++ b/debian-stable/compat
@@ -1 +1 @@
-12
+11
diff --git a/debian-stable/control b/debian-stable/control
index a75e6fee5..b39bf88dc 100644
--- a/debian-stable/control
+++ b/debian-stable/control
@@ -5,24 +5,23 @@ Maintainer: Emmanuel Bouthenot <kolter@debian.org>
Build-Depends:
asciidoctor (>= 1.5.4),
ruby-pygments.rb,
- debhelper (>= 12),
+ debhelper (>= 11),
cmake, pkg-config,
- libncurses-dev,
+ libncursesw5-dev,
gem2deb,
libperl-dev,
python3-dev,
libaspell-dev,
liblua5.3-dev,
tcl8.6-dev,
- guile-3.0-dev,
- php-dev, libphp-embed, libargon2-dev, libsodium-dev,
+ guile-2.2-dev,
+ php-dev, libphp-embed, libargon2-0-dev, libsodium-dev,
libxml2-dev,
libcurl4-gnutls-dev,
libgcrypt20-dev,
libgnutls28-dev,
libzstd-dev,
- zlib1g-dev,
- libcjson-dev
+ zlib1g-dev
Standards-Version: 4.6.2
Homepage: https://weechat.org/
Vcs-Git: https://salsa.debian.org/kolter/weechat.git
diff --git a/debian-stable/rules b/debian-stable/rules
index cab713c93..d2756333b 100755
--- a/debian-stable/rules
+++ b/debian-stable/rules
@@ -8,6 +8,7 @@ override_dh_auto_configure:
dh_auto_configure --buildsystem=cmake -- \
-DCMAKE_INSTALL_PREFIX:FILEPATH=/usr \
-DLIBDIR=/usr/lib/${DEB_HOST_MULTIARCH} \
+ -DENABLE_CJSON:BOOL=OFF \
-DENABLE_DOC:BOOL=ON \
-DENABLE_MAN:BOOL=ON \
-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \
+2 -2
View File
@@ -39,8 +39,8 @@
# devel-number the devel version as hex number ("0x04010000" for "4.1.0-dev") # devel-number the devel version as hex number ("0x04010000" for "4.1.0-dev")
# #
weechat_stable="4.3.0" weechat_stable="4.3.6"
weechat_devel="4.3.0" weechat_devel="4.3.7-dev"
stable_major=$(echo "${weechat_stable}" | cut -d"." -f1) stable_major=$(echo "${weechat_stable}" | cut -d"." -f1)
stable_minor=$(echo "${weechat_stable}" | cut -d"." -f2) stable_minor=$(echo "${weechat_stable}" | cut -d"." -f2)