mirror of
https://github.com/weechat/weechat.git
synced 2026-06-12 14:14:48 +02:00
Compare commits
31 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f3bc66b255 | |||
| a23d8f2198 | |||
| f4c6caabb3 | |||
| f416688e84 | |||
| 1dc7ae6b68 | |||
| b06e09d00b | |||
| 89090b10e8 | |||
| fad7231f90 | |||
| cf1e073446 | |||
| b4fc345a13 | |||
| b2cd9d002b | |||
| 9312211d49 | |||
| 2ad27b41a5 | |||
| ef68312393 | |||
| 7aa490e360 | |||
| 36ea983d04 | |||
| a4e7e18c14 | |||
| ea934864d4 | |||
| 6e7fe96046 | |||
| 82daed8076 | |||
| bcc061292d | |||
| 3b26d6750e | |||
| 71f8c2ba17 | |||
| 2d91845d53 | |||
| ed67f4bf0a | |||
| e311564387 | |||
| 2781f38052 | |||
| 6c9ff45e5c | |||
| 3203ee8f05 | |||
| b71af61581 | |||
| 2304029d61 |
@@ -10,6 +10,42 @@ This document lists all the changes for each version. +
|
||||
For a list of important changes that require manual actions, please look at release notes.
|
||||
|
||||
|
||||
[[v4.0.3]]
|
||||
== Version 4.0.3 (2023-08-08)
|
||||
|
||||
Bug fixes::
|
||||
|
||||
* core: fix input length and crash after delete of line (issue #1989)
|
||||
* irc: fix display of self CTCP message containing bold attribute (issue #1981)
|
||||
* irc: fix memory leak in IRC message parser
|
||||
* irc: fix switch to channel manually joined when server option autojoin_dynamic is on and option irc.look.buffer_switch_autojoin is off (issue #1982)
|
||||
* irc: fix display of outgoing notice with channel when capability "echo-message" is enabled (issue #1991)
|
||||
* relay: fix display of IRC CTCP messages received from client (issue #1986)
|
||||
|
||||
Build::
|
||||
|
||||
* doc: display a warning if a locale is missing with fallback to English for auto-generated content (issue #1985)
|
||||
|
||||
[[v4.0.2]]
|
||||
== Version 4.0.2 (2023-07-12)
|
||||
|
||||
Bug fixes::
|
||||
|
||||
* core: fix renaming of options with command `/item rename` (issue #1978)
|
||||
* core: don't send "key_pressed" signal again for the same key press (issue #1976)
|
||||
* core: don't send "key_combo_*" signals for incomplete keys (issue #1976)
|
||||
* core: add key ctrl-backspace in /help key (issue #1975)
|
||||
* core: keep keys ctrl-H and ctrl-? (in lower case) if they were manually bound to custom commands in a previous version
|
||||
|
||||
Tests::
|
||||
|
||||
* core: fix hdata tests failure on Alpine 3.18
|
||||
* relay: fix crash in tests on Alpine 3.18
|
||||
|
||||
Build::
|
||||
|
||||
* php: fix detection of PHP 8.2 on Alpine 3.18
|
||||
|
||||
[[v4.0.1]]
|
||||
== Version 4.0.1 (2023-06-30)
|
||||
|
||||
|
||||
+41
-31
@@ -11,6 +11,16 @@ It is recommended to read it when upgrading to a new stable version. +
|
||||
For a complete list of changes, please look at ChangeLog.
|
||||
|
||||
|
||||
[[v4.0.3]]
|
||||
== Version 4.0.3 (2023-08-08)
|
||||
|
||||
No release notes.
|
||||
|
||||
[[v4.0.2]]
|
||||
== Version 4.0.2 (2023-07-12)
|
||||
|
||||
No release notes.
|
||||
|
||||
[[v4.0.1]]
|
||||
== Version 4.0.1 (2023-06-30)
|
||||
|
||||
@@ -473,7 +483,7 @@ now any return value is ignored (like it has always been in the C API).
|
||||
[[v3.7.1]]
|
||||
== Version 3.7.1 (2022-10-21)
|
||||
|
||||
Bug fix and maintenance release.
|
||||
No release notes.
|
||||
|
||||
[[v3.7]]
|
||||
== Version 3.7 (2022-10-09)
|
||||
@@ -595,7 +605,7 @@ and is now a percentage between `0` and `100`:
|
||||
[[v3.4.1]]
|
||||
== Version 3.4.1 (2022-03-13)
|
||||
|
||||
Bug fix and maintenance release.
|
||||
No release notes.
|
||||
|
||||
[[v3.4]]
|
||||
== Version 3.4 (2021-12-18)
|
||||
@@ -753,7 +763,7 @@ For example:
|
||||
[[v3.2.1]]
|
||||
== Version 3.2.1 (2021-09-04)
|
||||
|
||||
Bug fix and maintenance release.
|
||||
No release notes.
|
||||
|
||||
[[v3.2]]
|
||||
== Version 3.2 (2021-06-13)
|
||||
@@ -983,7 +993,7 @@ must adjust the value of the new option, which defaults to 1:
|
||||
[[v3.0.1]]
|
||||
== Version 3.0.1 (2021-01-31)
|
||||
|
||||
Bug fix and maintenance release.
|
||||
No release notes.
|
||||
|
||||
[[v3.0]]
|
||||
== Version 3.0 (2020-11-11)
|
||||
@@ -1291,7 +1301,7 @@ version:
|
||||
[[v2.7.1]]
|
||||
== Version 2.7.1 (2020-02-20)
|
||||
|
||||
Bug fix and maintenance release.
|
||||
No release notes.
|
||||
|
||||
[[v2.7]]
|
||||
== Version 2.7 (2019-12-08)
|
||||
@@ -1535,7 +1545,7 @@ Functions removed from C API:
|
||||
[[v2.3]]
|
||||
== Version 2.3 (2018-10-21)
|
||||
|
||||
No release note.
|
||||
No release notes.
|
||||
|
||||
[[v2.2]]
|
||||
== Version 2.2 (2018-07-14)
|
||||
@@ -1671,7 +1681,7 @@ List of options moved:
|
||||
[[v2.0.1]]
|
||||
== Version 2.0.1 (2017-12-20)
|
||||
|
||||
Bug fix and maintenance release.
|
||||
No release notes.
|
||||
|
||||
[[v2.0]]
|
||||
== Version 2.0 (2017-12-03)
|
||||
@@ -1766,12 +1776,12 @@ to integer before using it, for example in Python: `int(fd)`.
|
||||
[[v1.9.1]]
|
||||
== Version 1.9.1 (2017-09-23)
|
||||
|
||||
Bug fix and maintenance release.
|
||||
No release notes.
|
||||
|
||||
[[v1.9]]
|
||||
== Version 1.9 (2017-06-25)
|
||||
|
||||
No release note.
|
||||
No release notes.
|
||||
|
||||
[[v1.8]]
|
||||
== Version 1.8 (2017-05-13)
|
||||
@@ -1823,7 +1833,7 @@ Aspell option with color for suggestion on a misspelled word has been renamed:
|
||||
[[v1.7.1]]
|
||||
== Version 1.7.1 (2017-04-22)
|
||||
|
||||
Bug fix and maintenance release.
|
||||
No release notes.
|
||||
|
||||
[[v1.7]]
|
||||
== Version 1.7 (2017-01-15)
|
||||
@@ -2070,7 +2080,7 @@ command:
|
||||
[[v1.1.1]]
|
||||
== Version 1.1.1 (2015-01-25)
|
||||
|
||||
Bug fix and maintenance release.
|
||||
No release notes.
|
||||
|
||||
[[v1.1]]
|
||||
== Version 1.1 (2015-01-11)
|
||||
@@ -2190,7 +2200,7 @@ instead of milliseconds:
|
||||
[[v1.0.1]]
|
||||
== Version 1.0.1 (2014-09-28)
|
||||
|
||||
Bug fix and maintenance release.
|
||||
No release notes.
|
||||
|
||||
[[v1.0]]
|
||||
== Version 1.0 (2014-08-15)
|
||||
@@ -3016,17 +3026,17 @@ This version fixes a major bug: crash with some special chars in IRC messages.
|
||||
[[v0.2.6]]
|
||||
== Version 0.2.6 (2007-09-06)
|
||||
|
||||
No release note.
|
||||
No release notes.
|
||||
|
||||
[[v0.2.5]]
|
||||
== Version 0.2.5 (2007-06-07)
|
||||
|
||||
No release note.
|
||||
No release notes.
|
||||
|
||||
[[v0.2.4]]
|
||||
== Version 0.2.4 (2007-03-29)
|
||||
|
||||
No release note.
|
||||
No release notes.
|
||||
|
||||
[[v0.2.3]]
|
||||
== Version 0.2.3 (2007-01-10)
|
||||
@@ -3085,7 +3095,7 @@ Which gives something like:
|
||||
[[v0.2.1]]
|
||||
== Version 0.2.1 (2006-10-01)
|
||||
|
||||
No release note.
|
||||
No release notes.
|
||||
|
||||
[[v0.2.0]]
|
||||
== Version 0.2.0 (2006-08-19)
|
||||
@@ -3199,74 +3209,74 @@ at startup.
|
||||
[[v0.1.5]]
|
||||
== Version 0.1.5 (2005-09-24)
|
||||
|
||||
No release note.
|
||||
No release notes.
|
||||
|
||||
[[v0.1.4]]
|
||||
== Version 0.1.4 (2005-07-30)
|
||||
|
||||
No release note.
|
||||
No release notes.
|
||||
|
||||
[[v0.1.3]]
|
||||
== Version 0.1.3 (2005-07-02)
|
||||
|
||||
No release note.
|
||||
No release notes.
|
||||
|
||||
[[v0.1.2]]
|
||||
== Version 0.1.2 (2005-05-21)
|
||||
|
||||
No release note.
|
||||
No release notes.
|
||||
|
||||
[[v0.1.1]]
|
||||
== Version 0.1.1 (2005-03-20)
|
||||
|
||||
No release note.
|
||||
No release notes.
|
||||
|
||||
[[v0.1.0]]
|
||||
== Version 0.1.0 (2005-02-12)
|
||||
|
||||
No release note.
|
||||
No release notes.
|
||||
|
||||
[[v0.0.9]]
|
||||
== Version 0.0.9 (2005-01-01)
|
||||
|
||||
No release note.
|
||||
No release notes.
|
||||
|
||||
[[v0.0.8]]
|
||||
== Version 0.0.8 (2004-10-30)
|
||||
|
||||
No release note.
|
||||
No release notes.
|
||||
|
||||
[[v0.0.7]]
|
||||
== Version 0.0.7 (2004-08-08)
|
||||
|
||||
No release note.
|
||||
No release notes.
|
||||
|
||||
[[v0.0.6]]
|
||||
== Version 0.0.6 (2004-06-05)
|
||||
|
||||
No release note.
|
||||
No release notes.
|
||||
|
||||
[[v0.0.5]]
|
||||
== Version 0.0.5 (2004-02-07)
|
||||
|
||||
No release note.
|
||||
No release notes.
|
||||
|
||||
[[v0.0.4]]
|
||||
== Version 0.0.4 (2004-01-01)
|
||||
|
||||
No release note.
|
||||
No release notes.
|
||||
|
||||
[[v0.0.3]]
|
||||
== Version 0.0.3 (2003-11-03)
|
||||
|
||||
No release note.
|
||||
No release notes.
|
||||
|
||||
[[v0.0.2]]
|
||||
== Version 0.0.2 (2003-10-05)
|
||||
|
||||
No release note.
|
||||
No release notes.
|
||||
|
||||
[[v0.0.1]]
|
||||
== Version 0.0.1 (2003-09-27)
|
||||
|
||||
No release note.
|
||||
No release notes.
|
||||
|
||||
+1
-1
@@ -48,7 +48,7 @@ if(NOT PHP_FOUND)
|
||||
execute_process(COMMAND ${PHP_CONFIG_EXECUTABLE} --version OUTPUT_VARIABLE PHP_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
if(${PHP_VERSION} MATCHES "^[78]")
|
||||
find_library(PHP_LIB
|
||||
NAMES php8.2 php8.1 php8.0 php8 php7.4 php7.3 php7.2 php7.1 php7.0 php7 php
|
||||
NAMES php8.2 php82 php8.1 php81 php8.0 php80 php8 php7.4 php74 php7.3 php73 php7.2 php72 php7.1 php71 php7.0 php70 php7 php
|
||||
HINTS ${PHP_LIB_PREFIX} ${PHP_LIB_PREFIX}/lib ${PHP_LIB_PREFIX}/lib64
|
||||
)
|
||||
if(PHP_LIB)
|
||||
|
||||
@@ -21,7 +21,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2023-06-17 11:44+0200\n"
|
||||
"POT-Creation-Date: 2023-07-05 21:24+0200\n"
|
||||
"PO-Revision-Date: 2023-06-25 00:48+0200\n"
|
||||
"Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -2043,6 +2043,10 @@ msgid ""
|
||||
"then k), and then press the key to bind: this will insert key name in "
|
||||
"command line.\n"
|
||||
"\n"
|
||||
"For some keys you might need to use /debug key, this displays the raw key "
|
||||
"code that can be used (for example the key ctrl+backspace could be \"ctrl-"
|
||||
"h\" or \"ctrl-?\", depending on your terminal and other settings).\n"
|
||||
"\n"
|
||||
"Modifiers allowed (in this order when multiple are used):\n"
|
||||
" meta- (alt key)\n"
|
||||
" ctrl- (control key)\n"
|
||||
|
||||
@@ -26,8 +26,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2023-06-17 11:44+0200\n"
|
||||
"PO-Revision-Date: 2023-06-23 07:41+0200\n"
|
||||
"POT-Creation-Date: 2023-07-05 21:24+0200\n"
|
||||
"PO-Revision-Date: 2023-07-05 21:25+0200\n"
|
||||
"Last-Translator: Nils Görs <weechatter@arcor.de>\n"
|
||||
"Language-Team: German <kde-i18n-de@kde.org>\n"
|
||||
"Language: de_DE\n"
|
||||
@@ -2540,6 +2540,10 @@ msgid ""
|
||||
"then k), and then press the key to bind: this will insert key name in "
|
||||
"command line.\n"
|
||||
"\n"
|
||||
"For some keys you might need to use /debug key, this displays the raw key "
|
||||
"code that can be used (for example the key ctrl+backspace could be \"ctrl-"
|
||||
"h\" or \"ctrl-?\", depending on your terminal and other settings).\n"
|
||||
"\n"
|
||||
"Modifiers allowed (in this order when multiple are used):\n"
|
||||
" meta- (alt key)\n"
|
||||
" ctrl- (control key)\n"
|
||||
@@ -2611,6 +2615,11 @@ msgstr ""
|
||||
"damit die zu belegende Taste zu ermitteln. Durch diesen Schritt wird der "
|
||||
"benötigte Tasten-Code in die Befehlszeile übernommen.\n"
|
||||
"\n"
|
||||
"Für einige Tasten müssen Sie möglicherweise /debug key verwenden. Dadurch "
|
||||
"wird der Wert des Rohschlüssels angezeigt, der verwendet werden kann (zum "
|
||||
"Beispiel könnte die Taste Strg+Rücktaste \"ctrl-H\" sein \"ctrl-?\", "
|
||||
"abhängig von Ihrem Terminal und anderen Einstellungen).\n"
|
||||
"\n"
|
||||
"Zulässige Modifikatortasten (in dieser Reihenfolge, wenn mehrere verwendet "
|
||||
"werden):\n"
|
||||
" meta- (Alt-Taste)\n"
|
||||
@@ -5605,20 +5614,17 @@ msgid ""
|
||||
"%sError: %s, line %d: invalid config version: \"%s\" => rest of file is "
|
||||
"IGNORED, default options are used"
|
||||
msgstr ""
|
||||
"%sFehler: %s, Zeile %d: Ungültige Konfigurationsversion: \"%s\" => Der Rest"
|
||||
" der Datei wird IGNORIERT, es werden Standardoptionen verwendet"
|
||||
"%sFehler: %s, Zeile %d: Ungültige Konfigurationsversion: \"%s\" => Der Rest "
|
||||
"der Datei wird IGNORIERT, es werden Standardoptionen verwendet"
|
||||
|
||||
#, c-format
|
||||
#| msgid ""
|
||||
#| "%sWarning: %s, version read (%d) is newer than supported version (%d), "
|
||||
#| "options may be broken!"
|
||||
msgid ""
|
||||
"%sError: %s, version read (%d) is newer than supported version (%d) => rest "
|
||||
"of file is IGNORED, default options are used"
|
||||
msgstr ""
|
||||
"%sFehler: %s, verwendete Version (%d) ist neuer als die unterstützte Version"
|
||||
" (%d) => Der Rest der Datei wird IGNORIERT, es werden Standardoptionen"
|
||||
" verwendet"
|
||||
"%sFehler: %s, verwendete Version (%d) ist neuer als die unterstützte Version "
|
||||
"(%d) => Der Rest der Datei wird IGNORIERT, es werden Standardoptionen "
|
||||
"verwendet"
|
||||
|
||||
#, c-format
|
||||
msgid "%sWarning: %s, line %d: option outside section: %s"
|
||||
@@ -16026,8 +16032,7 @@ msgstr "verwaltet Trigger, das Schweizer Armeemesser für WeeChat"
|
||||
|
||||
msgid ""
|
||||
"list|listfull|listdefault || add|addoff|addreplace <name> <hook> "
|
||||
"[\"<arguments>\" [\"<conditions>\" [\"<regex>\" [\"<command>\" [\"<"
|
||||
"return_code>\" [\"<post_action>\"]]]]]] "
|
||||
"[\"<arguments>\" [\"<conditions>\" [\"<regex>\" [\"<command>\" [\"<return_code>\" [\"<post_action>\"]]]]]] "
|
||||
"|| addinput [<hook>] || input|output|recreate <name> || set <name> <option> "
|
||||
"<value> || rename|copy <name> <new_name> || enable|disable|toggle [<name>|-"
|
||||
"all [<name>...]] || restart <name>|-all [<name>...] || show <name> || del "
|
||||
@@ -16035,8 +16040,7 @@ msgid ""
|
||||
"monitor [<filter>]"
|
||||
msgstr ""
|
||||
"list|listfull|listdefault || add|addoff|addreplace <name> <hook> "
|
||||
"[\"<arguments>\" [\"<conditions>\" [\"<regex>\" [\"<command>\" [\"<"
|
||||
"return_code>\" [\"<post_action>\"]]]]]] "
|
||||
"[\"<arguments>\" [\"<conditions>\" [\"<regex>\" [\"<command>\" [\"<return_code>\" [\"<post_action>\"]]]]]] "
|
||||
"|| addinput [<hook>] || input|output|recreate <name> || set <name> <option> "
|
||||
"<value> || rename|copy <name> <new_name> || enable|disable|toggle [<name>|-"
|
||||
"all [<name>...]] || restart <name>|-all [<name>...] || show <name> || del "
|
||||
|
||||
@@ -22,7 +22,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2023-06-17 11:44+0200\n"
|
||||
"POT-Creation-Date: 2023-07-05 21:24+0200\n"
|
||||
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
|
||||
"Last-Translator: Santiago Forero <santiago@forero.xyz>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -2537,6 +2537,10 @@ msgid ""
|
||||
"then k), and then press the key to bind: this will insert key name in "
|
||||
"command line.\n"
|
||||
"\n"
|
||||
"For some keys you might need to use /debug key, this displays the raw key "
|
||||
"code that can be used (for example the key ctrl+backspace could be \"ctrl-"
|
||||
"h\" or \"ctrl-?\", depending on your terminal and other settings).\n"
|
||||
"\n"
|
||||
"Modifiers allowed (in this order when multiple are used):\n"
|
||||
" meta- (alt key)\n"
|
||||
" ctrl- (control key)\n"
|
||||
|
||||
@@ -21,8 +21,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2023-06-17 11:44+0200\n"
|
||||
"PO-Revision-Date: 2023-06-25 19:12+0200\n"
|
||||
"POT-Creation-Date: 2023-07-05 21:24+0200\n"
|
||||
"PO-Revision-Date: 2023-07-05 21:25+0200\n"
|
||||
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
"Language: fr\n"
|
||||
@@ -2491,6 +2491,10 @@ msgid ""
|
||||
"then k), and then press the key to bind: this will insert key name in "
|
||||
"command line.\n"
|
||||
"\n"
|
||||
"For some keys you might need to use /debug key, this displays the raw key "
|
||||
"code that can be used (for example the key ctrl+backspace could be \"ctrl-"
|
||||
"h\" or \"ctrl-?\", depending on your terminal and other settings).\n"
|
||||
"\n"
|
||||
"Modifiers allowed (in this order when multiple are used):\n"
|
||||
" meta- (alt key)\n"
|
||||
" ctrl- (control key)\n"
|
||||
@@ -2558,6 +2562,11 @@ msgstr ""
|
||||
"d'utiliser la touche alt+k (ou Échap puis k), et puis de presser la touche à "
|
||||
"associer : cela insère le code de la touche dans la ligne de commande.\n"
|
||||
"\n"
|
||||
"Pour certaines touches vous pourriez avoir besoin d'utiliser /debug key, "
|
||||
"cela affiche le code brut de la touche qui peut être utilisé (par exemple "
|
||||
"ctrl+backspace pourrait être \"ctrl-h\" ou \"ctrl-?\", selon votre terminal "
|
||||
"et d'autres paramètres).\n"
|
||||
"\n"
|
||||
"Modificateurs autorisés (dans cet ordre lorsque plusieurs sont utilisés) :\n"
|
||||
" meta- (touche alt)\n"
|
||||
" ctrl- (touche control)\n"
|
||||
|
||||
@@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2023-06-17 11:44+0200\n"
|
||||
"POT-Creation-Date: 2023-07-05 21:24+0200\n"
|
||||
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
|
||||
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -1868,6 +1868,10 @@ msgid ""
|
||||
"then k), and then press the key to bind: this will insert key name in "
|
||||
"command line.\n"
|
||||
"\n"
|
||||
"For some keys you might need to use /debug key, this displays the raw key "
|
||||
"code that can be used (for example the key ctrl+backspace could be \"ctrl-"
|
||||
"h\" or \"ctrl-?\", depending on your terminal and other settings).\n"
|
||||
"\n"
|
||||
"Modifiers allowed (in this order when multiple are used):\n"
|
||||
" meta- (alt key)\n"
|
||||
" ctrl- (control key)\n"
|
||||
|
||||
@@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2023-06-17 11:44+0200\n"
|
||||
"POT-Creation-Date: 2023-07-05 21:24+0200\n"
|
||||
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
|
||||
"Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -2125,6 +2125,10 @@ msgid ""
|
||||
"then k), and then press the key to bind: this will insert key name in "
|
||||
"command line.\n"
|
||||
"\n"
|
||||
"For some keys you might need to use /debug key, this displays the raw key "
|
||||
"code that can be used (for example the key ctrl+backspace could be \"ctrl-"
|
||||
"h\" or \"ctrl-?\", depending on your terminal and other settings).\n"
|
||||
"\n"
|
||||
"Modifiers allowed (in this order when multiple are used):\n"
|
||||
" meta- (alt key)\n"
|
||||
" ctrl- (control key)\n"
|
||||
|
||||
@@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2023-06-17 11:44+0200\n"
|
||||
"POT-Creation-Date: 2023-07-05 21:24+0200\n"
|
||||
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
|
||||
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
|
||||
"Language-Team: Japanese <https://github.com/l/weechat/tree/master/"
|
||||
@@ -2506,6 +2506,10 @@ msgid ""
|
||||
"then k), and then press the key to bind: this will insert key name in "
|
||||
"command line.\n"
|
||||
"\n"
|
||||
"For some keys you might need to use /debug key, this displays the raw key "
|
||||
"code that can be used (for example the key ctrl+backspace could be \"ctrl-"
|
||||
"h\" or \"ctrl-?\", depending on your terminal and other settings).\n"
|
||||
"\n"
|
||||
"Modifiers allowed (in this order when multiple are used):\n"
|
||||
" meta- (alt key)\n"
|
||||
" ctrl- (control key)\n"
|
||||
|
||||
@@ -22,7 +22,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2023-06-17 11:44+0200\n"
|
||||
"POT-Creation-Date: 2023-07-05 21:24+0200\n"
|
||||
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
|
||||
"Last-Translator: Krzysztof Korościk <soltys@soltys.info>\n"
|
||||
"Language-Team: Polish <kde-i18n-doc@kde.org>\n"
|
||||
@@ -2838,6 +2838,10 @@ msgid ""
|
||||
"then k), and then press the key to bind: this will insert key name in "
|
||||
"command line.\n"
|
||||
"\n"
|
||||
"For some keys you might need to use /debug key, this displays the raw key "
|
||||
"code that can be used (for example the key ctrl+backspace could be \"ctrl-"
|
||||
"h\" or \"ctrl-?\", depending on your terminal and other settings).\n"
|
||||
"\n"
|
||||
"Modifiers allowed (in this order when multiple are used):\n"
|
||||
" meta- (alt key)\n"
|
||||
" ctrl- (control key)\n"
|
||||
|
||||
@@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2023-06-17 11:44+0200\n"
|
||||
"POT-Creation-Date: 2023-07-05 21:24+0200\n"
|
||||
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
|
||||
"Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n"
|
||||
"Language-Team: Portuguese <>\n"
|
||||
@@ -2499,6 +2499,10 @@ msgid ""
|
||||
"then k), and then press the key to bind: this will insert key name in "
|
||||
"command line.\n"
|
||||
"\n"
|
||||
"For some keys you might need to use /debug key, this displays the raw key "
|
||||
"code that can be used (for example the key ctrl+backspace could be \"ctrl-"
|
||||
"h\" or \"ctrl-?\", depending on your terminal and other settings).\n"
|
||||
"\n"
|
||||
"Modifiers allowed (in this order when multiple are used):\n"
|
||||
" meta- (alt key)\n"
|
||||
" ctrl- (control key)\n"
|
||||
|
||||
+5
-1
@@ -21,7 +21,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2023-06-17 11:44+0200\n"
|
||||
"POT-Creation-Date: 2023-07-05 21:24+0200\n"
|
||||
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
|
||||
"Last-Translator: Érico Nogueira <ericonr@disroot.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -2202,6 +2202,10 @@ msgid ""
|
||||
"then k), and then press the key to bind: this will insert key name in "
|
||||
"command line.\n"
|
||||
"\n"
|
||||
"For some keys you might need to use /debug key, this displays the raw key "
|
||||
"code that can be used (for example the key ctrl+backspace could be \"ctrl-"
|
||||
"h\" or \"ctrl-?\", depending on your terminal and other settings).\n"
|
||||
"\n"
|
||||
"Modifiers allowed (in this order when multiple are used):\n"
|
||||
" meta- (alt key)\n"
|
||||
" ctrl- (control key)\n"
|
||||
|
||||
@@ -21,7 +21,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2023-06-17 11:44+0200\n"
|
||||
"POT-Creation-Date: 2023-07-05 21:24+0200\n"
|
||||
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
|
||||
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -1889,6 +1889,10 @@ msgid ""
|
||||
"then k), and then press the key to bind: this will insert key name in "
|
||||
"command line.\n"
|
||||
"\n"
|
||||
"For some keys you might need to use /debug key, this displays the raw key "
|
||||
"code that can be used (for example the key ctrl+backspace could be \"ctrl-"
|
||||
"h\" or \"ctrl-?\", depending on your terminal and other settings).\n"
|
||||
"\n"
|
||||
"Modifiers allowed (in this order when multiple are used):\n"
|
||||
" meta- (alt key)\n"
|
||||
" ctrl- (control key)\n"
|
||||
|
||||
@@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2023-06-17 11:44+0200\n"
|
||||
"POT-Creation-Date: 2023-07-05 21:24+0200\n"
|
||||
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
|
||||
"Last-Translator: Ivan Pešić <ivan.pesic@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -2424,6 +2424,71 @@ msgstr ""
|
||||
"<контекст> <тастер> || resetall -yes [<контекст>] || missing [<контекст>] || "
|
||||
"legacy <тастер> [<тастер>...]"
|
||||
|
||||
#, fuzzy
|
||||
#| msgid ""
|
||||
#| " list: list all current keys\n"
|
||||
#| "listdefault: list default keys\n"
|
||||
#| " listdiff: list differences between current and default keys (keys "
|
||||
#| "added, redefined or deleted)\n"
|
||||
#| " context: name of context (\"default\" or \"search\")\n"
|
||||
#| " bind: bind a command to a key or display command bound to key (for "
|
||||
#| "context \"default\")\n"
|
||||
#| " bindctxt: bind a command to a key or display command bound to key, for "
|
||||
#| "given context\n"
|
||||
#| " command: command (many commands can be separated by semicolons)\n"
|
||||
#| " unbind: remove a key binding (for context \"default\")\n"
|
||||
#| " unbindctxt: remove a key binding for given context\n"
|
||||
#| " reset: reset a key to default binding (for context \"default\")\n"
|
||||
#| " resetctxt: reset a key to default binding, for given context\n"
|
||||
#| " resetall: restore bindings to the default values and delete ALL "
|
||||
#| "personal bindings (use carefully!)\n"
|
||||
#| " missing: add missing keys (using default bindings), useful after "
|
||||
#| "installing new WeeChat version\n"
|
||||
#| " legacy: display new name for legacy keys\n"
|
||||
#| "\n"
|
||||
#| "When binding a command to a key, it is recommended to use key alt+k (or "
|
||||
#| "Esc then k), and then press the key to bind: this will insert key name in "
|
||||
#| "command line.\n"
|
||||
#| "\n"
|
||||
#| "Modifiers allowed (in this order when multiple are used):\n"
|
||||
#| " meta- (alt key)\n"
|
||||
#| " ctrl- (control key)\n"
|
||||
#| " shift- (shift key, can only be used with key names below)\n"
|
||||
#| "\n"
|
||||
#| "Key names allowed: f0 to f20, home, insert, delete, end, backspace, pgup, "
|
||||
#| "pgdn, up, down, right, left, tab, return, comma, space.\n"
|
||||
#| "\n"
|
||||
#| "Combo of keys must be separated by a comma.\n"
|
||||
#| "\n"
|
||||
#| "For context \"mouse\" (possible in context \"cursor\" too), key has "
|
||||
#| "format: \"@area:key\" or \"@area1>area2:key\" where area can be:\n"
|
||||
#| " *: any area on screen\n"
|
||||
#| " chat: chat area (any buffer)\n"
|
||||
#| " chat(xxx): chat area for buffer with name \"xxx\" (full name including "
|
||||
#| "plugin)\n"
|
||||
#| " bar(*): any bar\n"
|
||||
#| " bar(xxx): bar \"xxx\"\n"
|
||||
#| " item(*): any bar item\n"
|
||||
#| " item(xxx): bar item \"xxx\"\n"
|
||||
#| "Wildcard \"*\" is allowed in key to match many mouse events.\n"
|
||||
#| "A special value for command with format \"hsignal:name\" can be used for "
|
||||
#| "context mouse, this will send the hsignal \"name\" with the focus "
|
||||
#| "hashtable as argument.\n"
|
||||
#| "Another special value \"-\" can be used to disable key (it will be "
|
||||
#| "ignored when looking for keys).\n"
|
||||
#| "\n"
|
||||
#| "Examples:\n"
|
||||
#| " key alt-r to jump to #weechat IRC channel:\n"
|
||||
#| " /key bind meta-r /buffer #weechat\n"
|
||||
#| " restore default binding for key alt-r:\n"
|
||||
#| " /key reset meta-r\n"
|
||||
#| " key meta-v then f1 to run /help:\n"
|
||||
#| " /key bind meta-v,f1 /help\n"
|
||||
#| " key \"tab\" to stop search in buffer:\n"
|
||||
#| " /key bindctxt search tab /input search_stop\n"
|
||||
#| " middle button of mouse on a nick to retrieve info on nick:\n"
|
||||
#| " /key bindctxt mouse @item(buffer_nicklist):button3 /msg nickserv info "
|
||||
#| "${nick}"
|
||||
msgid ""
|
||||
" list: list all current keys\n"
|
||||
"listdefault: list default keys\n"
|
||||
@@ -2449,6 +2514,10 @@ msgid ""
|
||||
"then k), and then press the key to bind: this will insert key name in "
|
||||
"command line.\n"
|
||||
"\n"
|
||||
"For some keys you might need to use /debug key, this displays the raw key "
|
||||
"code that can be used (for example the key ctrl+backspace could be \"ctrl-"
|
||||
"h\" or \"ctrl-?\", depending on your terminal and other settings).\n"
|
||||
"\n"
|
||||
"Modifiers allowed (in this order when multiple are used):\n"
|
||||
" meta- (alt key)\n"
|
||||
" ctrl- (control key)\n"
|
||||
|
||||
@@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2023-06-17 11:44+0200\n"
|
||||
"POT-Creation-Date: 2023-07-05 21:24+0200\n"
|
||||
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
|
||||
"Last-Translator: Emir SARI <emir_sari@icloud.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -2536,6 +2536,10 @@ msgid ""
|
||||
"then k), and then press the key to bind: this will insert key name in "
|
||||
"command line.\n"
|
||||
"\n"
|
||||
"For some keys you might need to use /debug key, this displays the raw key "
|
||||
"code that can be used (for example the key ctrl+backspace could be \"ctrl-"
|
||||
"h\" or \"ctrl-?\", depending on your terminal and other settings).\n"
|
||||
"\n"
|
||||
"Modifiers allowed (in this order when multiple are used):\n"
|
||||
" meta- (alt key)\n"
|
||||
" ctrl- (control key)\n"
|
||||
|
||||
+5
-1
@@ -21,7 +21,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2023-06-17 11:44+0200\n"
|
||||
"POT-Creation-Date: 2023-07-05 21:24+0200\n"
|
||||
"PO-Revision-Date: 2014-08-16 10:27+0200\n"
|
||||
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -1726,6 +1726,10 @@ msgid ""
|
||||
"then k), and then press the key to bind: this will insert key name in "
|
||||
"command line.\n"
|
||||
"\n"
|
||||
"For some keys you might need to use /debug key, this displays the raw key "
|
||||
"code that can be used (for example the key ctrl+backspace could be \"ctrl-"
|
||||
"h\" or \"ctrl-?\", depending on your terminal and other settings).\n"
|
||||
"\n"
|
||||
"Modifiers allowed (in this order when multiple are used):\n"
|
||||
" meta- (alt key)\n"
|
||||
" ctrl- (control key)\n"
|
||||
|
||||
@@ -8522,6 +8522,11 @@ command_init ()
|
||||
"(or Esc then k), and then press the key to bind: this will insert "
|
||||
"key name in command line.\n"
|
||||
"\n"
|
||||
"For some keys you might need to use /debug key, this displays "
|
||||
"the raw key code that can be used (for example the key "
|
||||
"ctrl+backspace could be \"ctrl-h\" or \"ctrl-?\", depending on your "
|
||||
"terminal and other settings).\n"
|
||||
"\n"
|
||||
"Modifiers allowed (in this order when multiple are used):\n"
|
||||
" meta- (alt key)\n"
|
||||
" ctrl- (control key)\n"
|
||||
|
||||
+18
-1
@@ -1601,7 +1601,24 @@ config_weechat_update_cb (const void *pointer, void *data,
|
||||
}
|
||||
else
|
||||
{
|
||||
new_option = gui_key_legacy_to_alias (ptr_option);
|
||||
/*
|
||||
* if backspace or ctrl-backspace was manually bound to a
|
||||
* different command, keep the key as-is (in lower case) ;
|
||||
* in all other cases, convert the key to the new name
|
||||
*/
|
||||
if (ptr_section
|
||||
&& (strcmp (ptr_section, "key") == 0)
|
||||
&& ((strcmp (ptr_option, "ctrl-H") == 0)
|
||||
|| (strcmp (ptr_option, "ctrl-?") == 0))
|
||||
&& (ptr_value
|
||||
&& (strcmp (ptr_value, "/input delete_previous_char") != 0)))
|
||||
{
|
||||
new_option = string_tolower (ptr_option);
|
||||
}
|
||||
else
|
||||
{
|
||||
new_option = gui_key_legacy_to_alias (ptr_option);
|
||||
}
|
||||
if (new_option)
|
||||
{
|
||||
if (strcmp (ptr_option, new_option) != 0)
|
||||
|
||||
+109
-75
@@ -30,6 +30,7 @@
|
||||
#include <libintl.h>
|
||||
#include <locale.h>
|
||||
#include <gcrypt.h>
|
||||
#include <regex.h>
|
||||
|
||||
#include "weechat.h"
|
||||
#include "wee-arraylist.h"
|
||||
@@ -46,7 +47,8 @@
|
||||
#include "wee-utf8.h"
|
||||
#include "../plugins/plugin.h"
|
||||
|
||||
#define ESCAPE(msg) (doc_gen_escape (msg))
|
||||
#define ESCAPE_TABLE(msg) (doc_gen_escape_table (msg))
|
||||
#define ESCAPE_ANCHOR(msg) (doc_gen_escape_anchor_link (msg))
|
||||
#define TRANS(msg) ((msg && msg[0]) ? _(msg) : msg)
|
||||
#define TRANS_DEF(msg, def) ((msg && msg[0]) ? _(msg) : def)
|
||||
#define PLUGIN(plugin) ((plugin) ? plugin->name : "weechat")
|
||||
@@ -62,7 +64,7 @@ char *string_escaped[32];
|
||||
*/
|
||||
|
||||
char *
|
||||
doc_gen_escape (const char *message)
|
||||
doc_gen_escape_table (const char *message)
|
||||
{
|
||||
index_string_escaped = (index_string_escaped + 1) % 32;
|
||||
|
||||
@@ -74,6 +76,31 @@ doc_gen_escape (const char *message)
|
||||
return string_escaped[index_string_escaped];
|
||||
}
|
||||
|
||||
/*
|
||||
* Escapes a string to be used as anchor link: replace ",", "@" and "*" by "-".
|
||||
*/
|
||||
|
||||
char *
|
||||
doc_gen_escape_anchor_link (const char *message)
|
||||
{
|
||||
regex_t regex;
|
||||
|
||||
if (string_regcomp (®ex, "[,@*():&|]+", REG_EXTENDED) != 0)
|
||||
return NULL;
|
||||
|
||||
index_string_escaped = (index_string_escaped + 1) % 32;
|
||||
|
||||
if (string_escaped[index_string_escaped])
|
||||
free (string_escaped[index_string_escaped]);
|
||||
|
||||
string_escaped[index_string_escaped] = string_replace_regex (
|
||||
message, ®ex, "-", '$', NULL, NULL);
|
||||
|
||||
regfree (®ex);
|
||||
|
||||
return string_escaped[index_string_escaped];
|
||||
}
|
||||
|
||||
/*
|
||||
* Opens a file for write using:
|
||||
* - path
|
||||
@@ -99,7 +126,7 @@ doc_gen_open_file (const char *path, const char *doc, const char *name,
|
||||
if (!file)
|
||||
{
|
||||
string_fprintf (stderr,
|
||||
"doc generator: ERROR: unable to write file \"%s\"",
|
||||
"doc generator: ERROR: unable to write file \"%s\"\n",
|
||||
filename);
|
||||
return NULL;
|
||||
}
|
||||
@@ -435,7 +462,7 @@ doc_gen_user_options (const char *path, const char *lang)
|
||||
struct t_config_option *ptr_option;
|
||||
struct t_arraylist *list_options;
|
||||
int i, list_size, index_option;
|
||||
char *name_escaped, *desc_escaped, *values, str_values[256];
|
||||
char *desc_escaped, *values, str_values[256];
|
||||
char *default_value, *tmp;
|
||||
|
||||
file = doc_gen_open_file (path, "user", "options", lang);
|
||||
@@ -489,15 +516,14 @@ doc_gen_user_options (const char *path, const char *lang)
|
||||
}
|
||||
if (index_option > 0)
|
||||
string_fprintf (file, "\n");
|
||||
name_escaped = string_replace (ptr_option->name, ",", "_");
|
||||
desc_escaped = (ptr_option->description) ?
|
||||
string_replace (TRANS(ptr_option->description), "]", "\\]") :
|
||||
strdup ("");
|
||||
string_fprintf (file,
|
||||
"* [[option_%s.%s.%s]] *%s.%s.%s*\n",
|
||||
"* [[option_%s.%s.%s]] *pass:none[%s.%s.%s]*\n",
|
||||
ptr_option->config_file->name,
|
||||
ptr_option->section->name,
|
||||
name_escaped,
|
||||
ESCAPE_ANCHOR(ptr_option->name),
|
||||
ptr_option->config_file->name,
|
||||
ptr_option->section->name,
|
||||
ptr_option->name);
|
||||
@@ -568,8 +594,6 @@ doc_gen_user_options (const char *path, const char *lang)
|
||||
(ptr_option->type == CONFIG_OPTION_TYPE_STRING) ? "\"" : "",
|
||||
default_value,
|
||||
(ptr_option->type == CONFIG_OPTION_TYPE_STRING) ? "\"" : "");
|
||||
if (name_escaped)
|
||||
free (name_escaped);
|
||||
if (desc_escaped)
|
||||
free (desc_escaped);
|
||||
if (values)
|
||||
@@ -614,9 +638,9 @@ doc_gen_user_default_aliases (const char *path, const char *lang)
|
||||
"[width=\"100%\",cols=\"2m,5m,5\",options=\"header\"]\n"
|
||||
"|===\n"
|
||||
"| %s | %s | %s\n",
|
||||
ESCAPE(_("Alias")),
|
||||
ESCAPE(_("Command")),
|
||||
ESCAPE(_("Completion")));
|
||||
ESCAPE_TABLE(_("Alias")),
|
||||
ESCAPE_TABLE(_("Command")),
|
||||
ESCAPE_TABLE(_("Completion")));
|
||||
|
||||
ptr_infolist = hook_infolist_get (NULL, "alias_default", NULL, NULL);
|
||||
while (infolist_next (ptr_infolist))
|
||||
@@ -624,10 +648,10 @@ doc_gen_user_default_aliases (const char *path, const char *lang)
|
||||
ptr_completion = infolist_string(ptr_infolist, "completion");
|
||||
string_fprintf (file,
|
||||
"| /%s | /%s | %s\n",
|
||||
ESCAPE(infolist_string(ptr_infolist, "name")),
|
||||
ESCAPE(infolist_string(ptr_infolist, "command")),
|
||||
ESCAPE_TABLE(infolist_string(ptr_infolist, "name")),
|
||||
ESCAPE_TABLE(infolist_string(ptr_infolist, "command")),
|
||||
(ptr_completion && ptr_completion[0]) ?
|
||||
ESCAPE(ptr_completion) : "-");
|
||||
ESCAPE_TABLE(ptr_completion) : "-");
|
||||
}
|
||||
infolist_free (ptr_infolist);
|
||||
|
||||
@@ -663,8 +687,8 @@ doc_gen_user_irc_colors (const char *path, const char *lang)
|
||||
"[width=\"50%\",cols=\"^2m,3\",options=\"header\"]\n"
|
||||
"|===\n"
|
||||
"| %s | %s\n",
|
||||
ESCAPE(_("IRC color")),
|
||||
ESCAPE(_("WeeChat color")));
|
||||
ESCAPE_TABLE(_("IRC color")),
|
||||
ESCAPE_TABLE(_("WeeChat color")));
|
||||
|
||||
ptr_infolist = hook_infolist_get (NULL, "irc_color_weechat", NULL, NULL);
|
||||
while (infolist_next (ptr_infolist))
|
||||
@@ -672,8 +696,8 @@ doc_gen_user_irc_colors (const char *path, const char *lang)
|
||||
string_fprintf (
|
||||
file,
|
||||
"| %s | %s\n",
|
||||
ESCAPE(infolist_string(ptr_infolist, "color_irc")),
|
||||
ESCAPE(infolist_string(ptr_infolist, "color_weechat")));
|
||||
ESCAPE_TABLE(infolist_string(ptr_infolist, "color_irc")),
|
||||
ESCAPE_TABLE(infolist_string(ptr_infolist, "color_weechat")));
|
||||
}
|
||||
infolist_free (ptr_infolist);
|
||||
|
||||
@@ -737,10 +761,10 @@ doc_gen_api_infos (const char *path, const char *lang)
|
||||
"[width=\"100%\",cols=\"^1,^2,6,6\",options=\"header\"]\n"
|
||||
"|===\n"
|
||||
"| %s | %s | %s | %s\n",
|
||||
ESCAPE(_("Plugin")),
|
||||
ESCAPE(_("Name")),
|
||||
ESCAPE(_("Description")),
|
||||
ESCAPE(_("Arguments")));
|
||||
ESCAPE_TABLE(_("Plugin")),
|
||||
ESCAPE_TABLE(_("Name")),
|
||||
ESCAPE_TABLE(_("Description")),
|
||||
ESCAPE_TABLE(_("Arguments")));
|
||||
|
||||
list_hooks = arraylist_new (64, 1, 0,
|
||||
&doc_gen_hook_info_cmp_cb, NULL,
|
||||
@@ -758,10 +782,10 @@ doc_gen_api_infos (const char *path, const char *lang)
|
||||
string_fprintf (
|
||||
file,
|
||||
"| %s | %s | %s | %s\n",
|
||||
ESCAPE(PLUGIN(ptr_hook->plugin)),
|
||||
ESCAPE(HOOK_INFO(ptr_hook, info_name)),
|
||||
ESCAPE(TRANS(HOOK_INFO(ptr_hook, description))),
|
||||
ESCAPE(TRANS_DEF(HOOK_INFO(ptr_hook, args_description), "-")));
|
||||
ESCAPE_TABLE(PLUGIN(ptr_hook->plugin)),
|
||||
ESCAPE_TABLE(HOOK_INFO(ptr_hook, info_name)),
|
||||
ESCAPE_TABLE(TRANS(HOOK_INFO(ptr_hook, description))),
|
||||
ESCAPE_TABLE(TRANS_DEF(HOOK_INFO(ptr_hook, args_description), "-")));
|
||||
}
|
||||
|
||||
arraylist_free (list_hooks);
|
||||
@@ -826,11 +850,11 @@ doc_gen_api_infos_hashtable (const char *path, const char *lang)
|
||||
"[width=\"100%\",cols=\"^1,^2,6,6,8\",options=\"header\"]\n"
|
||||
"|===\n"
|
||||
"| %s | %s | %s | %s | %s\n",
|
||||
ESCAPE(_("Plugin")),
|
||||
ESCAPE(_("Name")),
|
||||
ESCAPE(_("Description")),
|
||||
ESCAPE(_("Hashtable (input)")),
|
||||
ESCAPE(_("Hashtable (output)")));
|
||||
ESCAPE_TABLE(_("Plugin")),
|
||||
ESCAPE_TABLE(_("Name")),
|
||||
ESCAPE_TABLE(_("Description")),
|
||||
ESCAPE_TABLE(_("Hashtable (input)")),
|
||||
ESCAPE_TABLE(_("Hashtable (output)")));
|
||||
|
||||
list_hooks = arraylist_new (64, 1, 0,
|
||||
&doc_gen_hook_info_hashtable_cmp_cb, NULL,
|
||||
@@ -848,10 +872,10 @@ doc_gen_api_infos_hashtable (const char *path, const char *lang)
|
||||
string_fprintf (
|
||||
file,
|
||||
"| %s | %s | %s | %s | %s\n",
|
||||
ESCAPE(PLUGIN(ptr_hook->plugin)),
|
||||
ESCAPE(HOOK_INFO(ptr_hook, info_name)),
|
||||
ESCAPE(TRANS(HOOK_INFO_HASHTABLE(ptr_hook, description))),
|
||||
ESCAPE(TRANS_DEF(HOOK_INFO_HASHTABLE(ptr_hook, args_description), "-")),
|
||||
ESCAPE_TABLE(PLUGIN(ptr_hook->plugin)),
|
||||
ESCAPE_TABLE(HOOK_INFO(ptr_hook, info_name)),
|
||||
ESCAPE_TABLE(TRANS(HOOK_INFO_HASHTABLE(ptr_hook, description))),
|
||||
ESCAPE_TABLE(TRANS_DEF(HOOK_INFO_HASHTABLE(ptr_hook, args_description), "-")),
|
||||
TRANS_DEF(HOOK_INFO_HASHTABLE(ptr_hook, output_description), "-"));
|
||||
}
|
||||
|
||||
@@ -917,11 +941,11 @@ doc_gen_api_infolists (const char *path, const char *lang)
|
||||
"[width=\"100%\",cols=\"^1,^2,5,5,5\",options=\"header\"]\n"
|
||||
"|===\n"
|
||||
"| %s | %s | %s | %s | %s\n",
|
||||
ESCAPE(_("Plugin")),
|
||||
ESCAPE(_("Name")),
|
||||
ESCAPE(_("Description")),
|
||||
ESCAPE(_("Pointer")),
|
||||
ESCAPE(_("Arguments")));
|
||||
ESCAPE_TABLE(_("Plugin")),
|
||||
ESCAPE_TABLE(_("Name")),
|
||||
ESCAPE_TABLE(_("Description")),
|
||||
ESCAPE_TABLE(_("Pointer")),
|
||||
ESCAPE_TABLE(_("Arguments")));
|
||||
|
||||
list_hooks = arraylist_new (64, 1, 0,
|
||||
&doc_gen_hook_infolist_cmp_cb, NULL,
|
||||
@@ -939,11 +963,11 @@ doc_gen_api_infolists (const char *path, const char *lang)
|
||||
string_fprintf (
|
||||
file,
|
||||
"| %s | %s | %s | %s | %s\n",
|
||||
ESCAPE(PLUGIN(ptr_hook->plugin)),
|
||||
ESCAPE(HOOK_INFOLIST(ptr_hook, infolist_name)),
|
||||
ESCAPE(TRANS(HOOK_INFOLIST(ptr_hook, description))),
|
||||
ESCAPE(TRANS_DEF(HOOK_INFOLIST(ptr_hook, pointer_description), "-")),
|
||||
ESCAPE(TRANS_DEF(HOOK_INFOLIST(ptr_hook, args_description), "-")));
|
||||
ESCAPE_TABLE(PLUGIN(ptr_hook->plugin)),
|
||||
ESCAPE_TABLE(HOOK_INFOLIST(ptr_hook, infolist_name)),
|
||||
ESCAPE_TABLE(TRANS(HOOK_INFOLIST(ptr_hook, description))),
|
||||
ESCAPE_TABLE(TRANS_DEF(HOOK_INFOLIST(ptr_hook, pointer_description), "-")),
|
||||
ESCAPE_TABLE(TRANS_DEF(HOOK_INFOLIST(ptr_hook, args_description), "-")));
|
||||
}
|
||||
|
||||
arraylist_free (list_hooks);
|
||||
@@ -1203,11 +1227,11 @@ doc_gen_api_hdata (const char *path, const char *lang)
|
||||
"[width=\"100%\",cols=\"^1,^2,2,2,5\",options=\"header\"]\n"
|
||||
"|===\n"
|
||||
"| %s | %s | %s | %s | %s\n\n",
|
||||
ESCAPE(_("Plugin")),
|
||||
ESCAPE(_("Name")),
|
||||
ESCAPE(_("Description")),
|
||||
ESCAPE(_("Lists")),
|
||||
ESCAPE(_("Variables")));
|
||||
ESCAPE_TABLE(_("Plugin")),
|
||||
ESCAPE_TABLE(_("Name")),
|
||||
ESCAPE_TABLE(_("Description")),
|
||||
ESCAPE_TABLE(_("Lists")),
|
||||
ESCAPE_TABLE(_("Variables")));
|
||||
|
||||
list_hooks = arraylist_new (64, 1, 0,
|
||||
&doc_gen_hook_hdata_cmp_cb, NULL,
|
||||
@@ -1227,15 +1251,15 @@ doc_gen_api_hdata (const char *path, const char *lang)
|
||||
HOOK_HDATA(ptr_hook, hdata_name));
|
||||
string_fprintf (file,
|
||||
"| %s\n",
|
||||
ESCAPE(PLUGIN(ptr_hook->plugin)));
|
||||
ESCAPE_TABLE(PLUGIN(ptr_hook->plugin)));
|
||||
string_fprintf (file,
|
||||
"| [[%s]]<<%s,%s>>\n",
|
||||
ESCAPE(str_anchor),
|
||||
ESCAPE(str_anchor),
|
||||
ESCAPE(HOOK_HDATA(ptr_hook, hdata_name)));
|
||||
ESCAPE_TABLE(str_anchor),
|
||||
ESCAPE_TABLE(str_anchor),
|
||||
ESCAPE_TABLE(HOOK_HDATA(ptr_hook, hdata_name)));
|
||||
string_fprintf (file,
|
||||
"| %s\n",
|
||||
ESCAPE(TRANS(HOOK_HDATA(ptr_hook, description))));
|
||||
ESCAPE_TABLE(TRANS(HOOK_HDATA(ptr_hook, description))));
|
||||
ptr_hdata = hook_hdata_get (NULL, HOOK_HDATA(ptr_hook, hdata_name));
|
||||
if (ptr_hdata)
|
||||
doc_gen_api_hdata_content (file, ptr_hdata);
|
||||
@@ -1303,9 +1327,9 @@ doc_gen_api_completions (const char *path, const char *lang)
|
||||
"[width=\"100%\",cols=\"^1,^2,7\",options=\"header\"]\n"
|
||||
"|===\n"
|
||||
"| %s | %s | %s\n",
|
||||
ESCAPE(_("Plugin")),
|
||||
ESCAPE(_("Name")),
|
||||
ESCAPE(_("Description")));
|
||||
ESCAPE_TABLE(_("Plugin")),
|
||||
ESCAPE_TABLE(_("Name")),
|
||||
ESCAPE_TABLE(_("Description")));
|
||||
|
||||
list_hooks = arraylist_new (64, 1, 0,
|
||||
&doc_gen_hook_completion_cmp_cb, NULL,
|
||||
@@ -1323,9 +1347,9 @@ doc_gen_api_completions (const char *path, const char *lang)
|
||||
string_fprintf (
|
||||
file,
|
||||
"| %s | %s | %s\n",
|
||||
ESCAPE(PLUGIN(ptr_hook->plugin)),
|
||||
ESCAPE(HOOK_COMPLETION(ptr_hook, completion_item)),
|
||||
ESCAPE(TRANS(HOOK_COMPLETION(ptr_hook, description))));
|
||||
ESCAPE_TABLE(PLUGIN(ptr_hook->plugin)),
|
||||
ESCAPE_TABLE(HOOK_COMPLETION(ptr_hook, completion_item)),
|
||||
ESCAPE_TABLE(TRANS(HOOK_COMPLETION(ptr_hook, description))));
|
||||
}
|
||||
|
||||
arraylist_free (list_hooks);
|
||||
@@ -1363,9 +1387,9 @@ doc_gen_api_url_options (const char *path, const char *lang)
|
||||
"[width=\"100%\",cols=\"2,^1,7\",options=\"header\"]\n"
|
||||
"|===\n"
|
||||
"| %s | %s ^(1)^ | %s ^(2)^\n",
|
||||
ESCAPE(_("Option")),
|
||||
ESCAPE(_("Type")),
|
||||
ESCAPE(_("Constants")));
|
||||
ESCAPE_TABLE(_("Option")),
|
||||
ESCAPE_TABLE(_("Type")),
|
||||
ESCAPE_TABLE(_("Constants")));
|
||||
|
||||
for (i = 0; url_options[i].name; i++)
|
||||
{
|
||||
@@ -1373,8 +1397,8 @@ doc_gen_api_url_options (const char *path, const char *lang)
|
||||
string_fprintf (
|
||||
file,
|
||||
"| %s | %s |",
|
||||
ESCAPE(name),
|
||||
ESCAPE(url_type_string[url_options[i].type]));
|
||||
ESCAPE_TABLE(name),
|
||||
ESCAPE_TABLE(url_type_string[url_options[i].type]));
|
||||
if (name)
|
||||
free (name);
|
||||
if (url_options[i].constants)
|
||||
@@ -1450,9 +1474,9 @@ doc_gen_api_plugins_priority (const char *path, const char *lang)
|
||||
"[width=\"30%\",cols=\"1,3,2\",options=\"header\"]\n"
|
||||
"|===\n"
|
||||
"| %s | %s | %s\n",
|
||||
ESCAPE(_("Rank")),
|
||||
ESCAPE(_("Plugin")),
|
||||
ESCAPE(_("Priority")));
|
||||
ESCAPE_TABLE(_("Rank")),
|
||||
ESCAPE_TABLE(_("Plugin")),
|
||||
ESCAPE_TABLE(_("Priority")));
|
||||
|
||||
list_plugins = arraylist_new (64, 1, 0,
|
||||
&doc_gen_plugin_cmp_cb, NULL,
|
||||
@@ -1536,9 +1560,9 @@ doc_gen_api_config_priority (const char *path, const char *lang)
|
||||
"[width=\"30%\",cols=\"1,3,2\",options=\"header\"]\n"
|
||||
"|===\n"
|
||||
"| %s | %s | %s\n",
|
||||
ESCAPE(_("Rank")),
|
||||
ESCAPE(_("File")),
|
||||
ESCAPE(_("Priority")));
|
||||
ESCAPE_TABLE(_("Rank")),
|
||||
ESCAPE_TABLE(_("File")),
|
||||
ESCAPE_TABLE(_("Priority")));
|
||||
|
||||
list_configs = arraylist_new (64, 1, 0,
|
||||
&doc_gen_config_cmp_cb, NULL,
|
||||
@@ -1628,7 +1652,7 @@ doc_generate (const char *path)
|
||||
{
|
||||
string_fprintf (
|
||||
stderr,
|
||||
"doc generator: ERROR: failed to create directory \"%s\")",
|
||||
"doc generator: ERROR: failed to create directory \"%s\")\n",
|
||||
path);
|
||||
goto end;
|
||||
}
|
||||
@@ -1645,7 +1669,17 @@ doc_generate (const char *path)
|
||||
for (i = 0; locales[i]; i++)
|
||||
{
|
||||
setenv ("LANGUAGE", locales[i], 1);
|
||||
setlocale (LC_ALL, locales[i]);
|
||||
if (!setlocale (LC_ALL, locales[i]))
|
||||
{
|
||||
/* warning on missing locale */
|
||||
string_fprintf (
|
||||
stderr,
|
||||
"doc generator: WARNING: failed to set locale \"%s\", "
|
||||
"docs will include auto-generated English content\n",
|
||||
locales[i]);
|
||||
/* fallback to English */
|
||||
setlocale (LC_ALL, "C");
|
||||
}
|
||||
memcpy (lang, locales[i], 2);
|
||||
lang[2] = '\0';
|
||||
for (j = 0; doc_gen_functions[j]; j++)
|
||||
|
||||
@@ -397,11 +397,13 @@ gui_key_flush (int paste)
|
||||
* code which is not UTF-8 valid)
|
||||
*/
|
||||
if (!paste
|
||||
&& (i > gui_key_last_key_pressed_sent)
|
||||
&& (!gui_mouse_event_pending
|
||||
|| utf8_is_valid (key_str, -1, NULL)))
|
||||
{
|
||||
(void) hook_signal_send ("key_pressed",
|
||||
WEECHAT_HOOK_SIGNAL_STRING, key_str);
|
||||
gui_key_last_key_pressed_sent = i;
|
||||
}
|
||||
|
||||
if (gui_current_window->buffer->text_search != GUI_TEXT_SEARCH_DISABLED)
|
||||
|
||||
@@ -443,10 +443,18 @@ gui_bar_item_custom_new (const char *name, const char *conditions,
|
||||
name,
|
||||
GUI_BAR_ITEM_CUSTOM_OPTION_CONDITIONS,
|
||||
conditions);
|
||||
if (!option_conditions)
|
||||
return NULL;
|
||||
|
||||
option_content = gui_bar_item_custom_create_option (
|
||||
name,
|
||||
GUI_BAR_ITEM_CUSTOM_OPTION_CONTENT,
|
||||
content);
|
||||
if (!option_content)
|
||||
{
|
||||
config_file_option_free (option_conditions, 0);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
new_bar_item_custom = gui_bar_item_custom_new_with_options (
|
||||
name,
|
||||
@@ -517,21 +525,48 @@ int
|
||||
gui_bar_item_custom_rename (struct t_gui_bar_item_custom *item,
|
||||
const char *new_name)
|
||||
{
|
||||
char *old_name, *option_name;
|
||||
int i, length;
|
||||
|
||||
if (!item || !gui_bar_item_custom_name_valid (new_name))
|
||||
return 0;
|
||||
|
||||
if (gui_bar_item_custom_search (new_name))
|
||||
return 0;
|
||||
|
||||
old_name = strdup (item->name);
|
||||
if (!old_name)
|
||||
return 0;
|
||||
|
||||
length = strlen (new_name) + 128;
|
||||
option_name = malloc (length);
|
||||
if (!option_name)
|
||||
{
|
||||
free (old_name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
free (item->bar_item->name);
|
||||
item->bar_item->name = strdup (new_name);
|
||||
|
||||
gui_bar_item_update (item->name);
|
||||
gui_bar_item_update (item->bar_item->name);
|
||||
|
||||
free (item->name);
|
||||
item->name = strdup (new_name);
|
||||
|
||||
for (i = 0; i < GUI_BAR_ITEM_CUSTOM_NUM_OPTIONS; i++)
|
||||
{
|
||||
snprintf (option_name, length,
|
||||
"%s.%s",
|
||||
new_name,
|
||||
gui_bar_item_custom_option_string[i]);
|
||||
config_file_option_rename (item->options[i], option_name);
|
||||
}
|
||||
|
||||
gui_bar_item_update (old_name);
|
||||
gui_bar_item_update (item->name);
|
||||
|
||||
free (old_name);
|
||||
free (option_name);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1142,7 +1142,7 @@ gui_input_delete_line (struct t_gui_buffer *buffer)
|
||||
end_of_line = (char *)utf8_end_of_line (start);
|
||||
|
||||
size_deleted = end_of_line - beginning_of_line;
|
||||
length_deleted = utf8_strnlen (start, size_deleted);
|
||||
length_deleted = utf8_strnlen (beginning_of_line, size_deleted);
|
||||
|
||||
memmove (beginning_of_line, end_of_line, strlen (end_of_line));
|
||||
|
||||
|
||||
@@ -94,6 +94,7 @@ int gui_key_grab_delay = 0; /* delay for grab (default is 500) */
|
||||
int *gui_key_buffer = NULL; /* input buffer (for paste detection) */
|
||||
int gui_key_buffer_alloc = 0; /* input buffer allocated size */
|
||||
int gui_key_buffer_size = 0; /* input buffer size in bytes */
|
||||
int gui_key_last_key_pressed_sent = -1;
|
||||
|
||||
int gui_key_paste_pending = 0; /* 1 is big paste was detected and */
|
||||
/* WeeChat is asking user what to do */
|
||||
@@ -2388,6 +2389,9 @@ gui_key_pressed (const char *key_str)
|
||||
|
||||
rc_expand = gui_key_expand (gui_key_combo, &key_name, &key_name_alias);
|
||||
|
||||
if (!rc_expand)
|
||||
goto end_no_input;
|
||||
|
||||
ptr_key = NULL;
|
||||
exact_match = 0;
|
||||
|
||||
@@ -2690,6 +2694,7 @@ gui_key_buffer_reset ()
|
||||
gui_key_buffer_optimize ();
|
||||
}
|
||||
gui_key_paste_lines = 0;
|
||||
gui_key_last_key_pressed_sent = -1;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -82,6 +82,7 @@ extern int gui_key_grab;
|
||||
extern int gui_key_grab_count;
|
||||
extern int *gui_key_buffer;
|
||||
extern int gui_key_buffer_size;
|
||||
extern int gui_key_last_key_pressed_sent;
|
||||
extern int gui_key_paste_pending;
|
||||
extern int gui_key_paste_bracketed;
|
||||
extern time_t gui_key_last_activity_time;
|
||||
|
||||
@@ -462,7 +462,7 @@ irc_channel_create_buffer (struct t_irc_server *server,
|
||||
if (noswitch
|
||||
|| (!manual_join && !autojoin_join)
|
||||
|| (manual_join && !weechat_config_boolean (irc_config_look_buffer_switch_join))
|
||||
|| (autojoin_join && !weechat_config_boolean (irc_config_look_buffer_switch_autojoin)))
|
||||
|| (!manual_join && autojoin_join && !weechat_config_boolean (irc_config_look_buffer_switch_autojoin)))
|
||||
{
|
||||
switch_to_channel = 0;
|
||||
}
|
||||
|
||||
@@ -529,6 +529,8 @@ irc_message_parse_to_hashtable (struct t_irc_server *server,
|
||||
free (arguments);
|
||||
if (text)
|
||||
free (text);
|
||||
if (params)
|
||||
weechat_string_free_split (params);
|
||||
|
||||
return hashtable;
|
||||
}
|
||||
|
||||
@@ -2505,8 +2505,11 @@ IRC_PROTOCOL_CALLBACK(notice)
|
||||
is_channel = irc_channel_is_channel (server, pos_target);
|
||||
is_channel_orig = is_channel;
|
||||
if (is_channel)
|
||||
{
|
||||
channel = strdup (pos_target);
|
||||
else if (weechat_config_boolean (irc_config_look_notice_welcome_redirect))
|
||||
}
|
||||
else if (weechat_config_boolean (irc_config_look_notice_welcome_redirect)
|
||||
&& (irc_server_strcasecmp (server, server->nick, pos_target) == 0))
|
||||
{
|
||||
end_char = ' ';
|
||||
switch (pos_args[0])
|
||||
@@ -2995,7 +2998,7 @@ irc_protocol_privmsg_display_ctcp_send (struct t_irc_server *server,
|
||||
if (!arguments || !arguments[0])
|
||||
return;
|
||||
|
||||
pos_end = strchr (arguments + 1, '\01');
|
||||
pos_end = strrchr (arguments + 1, '\01');
|
||||
if (!pos_end)
|
||||
return;
|
||||
|
||||
|
||||
@@ -206,7 +206,7 @@ relay_irc_sendf (struct t_relay_client *client, const char *format, ...)
|
||||
const char *str_message, *ptr_msg1, *ptr_msg2;
|
||||
struct t_hashtable *hashtable_in, *hashtable_out;
|
||||
|
||||
if (!client)
|
||||
if (!client || !format)
|
||||
return;
|
||||
|
||||
weechat_va_format (format);
|
||||
@@ -1581,6 +1581,53 @@ relay_irc_recv_command_capab (struct t_relay_client *client,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Parses CTCP message and return CTCP type and parameters.
|
||||
* If message is not a valid CTCP format, type and parameters are set to NULL.
|
||||
*
|
||||
* Examples:
|
||||
*
|
||||
* message | type | params
|
||||
* --------------------------|-----------|-----------
|
||||
* "\01ACTION is testing\01" | "ACTION" | "is testing"
|
||||
* "\01VERSION\01" | "VERSION" | NULL
|
||||
* "\01VERSION" | NULL | NULL
|
||||
* "test" | NULL | NULL
|
||||
*/
|
||||
|
||||
void
|
||||
relay_irc_parse_ctcp (const char *message, char **ctcp_type, char **ctcp_params)
|
||||
{
|
||||
const char *pos_space, *pos_end;
|
||||
|
||||
if (!ctcp_type || !ctcp_params)
|
||||
return;
|
||||
|
||||
*ctcp_type = NULL;
|
||||
*ctcp_params = NULL;
|
||||
|
||||
if (!message)
|
||||
return;
|
||||
|
||||
if (message[0] != '\01')
|
||||
return;
|
||||
|
||||
pos_end = strrchr (message + 1, '\01');
|
||||
if (!pos_end)
|
||||
return;
|
||||
|
||||
pos_space = strchr (message, ' ' );
|
||||
if (pos_space && (pos_space < pos_end))
|
||||
{
|
||||
*ctcp_type = weechat_strndup (message + 1, pos_space - message - 1);
|
||||
*ctcp_params = weechat_strndup (pos_space + 1, pos_end - pos_space - 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
*ctcp_type = weechat_strndup (message + 1, pos_end - message - 1);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Reads one message from client.
|
||||
*/
|
||||
@@ -1595,7 +1642,7 @@ relay_irc_recv (struct t_relay_client *client, const char *data)
|
||||
char str_time[128], str_signal[128], str_server_channel[256], *nick;
|
||||
char str_param[128], *str_args, *version, str_command[128], **params;
|
||||
char *pos, *password, *irc_is_channel, *info, *error, *str_cmd_lower;
|
||||
char modifier_data[128], *new_data;
|
||||
char modifier_data[128], *new_data, *ctcp_type, *ctcp_params;
|
||||
long num_params;
|
||||
int i, redirect_msg;
|
||||
|
||||
@@ -1933,26 +1980,61 @@ relay_irc_recv (struct t_relay_client *client, const char *data)
|
||||
{
|
||||
str_args = weechat_string_rebuild_split_string (
|
||||
(const char **)params, " ", 1, -1);
|
||||
relay_irc_parse_ctcp (str_args, &ctcp_type, &ctcp_params);
|
||||
irc_is_channel = weechat_info_get ("irc_is_channel", params[0]);
|
||||
if (irc_is_channel && (strcmp (irc_is_channel, "1") == 0))
|
||||
{
|
||||
relay_irc_input_send (client, params[0],
|
||||
"priority_high,user_message",
|
||||
"%s",
|
||||
(str_args) ? str_args : "");
|
||||
if (ctcp_type)
|
||||
{
|
||||
relay_irc_input_send (client, NULL,
|
||||
"priority_high",
|
||||
"/ctcp %s %s%s%s",
|
||||
params[0],
|
||||
ctcp_type,
|
||||
(ctcp_params) ? " " : "",
|
||||
(ctcp_params) ? ctcp_params : "");
|
||||
}
|
||||
else
|
||||
{
|
||||
relay_irc_input_send (client, params[0],
|
||||
"priority_high,user_message",
|
||||
"%s",
|
||||
(str_args) ? str_args : "");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
relay_irc_input_send (client, NULL,
|
||||
"priority_high",
|
||||
"/query %s %s",
|
||||
params[0],
|
||||
(str_args) ? str_args : "");
|
||||
if (ctcp_type)
|
||||
{
|
||||
relay_irc_input_send (client, NULL,
|
||||
"priority_high",
|
||||
"/query %s",
|
||||
params[0]);
|
||||
relay_irc_input_send (client, NULL,
|
||||
"priority_high",
|
||||
"/ctcp %s %s%s%s",
|
||||
params[0],
|
||||
ctcp_type,
|
||||
(ctcp_params) ? " " : "",
|
||||
(ctcp_params) ? ctcp_params : "");
|
||||
}
|
||||
else
|
||||
{
|
||||
relay_irc_input_send (client, NULL,
|
||||
"priority_high",
|
||||
"/query %s %s",
|
||||
params[0],
|
||||
(str_args) ? str_args : "");
|
||||
}
|
||||
}
|
||||
if (str_args)
|
||||
free (str_args);
|
||||
if (irc_is_channel)
|
||||
free (irc_is_channel);
|
||||
if (ctcp_type)
|
||||
free (ctcp_type);
|
||||
if (ctcp_params)
|
||||
free (ctcp_params);
|
||||
}
|
||||
}
|
||||
else if (!relay_irc_command_ignored (irc_command))
|
||||
|
||||
@@ -526,7 +526,7 @@ TEST_GROUP(CoreHdataWithList)
|
||||
item->test_string = strdup ("item2");
|
||||
item->test_string2 = strdup ("string2");
|
||||
item->test_string3 = NULL;
|
||||
ptr_item1->test_string_null = NULL;
|
||||
item->test_string_null = NULL;
|
||||
item->test_shared_string = string_shared_get ("item2_shared");
|
||||
strcpy (item->test_array_2_words_fixed_size[0], "item2-word1");
|
||||
strcpy (item->test_array_2_words_fixed_size[1], "item2-word2");
|
||||
|
||||
@@ -455,6 +455,9 @@ TEST(GuiBarItemCustom, Rename)
|
||||
CHECK(new_item->bar_item);
|
||||
STRCMP_EQUAL("test3", new_item->bar_item->name);
|
||||
|
||||
STRCMP_EQUAL("test3.conditions", new_item->options[GUI_BAR_ITEM_CUSTOM_OPTION_CONDITIONS]->name);
|
||||
STRCMP_EQUAL("test3.content", new_item->options[GUI_BAR_ITEM_CUSTOM_OPTION_CONTENT]->name);
|
||||
|
||||
gui_bar_item_custom_free (new_item);
|
||||
gui_bar_item_custom_free (new_item2);
|
||||
}
|
||||
|
||||
@@ -2423,7 +2423,7 @@ TEST(IrcProtocolWithServer, notice)
|
||||
|
||||
/*
|
||||
* notice to channel/user from self nick
|
||||
* (case of bouncer of if echo-message capability is enabled)
|
||||
* (case of bouncer or if echo-message capability is enabled)
|
||||
*/
|
||||
RECV(":alice!user@host NOTICE #test :a notice ");
|
||||
CHECK_CHAN("--", "Notice(alice) -> #test: a notice ",
|
||||
@@ -2440,7 +2440,7 @@ TEST(IrcProtocolWithServer, notice)
|
||||
|
||||
/*
|
||||
* notice to ops of channel from self nick
|
||||
* (case of bouncer of if echo-message capability is enabled)
|
||||
* (case of bouncer or if echo-message capability is enabled)
|
||||
*/
|
||||
RECV(":alice!user@host NOTICE @#test :a notice ");
|
||||
CHECK_CHAN("--", "Notice(alice) -> @#test: a notice ",
|
||||
@@ -2449,7 +2449,7 @@ TEST(IrcProtocolWithServer, notice)
|
||||
|
||||
/*
|
||||
* notice from self nick
|
||||
* (case of bouncer of if echo-message capability is enabled)
|
||||
* (case of bouncer or if echo-message capability is enabled)
|
||||
*/
|
||||
RECV(":alice!user@host NOTICE alice :a notice ");
|
||||
CHECK_SRV("--", "Notice -> alice: a notice ",
|
||||
@@ -2481,6 +2481,14 @@ TEST(IrcProtocolWithServer, notice)
|
||||
CHECK_CHAN("--", "PvNotice(bob): a notice ",
|
||||
"irc_notice,nick_bob,host_user@host,log1");
|
||||
|
||||
/*
|
||||
* notice to another nick with channel name at beginning
|
||||
* (case of a notice sent if echo-message capability is enabled)
|
||||
*/
|
||||
RECV(":alice!user@host NOTICE bob :[#test] a notice ");
|
||||
CHECK_SRV("--", "Notice -> bob: [#test] a notice ",
|
||||
"irc_notice,notify_private,nick_alice,host_user@host,log1");
|
||||
|
||||
/* broken CTCP to channel */
|
||||
RECV(":bob!user@host NOTICE #test :\01");
|
||||
CHECK_SRV("--", "CTCP reply from bob: ",
|
||||
@@ -2743,7 +2751,7 @@ TEST(IrcProtocolWithServer, privmsg)
|
||||
|
||||
/*
|
||||
* message to channel/user from self nick
|
||||
* (case of bouncer of if echo-message capability is enabled)
|
||||
* (case of bouncer or if echo-message capability is enabled)
|
||||
*/
|
||||
RECV(":alice!user@host PRIVMSG #test :this is the message ");
|
||||
CHECK_CHAN("alice", "this is the message ",
|
||||
@@ -2757,7 +2765,7 @@ TEST(IrcProtocolWithServer, privmsg)
|
||||
|
||||
/*
|
||||
* message to ops of channel from self nick
|
||||
* (case of bouncer of if echo-message capability is enabled)
|
||||
* (case of bouncer or if echo-message capability is enabled)
|
||||
*/
|
||||
RECV(":alice!user@host PRIVMSG @#test :this is the message ");
|
||||
CHECK_CHAN("--", "Msg(alice) -> @#test: this is the message ",
|
||||
@@ -2766,7 +2774,7 @@ TEST(IrcProtocolWithServer, privmsg)
|
||||
|
||||
/*
|
||||
* message from self nick in private
|
||||
* (case of bouncer of if echo-message capability is enabled)
|
||||
* (case of bouncer or if echo-message capability is enabled)
|
||||
*/
|
||||
RECV(":alice!user@host PRIVMSG alice :this is the message ");
|
||||
CHECK_PV("alice", "alice", "this is the message ",
|
||||
@@ -2775,7 +2783,7 @@ TEST(IrcProtocolWithServer, privmsg)
|
||||
|
||||
/*
|
||||
* message from self nick in private, with password hidden (nickserv)
|
||||
* (case of bouncer of if echo-message capability is enabled)
|
||||
* (case of bouncer or if echo-message capability is enabled)
|
||||
*/
|
||||
RECV(":alice!user@host PRIVMSG nickserv :identify secret");
|
||||
CHECK_PV("nickserv", "alice", "identify ******",
|
||||
@@ -2865,8 +2873,8 @@ TEST(IrcProtocolWithServer, privmsg)
|
||||
CHECK_CHAN(" *", "bob",
|
||||
"irc_privmsg,irc_action,notify_message,nick_bob,"
|
||||
"host_user@host,log1");
|
||||
RECV(":bob!user@host PRIVMSG #test :\01ACTION is testing\01");
|
||||
CHECK_CHAN(" *", "bob is testing",
|
||||
RECV(":bob!user@host PRIVMSG #test :\01ACTION is testing with \02bold\02\01");
|
||||
CHECK_CHAN(" *", "bob is testing with bold",
|
||||
"irc_privmsg,irc_action,notify_message,nick_bob,"
|
||||
"host_user@host,log1");
|
||||
RECV(":bob!user@host PRIVMSG #test :\01VERSION\01");
|
||||
@@ -2884,7 +2892,7 @@ TEST(IrcProtocolWithServer, privmsg)
|
||||
|
||||
/*
|
||||
* valid CTCP to channel from self nick
|
||||
* (case of bouncer of if echo-message capability is enabled)
|
||||
* (case of bouncer or if echo-message capability is enabled)
|
||||
*/
|
||||
RECV(":alice!user@host PRIVMSG #test :\01VERSION\01");
|
||||
CHECK_CHAN("--", "CTCP query to #test: VERSION",
|
||||
@@ -2894,14 +2902,14 @@ TEST(IrcProtocolWithServer, privmsg)
|
||||
CHECK_CHAN(" *", "alice",
|
||||
"irc_privmsg,irc_action,self_msg,notify_none,no_highlight,"
|
||||
"nick_alice,host_user@host,log1");
|
||||
RECV(":alice!user@host PRIVMSG #test :\01ACTION is testing\01");
|
||||
CHECK_CHAN(" *", "alice is testing",
|
||||
RECV(":alice!user@host PRIVMSG #test :\01ACTION is testing with \02bold\02\01");
|
||||
CHECK_CHAN(" *", "alice is testing with bold",
|
||||
"irc_privmsg,irc_action,self_msg,notify_none,no_highlight,"
|
||||
"nick_alice,host_user@host,log1");
|
||||
|
||||
/*
|
||||
* valid CTCP to ops of channel from self nick
|
||||
* (case of bouncer of if echo-message capability is enabled)
|
||||
* (case of bouncer or if echo-message capability is enabled)
|
||||
*/
|
||||
RECV(":alice!user@host PRIVMSG @#test :\01ACTION\01");
|
||||
CHECK_CHAN("--", "Action -> @#test: alice",
|
||||
@@ -2948,7 +2956,7 @@ TEST(IrcProtocolWithServer, privmsg)
|
||||
|
||||
/*
|
||||
* valid CTCP to channel from self nick
|
||||
* (case of bouncer of if echo-message capability is enabled)
|
||||
* (case of bouncer or if echo-message capability is enabled)
|
||||
*/
|
||||
RECV(":alice!user@host PRIVMSG alice :\01CLIENTINFO\01");
|
||||
if (i == 0)
|
||||
|
||||
@@ -49,6 +49,8 @@ extern void relay_irc_sendf (struct t_relay_client *client,
|
||||
const char *format, ...);
|
||||
extern void relay_irc_parse_cap_message (struct t_relay_client *client,
|
||||
struct t_hashtable *parsed_msg);
|
||||
extern void relay_irc_parse_ctcp (const char *message,
|
||||
char **ctcp_type, char **ctcp_params);
|
||||
extern int relay_irc_tag_relay_client_id (const char *tags);
|
||||
extern void relay_irc_input_send (struct t_relay_client *client,
|
||||
const char *irc_channel,
|
||||
@@ -487,7 +489,6 @@ TEST(RelayIrc, RelayIrcMessageParse)
|
||||
|
||||
TEST(RelayIrcWithClient, RelayIrcSendf)
|
||||
{
|
||||
|
||||
relay_irc_sendf (NULL, NULL);
|
||||
relay_irc_sendf (NULL, "test");
|
||||
relay_irc_sendf (ptr_relay_client, NULL);
|
||||
@@ -813,6 +814,72 @@ TEST(RelayIrcWithClient, RelayIrcRecvCommandCapab)
|
||||
LONGS_EQUAL(1, RELAY_IRC_DATA(ptr_relay_client, cap_end_received));
|
||||
}
|
||||
|
||||
/*
|
||||
* Tests functions:
|
||||
* relay_irc_parse_ctcp
|
||||
*/
|
||||
|
||||
TEST(RelayIrcWithClient, RelayIrcParseCtcp)
|
||||
{
|
||||
char *ctcp_type, *ctcp_params;
|
||||
|
||||
relay_irc_parse_ctcp (NULL, NULL, NULL);
|
||||
relay_irc_parse_ctcp ("test", NULL, NULL);
|
||||
|
||||
ctcp_type = (char *)0x01;
|
||||
ctcp_params = (char *)0x01;
|
||||
relay_irc_parse_ctcp (NULL, &ctcp_type, &ctcp_params);
|
||||
POINTERS_EQUAL(NULL, ctcp_type);
|
||||
POINTERS_EQUAL(NULL, ctcp_params);
|
||||
|
||||
ctcp_type = (char *)0x01;
|
||||
ctcp_params = (char *)0x01;
|
||||
relay_irc_parse_ctcp ("\01ACTION is testing\01", &ctcp_type, &ctcp_params);
|
||||
STRCMP_EQUAL("ACTION", ctcp_type);
|
||||
STRCMP_EQUAL("is testing", ctcp_params);
|
||||
free (ctcp_type);
|
||||
free (ctcp_params);
|
||||
|
||||
ctcp_type = (char *)0x01;
|
||||
ctcp_params = (char *)0x01;
|
||||
relay_irc_parse_ctcp ("\01ACTION is testing \01 extra", &ctcp_type, &ctcp_params);
|
||||
STRCMP_EQUAL("ACTION", ctcp_type);
|
||||
STRCMP_EQUAL(" is testing ", ctcp_params);
|
||||
free (ctcp_type);
|
||||
free (ctcp_params);
|
||||
|
||||
ctcp_type = (char *)0x01;
|
||||
ctcp_params = (char *)0x01;
|
||||
relay_irc_parse_ctcp ("\01VERSION\01", &ctcp_type, &ctcp_params);
|
||||
STRCMP_EQUAL("VERSION", ctcp_type);
|
||||
POINTERS_EQUAL(NULL, ctcp_params);
|
||||
free (ctcp_type);
|
||||
|
||||
ctcp_type = (char *)0x01;
|
||||
ctcp_params = (char *)0x01;
|
||||
relay_irc_parse_ctcp ("\01ACTION is testing", &ctcp_type, &ctcp_params);
|
||||
POINTERS_EQUAL(NULL, ctcp_type);
|
||||
POINTERS_EQUAL(NULL, ctcp_params);
|
||||
|
||||
ctcp_type = (char *)0x01;
|
||||
ctcp_params = (char *)0x01;
|
||||
relay_irc_parse_ctcp ("\01VERSION", &ctcp_type, &ctcp_params);
|
||||
POINTERS_EQUAL(NULL, ctcp_type);
|
||||
POINTERS_EQUAL(NULL, ctcp_params);
|
||||
|
||||
ctcp_type = (char *)0x01;
|
||||
ctcp_params = (char *)0x01;
|
||||
relay_irc_parse_ctcp ("test", &ctcp_type, &ctcp_params);
|
||||
POINTERS_EQUAL(NULL, ctcp_type);
|
||||
POINTERS_EQUAL(NULL, ctcp_params);
|
||||
|
||||
ctcp_type = (char *)0x01;
|
||||
ctcp_params = (char *)0x01;
|
||||
relay_irc_parse_ctcp ("", &ctcp_type, &ctcp_params);
|
||||
POINTERS_EQUAL(NULL, ctcp_type);
|
||||
POINTERS_EQUAL(NULL, ctcp_params);
|
||||
}
|
||||
|
||||
/*
|
||||
* Tests functions:
|
||||
* relay_irc_recv
|
||||
|
||||
+2
-2
@@ -39,8 +39,8 @@
|
||||
# devel-number the devel version as hex number ("0x04010000" for "4.1.0-dev")
|
||||
#
|
||||
|
||||
WEECHAT_STABLE="4.0.1"
|
||||
WEECHAT_DEVEL="4.0.1"
|
||||
WEECHAT_STABLE="4.0.3"
|
||||
WEECHAT_DEVEL="4.0.3"
|
||||
|
||||
STABLE_MAJOR=$(echo "${WEECHAT_STABLE}" | cut -d"." -f1)
|
||||
STABLE_MINOR=$(echo "${WEECHAT_STABLE}" | cut -d"." -f2)
|
||||
|
||||
Reference in New Issue
Block a user