mirror of
https://github.com/weechat/weechat.git
synced 2026-06-12 14:14:48 +02:00
Compare commits
27 Commits
2e88586ade
...
v4.2.3
| Author | SHA1 | Date | |
|---|---|---|---|
| 82f4f83f2e | |||
| fc4eeeec97 | |||
| 101ed2b56a | |||
| d8e3dee0d3 | |||
| 46f671abe4 | |||
| 88b0e90295 | |||
| abb13d6bcc | |||
| 0e074aa4bb | |||
| ea87d42b49 | |||
| 88cd804eb7 | |||
| 3d5d5a64ee | |||
| fe14cedf92 | |||
| 90b96f9cdd | |||
| c6e11ac95b | |||
| 4f6af9cf81 | |||
| 641f477c3c | |||
| 0762856b85 | |||
| c576af67b3 | |||
| 9aa2cbd365 | |||
| 798e6fe4cc | |||
| 65a7d92b93 | |||
| b43fcac7d6 | |||
| 9b846cb947 | |||
| 61bcf8dc02 | |||
| 9ad62dec1e | |||
| f9cc10005c | |||
| e42e632408 |
@@ -85,7 +85,6 @@ jobs:
|
||||
matrix:
|
||||
os:
|
||||
- macos-12
|
||||
- macos-11
|
||||
config:
|
||||
- { name: "gcc", cc: "gcc", cxx: "g++" }
|
||||
- { name: "clang", cc: "clang", cxx: "clang++" }
|
||||
|
||||
+41
-2
@@ -10,6 +10,44 @@ 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.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]]
|
||||
== Version 4.2.2 (2024-04-07)
|
||||
|
||||
Bug fixes::
|
||||
|
||||
* core: fix reset to initial scroll position after search of text in buffer (issue #2093)
|
||||
* core: add missing mouse events "alt-ctrl-button2" and "alt-ctrl-button3"
|
||||
* exec: remove trailing space on buffers with free content when line numbers are not displayed
|
||||
* exec: add missing exec tags in lines of buffers with free content (issue #2086)
|
||||
* irc: add missing tags on self action messages when capability echo-message is enabled (issue #2074)
|
||||
* python: fix truncation of unsigned long long integer returned by function string_parse_size
|
||||
* relay: set the last IRC client disconnection time only after a successful connection (issue #2103)
|
||||
* script: always display list of scripts when searching scripts with `/script search` (issue #2077)
|
||||
* script: fix default mouse keys (issue #2076)
|
||||
* scripts: fix crash on script unload when a hook is created in a buffer close callback (issue #2067)
|
||||
* tcl: fix truncation of long integer returned by function hdata_long
|
||||
* trigger: fix memory leak when adding a new trigger with `/trigger` command
|
||||
|
||||
Tests::
|
||||
|
||||
* core: fix tests on function strftimeval on Alpine
|
||||
|
||||
[[v4.2.1]]
|
||||
== Version 4.2.1 (2024-01-22)
|
||||
|
||||
Bug fixes::
|
||||
|
||||
* irc: fix random date displayed when a received message contains tags but no "time" (issue #2064)
|
||||
|
||||
[[v4.2.0]]
|
||||
== Version 4.2.0 (2024-01-21)
|
||||
|
||||
@@ -28,6 +66,8 @@ New features::
|
||||
* 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, alias, trigger: allow wildcard in commands `/bar`, `/item`, `/proxy`, `/alias` and `/trigger` (issue #1956)
|
||||
* api: add support of format/translation of command arguments description line by line (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 argument "date_usec" in hook_print callback (issue #649)
|
||||
* api: add property "type" in function buffer_get_string
|
||||
@@ -132,8 +172,7 @@ New features::
|
||||
* core: add options weechat.buffer.* to save buffer properties set by user, add option `setauto` in command `/buffer` (issue #352)
|
||||
* core: add parameters and key bindings to move to edges of current area with commands `/cursor go` and `/cursor move` (issue #1282)
|
||||
* core: add variables "_chat_focused_line_bol" and "_chat_focused_line_eol" in focus data (issue #1955)
|
||||
* 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 hook_url, add option `url` in command `/debug` (issue #1723)
|
||||
* api: add support of path to variable and hashtable comparison in function hdata_compare (issue #1066)
|
||||
* api: add infos "nick_color_ignore_case" and "nick_color_name_ignore_case" (issue #194)
|
||||
* api: add info "buffer" (issue #1962)
|
||||
|
||||
@@ -11,6 +11,35 @@ It is recommended to read it when upgrading to a new stable version. +
|
||||
For a complete list of changes, please look at ChangeLog.
|
||||
|
||||
|
||||
[[v4.2.3]]
|
||||
== Version 4.2.3 (2024-05-31)
|
||||
|
||||
No release notes.
|
||||
|
||||
[[v4.2.2]]
|
||||
== Version 4.2.2 (2024-04-07)
|
||||
|
||||
[[v4.2.2_script_keys]]
|
||||
=== Script keys
|
||||
|
||||
Some arguments to the `/script` command were renamed in version 4.1.0, but the
|
||||
keys using these arguments were not changed at same time.
|
||||
|
||||
They're now using the new arguments by default, but you must reset manually
|
||||
the keys with the following commands:
|
||||
|
||||
----
|
||||
/reset weechat.key_mouse.@chat(script.scripts):button1
|
||||
/reset weechat.key_mouse.@chat(script.scripts):button2
|
||||
/reset weechat.key_mouse.@chat(script.scripts):wheeldown
|
||||
/reset weechat.key_mouse.@chat(script.scripts):wheelup
|
||||
----
|
||||
|
||||
[[v4.2.1]]
|
||||
== Version 4.2.1 (2024-01-22)
|
||||
|
||||
No release notes.
|
||||
|
||||
[[v4.2.0]]
|
||||
== Version 4.2.0 (2024-01-21)
|
||||
|
||||
|
||||
@@ -1857,10 +1857,10 @@ wurde (Befehl: `+/mouse toggle+`).
|
||||
| kbd:[▼] | - | chat: /list buffer | gehe fünf Zeilen im /list-Buffer nach unten. | `+/list -down 5+`
|
||||
| kbd:[■ □ □] | - | chat: /list buffer | Zeile im /list-Buffer auswählen. | `+/window ${_window_number};/list -go ${_chat_line_y}+`
|
||||
| kbd:[□ □ ■] | - | chat: /list buffer | tritt dem IRC-Kanal, in der ausgewählten Zeile, bei. | `+hsignal:irc_list_mouse+`
|
||||
| kbd:[▲] | - | chat: script buffer | fünf Zeilen nach oben blättern, im Script-Buffer. | `+/script up 5+`
|
||||
| kbd:[▼] | - | chat: script buffer | fünf Zeilen nach unten blättern, im Script-Buffer. | `+/script down 5+`
|
||||
| kbd:[■ □ □] | - | chat: script buffer | wählt einen Eintrag im Script-Buffer aus. | `+/script go ${_chat_line_y}+`
|
||||
| kbd:[□ □ ■] | - | chat: script buffer | installiert/entfernt ein Skript. | `+/script go ${_chat_line_y};/script installremove -q ${script_name_with_extension}+`
|
||||
| kbd:[▲] | - | chat: script buffer | fünf Zeilen nach oben blättern, im Script-Buffer. | `+/script -up 5+`
|
||||
| kbd:[▼] | - | chat: script buffer | fünf Zeilen nach unten blättern, im Script-Buffer. | `+/script -down 5+`
|
||||
| kbd:[■ □ □] | - | chat: script buffer | wählt einen Eintrag im Script-Buffer aus. | `+/script -go ${_chat_line_y}+`
|
||||
| kbd:[□ □ ■] | - | chat: script buffer | installiert/entfernt ein Skript. | `+/script -go ${_chat_line_y};/script installremove -q ${script_name_with_extension}+`
|
||||
| kbd:[■ □ □] | up / left | buflist | verschiebt Buffer in der Reihenfolge nach unten. | Signal `+buflist_mouse+`.
|
||||
| kbd:[■ □ □] | down / right | buflist | verschiebt Buffer in der Reihenfolge nach oben. | Signal `+buflist_mouse+`.
|
||||
| kbd:[■ □ □] | - | buflist | wechselt zum Buffer (oder zum vorherigen Buffer, falls der aktuell genutzte Buffer angewählt wurde). | Signal `+buflist_mouse+`.
|
||||
@@ -1978,8 +1978,8 @@ Diese Tasten und Aktionen werden im fset-Buffer verwendet (siehe <<script_manage
|
||||
[width="100%",cols="^.^3,^.^2,.^8,.^5",options="header"]
|
||||
|===
|
||||
| Taste | Action ^(1)^ | Beschreibung | Befehl
|
||||
| kbd:[↑] | | eine Zeile nach oben. | `+/script up+`
|
||||
| kbd:[↓] | | eine Zeile nach unten. | `+/script down+`
|
||||
| kbd:[↑] | | eine Zeile nach oben. | `+/script -up+`
|
||||
| kbd:[↓] | | eine Zeile nach unten. | `+/script -down+`
|
||||
| kbd:[PgUp] | | eine Seite hoch blättern. | `+/window page_up+`
|
||||
| kbd:[PgDn] | | eine Seite nach unten blättern. | `+/window page_down+`
|
||||
| kbd:[Alt+i] | `i` | Skript installieren. | `+/script install+`
|
||||
|
||||
@@ -1845,10 +1845,10 @@ These mouse actions are possible only if mouse is enabled with key kbd:[Alt+m]
|
||||
| kbd:[▼] | - | chat: /list buffer | Move five lines down in /list buffer. | `+/list -down 5+`
|
||||
| kbd:[■ □ □] | - | chat: /list buffer | Select line in /list buffer. | `+/window ${_window_number};/list -go ${_chat_line_y}+`
|
||||
| kbd:[□ □ ■] | - | chat: /list buffer | Join IRC channel on selected line. | `+hsignal:irc_list_mouse+`
|
||||
| kbd:[▲] | - | chat: script buffer | Move five lines up in script buffer. | `+/script up 5+`
|
||||
| kbd:[▼] | - | chat: script buffer | Move five lines down in script buffer. | `+/script down 5+`
|
||||
| kbd:[■ □ □] | - | chat: script buffer | Select line in script buffer. | `+/script go ${_chat_line_y}+`
|
||||
| kbd:[□ □ ■] | - | chat: script buffer | Install/remove script. | `+/script go ${_chat_line_y};/script installremove -q ${script_name_with_extension}+`
|
||||
| kbd:[▲] | - | chat: script buffer | Move five lines up in script buffer. | `+/script -up 5+`
|
||||
| kbd:[▼] | - | chat: script buffer | Move five lines down in script buffer. | `+/script -down 5+`
|
||||
| kbd:[■ □ □] | - | chat: script buffer | Select line in script buffer. | `+/script -go ${_chat_line_y}+`
|
||||
| kbd:[□ □ ■] | - | chat: script buffer | Install/remove script. | `+/script -go ${_chat_line_y};/script installremove -q ${script_name_with_extension}+`
|
||||
| kbd:[■ □ □] | up / left | buflist | Move buffer to a lower number. | Signal `+buflist_mouse+`.
|
||||
| kbd:[■ □ □] | down / right | buflist | Move buffer to a higher number. | Signal `+buflist_mouse+`.
|
||||
| kbd:[■ □ □] | - | buflist | Switch to buffer (previously visited buffer if the buffer is the current one). | Signal `+buflist_mouse+`.
|
||||
@@ -1966,8 +1966,8 @@ These keys and actions are used on the script buffer (see <<script_manager,scrip
|
||||
[width="100%",cols="^.^3,^.^2,.^8,.^5",options="header"]
|
||||
|===
|
||||
| Key | Action ^(1)^ | Description | Command
|
||||
| kbd:[↑] | | Move one line up. | `+/script up+`
|
||||
| kbd:[↓] | | Move one line down. | `+/script down+`
|
||||
| kbd:[↑] | | Move one line up. | `+/script -up+`
|
||||
| kbd:[↓] | | Move one line down. | `+/script -down+`
|
||||
| kbd:[PgUp] | | Move one page up. | `+/window page_up+`
|
||||
| kbd:[PgDn] | | Move one page down. | `+/window page_down+`
|
||||
| kbd:[Alt+i] | `i` | Install script. | `+/script install+`
|
||||
|
||||
@@ -1880,10 +1880,10 @@ avec la touche kbd:[Alt+m] (commande : `+/mouse toggle+`).
|
||||
| kbd:[▼] | - | chat : tampon /list | Descendre de cinq lignes dans le tampon /list. | `+/list -down 5+`
|
||||
| kbd:[■ □ □] | - | chat : tampon /list | Sélectionner la ligne dans le tampon /list. | `+/window ${_window_number};/list -go ${_chat_line_y}+`
|
||||
| kbd:[□ □ ■] | - | chat : tampon /list | Rejoindre le canal IRC sur la ligne sélectionnée. | `+hsignal:irc_list_mouse+`
|
||||
| kbd:[▲] | - | chat : tampon script | Monter de 5 lignes dans le tampon script. | `+/script up 5+`
|
||||
| kbd:[▼] | - | chat : tampon script | Descendre de 5 lignes dans le tampon script. | `+/script down 5+`
|
||||
| kbd:[■ □ □] | - | chat : tampon script | Sélectionner la ligne dans le tampon script. | `+/script go ${_chat_line_y}+`
|
||||
| kbd:[□ □ ■] | - | chat : tampon script | Installer/supprimer un script. | `+/script go ${_chat_line_y};/script installremove -q ${script_name_with_extension}+`
|
||||
| kbd:[▲] | - | chat : tampon script | Monter de 5 lignes dans le tampon script. | `+/script -up 5+`
|
||||
| kbd:[▼] | - | chat : tampon script | Descendre de 5 lignes dans le tampon script. | `+/script -down 5+`
|
||||
| kbd:[■ □ □] | - | chat : tampon script | Sélectionner la ligne dans le tampon script. | `+/script -go ${_chat_line_y}+`
|
||||
| kbd:[□ □ ■] | - | chat : tampon script | Installer/supprimer un script. | `+/script -go ${_chat_line_y};/script installremove -q ${script_name_with_extension}+`
|
||||
| kbd:[■ □ □] | haut / gauche | buflist | Déplacer le tampon vers un numéro inférieur. | Signal `+buflist_mouse+`.
|
||||
| kbd:[■ □ □] | bas / droit | buflist | Déplacer le tampon vers un numéro supérieur. | Signal `+buflist_mouse+`.
|
||||
| kbd:[■ □ □] | - | buflist | Aller au tampon (tampon précédent dans la liste des tampons visités si le tampon est le courant). | Signal `+buflist_mouse+`.
|
||||
@@ -2004,8 +2004,8 @@ Ces touches et actions sont utilisées sur le tampon script
|
||||
[width="100%",cols="^.^3,^.^2,.^8,.^5",options="header"]
|
||||
|===
|
||||
| Touche | Action ^(1)^ | Description | Commande
|
||||
| kbd:[↑] | | Monter d'une ligne. | `+/script up+`
|
||||
| kbd:[↓] | | Descendre d'une ligne. | `+/script down+`
|
||||
| kbd:[↑] | | Monter d'une ligne. | `+/script -up+`
|
||||
| kbd:[↓] | | Descendre d'une ligne. | `+/script -down+`
|
||||
| kbd:[PgUp] | | Monter d'une page. | `+/window page_up+`
|
||||
| kbd:[PgDn] | | Descendre d'une page. | `+/window page_down+`
|
||||
| kbd:[Alt+i] | `i` | Installer le script. | `+/script install+`
|
||||
|
||||
@@ -2061,13 +2061,13 @@ These mouse actions are possible only if mouse is enabled with key kbd:[Alt+m]
|
||||
// TRANSLATION MISSING
|
||||
| kbd:[□ □ ■] | - | chat: /list buffer | Join IRC channel on selected line. | `+hsignal:irc_list_mouse+`
|
||||
// TRANSLATION MISSING
|
||||
| kbd:[▲] | - | chat: script buffer | Move 5 lines up in script buffer. | `+/script up 5+`
|
||||
| kbd:[▲] | - | chat: script buffer | Move 5 lines up in script buffer. | `+/script -up 5+`
|
||||
// TRANSLATION MISSING
|
||||
| kbd:[▼] | - | chat: script buffer | Move 5 lines down in script buffer. | `+/script down 5+`
|
||||
| kbd:[▼] | - | chat: script buffer | Move 5 lines down in script buffer. | `+/script -down 5+`
|
||||
// TRANSLATION MISSING
|
||||
| kbd:[■ □ □] | - | chat: script buffer | Select line in script buffer. | `+/script go ${_chat_line_y}+`
|
||||
| kbd:[■ □ □] | - | chat: script buffer | Select line in script buffer. | `+/script -go ${_chat_line_y}+`
|
||||
// TRANSLATION MISSING
|
||||
| kbd:[□ □ ■] | - | chat: script buffer | Install/remove script. | `+/script go ${_chat_line_y};/script installremove -q ${script_name_with_extension}+`
|
||||
| kbd:[□ □ ■] | - | chat: script buffer | Install/remove script. | `+/script -go ${_chat_line_y};/script installremove -q ${script_name_with_extension}+`
|
||||
// TRANSLATION MISSING
|
||||
| kbd:[■ □ □] | up / left | buflist | Move buffer to a lower number. | Signal `+buflist_mouse+`.
|
||||
// TRANSLATION MISSING
|
||||
@@ -2200,8 +2200,8 @@ These keys and actions are used on the script buffer (see <<script_manager,scrip
|
||||
[width="100%",cols="^.^3,^.^2,.^8,.^5",options="header"]
|
||||
|===
|
||||
| Key | Action ^(1)^ | Description | Command
|
||||
| kbd:[↑] | | Move one line up. | `+/script up+`
|
||||
| kbd:[↓] | | Move one line down. | `+/script down+`
|
||||
| kbd:[↑] | | Move one line up. | `+/script -up+`
|
||||
| kbd:[↓] | | Move one line down. | `+/script -down+`
|
||||
| kbd:[PgUp] | | Move one page up. | `+/window page_up+`
|
||||
| kbd:[PgDn] | | Move one page down. | `+/window page_down+`
|
||||
| kbd:[Alt+i] | `i` | Install script. | `+/script install+`
|
||||
|
||||
@@ -2010,10 +2010,10 @@ These mouse actions are possible only if mouse is enabled with key kbd:[Alt+m]
|
||||
| kbd:[■ □ □] | - | chat: /list buffer | Select line in /list buffer. | `+/window ${_window_number};/list -go ${_chat_line_y}+`
|
||||
// TRANSLATION MISSING
|
||||
| kbd:[□ □ ■] | - | chat: /list buffer | Join IRC channel on selected line. | `+hsignal:irc_list_mouse+`
|
||||
| kbd:[▲] | - | チャット: スクリプトバッファ | スクリプトバッファを 5 行上方向にスクロール | `+/script up 5+`
|
||||
| kbd:[▼] | - | チャット: スクリプトバッファ | スクリプトバッファで 5 行下方向にスクロール | `+/script down 5+`
|
||||
| kbd:[■ □ □] | - | チャット: スクリプトバッファ | スクリプトバッファで行選択 | `+/script go ${_chat_line_y}+`
|
||||
| kbd:[□ □ ■] | - | チャット: スクリプトバッファ | スクリプトのインストール `+/ 削除 | /script go ${_chat_line_y};/script installremove ${script_name_with_extension}+`
|
||||
| kbd:[▲] | - | チャット: スクリプトバッファ | スクリプトバッファを 5 行上方向にスクロール | `+/script -up 5+`
|
||||
| kbd:[▼] | - | チャット: スクリプトバッファ | スクリプトバッファで 5 行下方向にスクロール | `+/script -down 5+`
|
||||
| kbd:[■ □ □] | - | チャット: スクリプトバッファ | スクリプトバッファで行選択 | `+/script -go ${_chat_line_y}+`
|
||||
| kbd:[□ □ ■] | - | チャット: スクリプトバッファ | スクリプトのインストール `+/ 削除 | /script -go ${_chat_line_y};/script installremove ${script_name_with_extension}+`
|
||||
| kbd:[■ □ □] | 上 / 左 | バッファリスト | 指定したバッファを下の番号に移動 | `+buflist_mouse+` シグナル
|
||||
| kbd:[■ □ □] | 下 / 右 | バッファリスト | 指定したバッファを上の番号に移動 | `+buflist_mouse+` シグナル
|
||||
| kbd:[■ □ □] | - | バッファリスト | 指定したバッファに切り替える (現在のバッファを指定した場合、バッファ切り替え履歴で前のバッファに切り替える) | `+buflist_mouse+` シグナル
|
||||
@@ -2140,8 +2140,8 @@ These keys and actions are used on the script buffer (see <<script_manager,scrip
|
||||
[width="100%",cols="^.^3,^.^2,.^8,.^5",options="header"]
|
||||
|===
|
||||
| Key | Action ^(1)^ | Description | Command
|
||||
| kbd:[↑] | | Move one line up. | `+/script up+`
|
||||
| kbd:[↓] | | Move one line down. | `+/script down+`
|
||||
| kbd:[↑] | | Move one line up. | `+/script -up+`
|
||||
| kbd:[↓] | | Move one line down. | `+/script -down+`
|
||||
| kbd:[PgUp] | | Move one page up. | `+/window page_up+`
|
||||
| kbd:[PgDn] | | Move one page down. | `+/window page_down+`
|
||||
| kbd:[Alt+i] | `i` | Install script. | `+/script install+`
|
||||
|
||||
@@ -1853,10 +1853,10 @@ za pomocą skrótu kbd:[Alt+m] (komenda: `+/mouse toggle+`).
|
||||
| kbd:[▼] | - | chat: /list buffer | Przesuń pięć linii w dół w buforze /list. | `+/list -down 5+`
|
||||
| kbd:[■ □ □] | - | chat: /list buffer | Wybierz linię w buforze /list. | `+/window ${_window_number};/list -go ${_chat_line_y}+`
|
||||
| kbd:[□ □ ■] | - | chat: /list buffer | Wejdź na kanał IRC w zaznaczonej linii. | `+hsignal:irc_list_mouse+`
|
||||
| kbd:[▲] | - | chat: bufor skryptów | Przejdź 5 linii w górę w buforze skryptów. | `+/script up 5+`
|
||||
| kbd:[▼] | - | chat: bufor skryptów | Przejdź 5 linii w dół w buforze skryptów. | `+/script down 5+`
|
||||
| kbd:[■ □ □] | - | chat: bufor skryptów | Zaznacz linię w buforze skryptów. | `+/script go ${_chat_line_y}+`
|
||||
| kbd:[□ □ ■] | - | chat: bufor skryptów | Zainstaluj/usuń skrypt. | `+/script go ${_chat_line_y};/script installremove -q ${script_name_with_extension}+`
|
||||
| kbd:[▲] | - | chat: bufor skryptów | Przejdź 5 linii w górę w buforze skryptów. | `+/script -up 5+`
|
||||
| kbd:[▼] | - | chat: bufor skryptów | Przejdź 5 linii w dół w buforze skryptów. | `+/script -down 5+`
|
||||
| kbd:[■ □ □] | - | chat: bufor skryptów | Zaznacz linię w buforze skryptów. | `+/script -go ${_chat_line_y}+`
|
||||
| kbd:[□ □ ■] | - | chat: bufor skryptów | Zainstaluj/usuń skrypt. | `+/script -go ${_chat_line_y};/script installremove -q ${script_name_with_extension}+`
|
||||
| kbd:[■ □ □] | góra / lewo | buflist | Przenieś bufor na niższy numer. | Sygnał `+buflist_mouse+`.
|
||||
| kbd:[■ □ □] | dół / prawo | buflist | Przenieś bufor na wyższy numer. | Sygnał `+buflist_mouse+`.
|
||||
| kbd:[■ □ □] | - | buflist | Przełącz na bufor (poprzednio odwiedzony bufor, jeśli jest to obecny bufor). | Sygnał `+buflist_mouse+`.
|
||||
@@ -1974,8 +1974,8 @@ Te skróty klawiszowe i akcje mogą zostać użyte w buforze skryptów (zobacz <
|
||||
[width="100%",cols="^.^3,^.^2,.^8,.^5",options="header"]
|
||||
|===
|
||||
| Skrót | Akcja ^(1)^ | Opis | Komenda
|
||||
| kbd:[↑] | | Przejdź linię wyżej. | `+/script up+`
|
||||
| kbd:[↓] | | Przejdź linię niżej. | `+/script down+`
|
||||
| kbd:[↑] | | Przejdź linię wyżej. | `+/script -up+`
|
||||
| kbd:[↓] | | Przejdź linię niżej. | `+/script -down+`
|
||||
| kbd:[PgUp] | | Przewiń stronę do góry. | `+/window page_up+`
|
||||
| kbd:[PgDn] | | Przewiń stronę w dół. | `+/window page_down+`
|
||||
| kbd:[Alt+i] | `i` | Zainstaluj skrypt. | `+/script install+`
|
||||
|
||||
@@ -1759,10 +1759,10 @@ WeeChat нуди доста подразумеваних тастерских п
|
||||
| kbd:[▼] | - | чет: /list бафер | Помера за пет линија наниже у /list баферу. | `+/list -down 5+`
|
||||
| kbd:[■ □ □] | - | чет: /list бафер | Бира линију у /list баферу. | `+/window ${_window_number};/list -go ${_chat_line_y}+`
|
||||
| kbd:[□ □ ■] | - | чет: /list бафер | Приступа IRC каналу на изабраној линији. | `+hsignal:irc_list_mouse+`
|
||||
| kbd:[▲] | - | чет: script бафер | Помера за пет линија навише у script баферу. | `+/script up 5+`
|
||||
| kbd:[▼] | - | чет: script бафер | Помера за пет линија наниже у script баферу. | `+/script down 5+`
|
||||
| kbd:[■ □ □] | - | чет: script бафер | Бира линију у script баферу. | `+/script go ${_chat_line_y}+`
|
||||
| kbd:[□ □ ■] | - | чет: script бафер | Инсталира/уклања скрипту. | `+/script go ${_chat_line_y};/script installremove -q ${script_name_with_extension}+`
|
||||
| kbd:[▲] | - | чет: script бафер | Помера за пет линија навише у script баферу. | `+/script -up 5+`
|
||||
| kbd:[▼] | - | чет: script бафер | Помера за пет линија наниже у script баферу. | `+/script -down 5+`
|
||||
| kbd:[■ □ □] | - | чет: script бафер | Бира линију у script баферу. | `+/script -go ${_chat_line_y}+`
|
||||
| kbd:[□ □ ■] | - | чет: script бафер | Инсталира/уклања скрипту. | `+/script -go ${_chat_line_y};/script installremove -q ${script_name_with_extension}+`
|
||||
| kbd:[■ □ □] | горе / лево | листа бафера | Помера бафер на нижи број. | Signal `+buflist_mouse+`.
|
||||
| kbd:[■ □ □] | доле / десно | листа бафера | Помера бафер на виши број. | Signal `+buflist_mouse+`.
|
||||
| kbd:[■ □ □] | - | листа бафера | Пребацивање на бафер (претходно посећени багер ако је бафер текући). | Signal `+buflist_mouse+`.
|
||||
@@ -1880,8 +1880,8 @@ kbd:[▼]: точкић доле
|
||||
[width="100%", cols="^.^3,^.^2,.^8,.^5", options="header"]
|
||||
|===
|
||||
| Тастер | Акција ^(1)^ | Опис | Команда
|
||||
| kbd:[↑] | | Помера једну линију навише. | `+/script up+`
|
||||
| kbd:[↓] | | Помера једну линију наниже. | `+/script down+`
|
||||
| kbd:[↑] | | Помера једну линију навише. | `+/script -up+`
|
||||
| kbd:[↓] | | Помера једну линију наниже. | `+/script -down+`
|
||||
| kbd:[PgUp] | | Помера једну страну навише. | `+/window page_up+`
|
||||
| kbd:[PgDn] | | Помера једну страну наниже. | `+/window page_down+`
|
||||
| kbd:[Alt+i] | `i` | Инсталира скрипту. | `+/script install+`
|
||||
|
||||
@@ -92,7 +92,7 @@ include_directories(${GNUTLS_INCLUDE_PATH})
|
||||
include_directories(${CURL_INCLUDE_DIRS})
|
||||
|
||||
if(ENABLE_ZSTD)
|
||||
include_directories(${ZSTD_INCLUDE_DIRS})
|
||||
include_directories(${LIBZSTD_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
include_directories("${CMAKE_BINARY_DIR}")
|
||||
|
||||
+16
-8
@@ -198,15 +198,23 @@ util_strftimeval (char *string, int max, const char *format, struct timeval *tv)
|
||||
string_dyn_concat (format2, "%%", -1);
|
||||
ptr_format += 2;
|
||||
}
|
||||
else if ((ptr_format[0] == '%') && (ptr_format[1] == '.')
|
||||
&& (ptr_format[2] >= '1') && (ptr_format[2] <= '6'))
|
||||
else if ((ptr_format[0] == '%') && (ptr_format[1] == '.'))
|
||||
{
|
||||
snprintf (str_usec, sizeof (str_usec),
|
||||
"%06ld", (long)(tv->tv_usec));
|
||||
length = ptr_format[2] - '1' + 1;
|
||||
str_usec[length] = '\0';
|
||||
string_dyn_concat (format2, str_usec, -1);
|
||||
ptr_format += 3;
|
||||
if ((ptr_format[2] >= '1') && (ptr_format[2] <= '6'))
|
||||
{
|
||||
snprintf (str_usec, sizeof (str_usec),
|
||||
"%06ld", (long)(tv->tv_usec));
|
||||
length = ptr_format[2] - '1' + 1;
|
||||
str_usec[length] = '\0';
|
||||
string_dyn_concat (format2, str_usec, -1);
|
||||
ptr_format += 3;
|
||||
}
|
||||
else
|
||||
{
|
||||
ptr_format += 2;
|
||||
if (ptr_format[0])
|
||||
ptr_format++;
|
||||
}
|
||||
}
|
||||
else if ((ptr_format[0] == '%') && (ptr_format[1] == 'f'))
|
||||
{
|
||||
|
||||
@@ -74,6 +74,8 @@ char *gui_mouse_button_codes[][2] =
|
||||
{ "*", "alt-button2" },
|
||||
{ ")", "alt-button3" },
|
||||
{ "8", "alt-ctrl-button1" },
|
||||
{ ":", "alt-ctrl-button2" },
|
||||
{ "9", "alt-ctrl-button3" },
|
||||
{ NULL, NULL } };
|
||||
|
||||
|
||||
|
||||
@@ -1872,13 +1872,13 @@ gui_window_search_stop (struct t_gui_window *window, int stop_here)
|
||||
|
||||
if (search == GUI_BUFFER_SEARCH_LINES)
|
||||
{
|
||||
window->scroll->text_search_start_line = NULL;
|
||||
if (!stop_here)
|
||||
{
|
||||
window->scroll->start_line = window->scroll->text_search_start_line;
|
||||
window->scroll->start_line_pos = 0;
|
||||
gui_hotlist_remove_buffer (window->buffer, 0);
|
||||
}
|
||||
window->scroll->text_search_start_line = NULL;
|
||||
gui_buffer_ask_chat_refresh (window->buffer, 2);
|
||||
}
|
||||
}
|
||||
|
||||
+17
-14
@@ -350,10 +350,11 @@ exec_display_line (struct t_exec_cmd *exec_cmd, struct t_gui_buffer *buffer,
|
||||
{
|
||||
snprintf (str_number, sizeof (str_number),
|
||||
"%d. ", exec_cmd->output_line_nb);
|
||||
weechat_printf_y (buffer, -1,
|
||||
"%s%s",
|
||||
(exec_cmd->line_numbers) ? str_number : " ",
|
||||
line_color);
|
||||
weechat_printf_y_date_tags (
|
||||
buffer, -1, 0, str_tags,
|
||||
"%s%s",
|
||||
(exec_cmd->line_numbers) ? str_number : "",
|
||||
line_color);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -505,11 +506,12 @@ exec_end_command (struct t_exec_cmd *exec_cmd, int return_code)
|
||||
{
|
||||
if (buffer_type == 1)
|
||||
{
|
||||
weechat_printf_y (ptr_buffer, -1,
|
||||
_("%s: end of command %ld (\"%s\"), "
|
||||
"return code: %d"),
|
||||
EXEC_PLUGIN_NAME, exec_cmd->number,
|
||||
exec_cmd->command, return_code);
|
||||
weechat_printf_y_date_tags (
|
||||
ptr_buffer, -1, 0, "exec_rc",
|
||||
_("%s: end of command %ld (\"%s\"), "
|
||||
"return code: %d"),
|
||||
EXEC_PLUGIN_NAME, exec_cmd->number,
|
||||
exec_cmd->command, return_code);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -525,11 +527,12 @@ exec_end_command (struct t_exec_cmd *exec_cmd, int return_code)
|
||||
{
|
||||
if (buffer_type == 1)
|
||||
{
|
||||
weechat_printf_y (ptr_buffer, -1,
|
||||
_("%s: unexpected end of command %ld "
|
||||
"(\"%s\")"),
|
||||
EXEC_PLUGIN_NAME, exec_cmd->number,
|
||||
exec_cmd->command);
|
||||
weechat_printf_y_date_tags (
|
||||
ptr_buffer, -1, 0, "exec_rc",
|
||||
_("%s: unexpected end of command %ld "
|
||||
"(\"%s\")"),
|
||||
EXEC_PLUGIN_NAME, exec_cmd->number,
|
||||
exec_cmd->command);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -389,6 +389,7 @@ irc_command_me_channel_message (struct t_irc_server *server,
|
||||
server,
|
||||
0, /* date */
|
||||
0, /* date_usec */
|
||||
NULL, /* tags */
|
||||
channel_name,
|
||||
NULL, /* address */
|
||||
"privmsg",
|
||||
@@ -1976,6 +1977,7 @@ IRC_COMMAND_CALLBACK(ctcp)
|
||||
ptr_server,
|
||||
0, /* date */
|
||||
0, /* date_usec */
|
||||
NULL, /* tags */
|
||||
ctcp_target,
|
||||
NULL, /* address */
|
||||
"privmsg",
|
||||
@@ -3844,6 +3846,7 @@ IRC_COMMAND_CALLBACK(msg)
|
||||
ptr_server,
|
||||
0, /* date */
|
||||
0, /* date_usec */
|
||||
NULL, /* tags */
|
||||
ptr_channel->name,
|
||||
NULL, /* address */
|
||||
"privmsg",
|
||||
@@ -3868,6 +3871,7 @@ IRC_COMMAND_CALLBACK(msg)
|
||||
ptr_server,
|
||||
0, /* date */
|
||||
0, /* date_usec */
|
||||
NULL, /* tags */
|
||||
targets[i],
|
||||
NULL, /* address */
|
||||
"privmsg",
|
||||
@@ -4070,6 +4074,7 @@ IRC_COMMAND_CALLBACK(notice)
|
||||
ptr_server,
|
||||
0, /* date */
|
||||
0, /* date_usec */
|
||||
NULL, /* tags */
|
||||
argv[arg_target],
|
||||
NULL, /* address */
|
||||
"notice",
|
||||
@@ -4601,6 +4606,7 @@ IRC_COMMAND_CALLBACK(query)
|
||||
ptr_server,
|
||||
0, /* date */
|
||||
0, /* date_usec */
|
||||
NULL, /* tags */
|
||||
ptr_channel->name,
|
||||
NULL, /* address */
|
||||
"privmsg",
|
||||
|
||||
@@ -65,6 +65,7 @@ void
|
||||
irc_input_user_message_display (struct t_irc_server *server,
|
||||
time_t date,
|
||||
int date_usec,
|
||||
struct t_hashtable *tags,
|
||||
const char *target,
|
||||
const char *address,
|
||||
const char *command,
|
||||
@@ -88,6 +89,7 @@ irc_input_user_message_display (struct t_irc_server *server,
|
||||
ctxt.server = server;
|
||||
ctxt.date = date;
|
||||
ctxt.date_usec = date_usec;
|
||||
ctxt.tags = tags;
|
||||
ctxt.address = (char *)address;
|
||||
ctxt.command = (char *)command;
|
||||
|
||||
@@ -325,6 +327,7 @@ irc_input_send_user_message (struct t_gui_buffer *buffer, int flags,
|
||||
ptr_server,
|
||||
0, /* date */
|
||||
0, /* date_usec */
|
||||
NULL, /* tags */
|
||||
ptr_channel->name,
|
||||
NULL, /* address */
|
||||
"privmsg",
|
||||
|
||||
@@ -22,11 +22,13 @@
|
||||
|
||||
#include <time.h>
|
||||
|
||||
struct t_hashtable;
|
||||
struct t_gui_buffer;
|
||||
|
||||
extern void irc_input_user_message_display (struct t_irc_server *server,
|
||||
time_t date,
|
||||
int date_usec,
|
||||
struct t_hashtable *tags,
|
||||
const char *target,
|
||||
const char *address,
|
||||
const char *command,
|
||||
|
||||
@@ -1683,8 +1683,9 @@ irc_message_split (struct t_irc_server *server, const char *message)
|
||||
}
|
||||
|
||||
multiline = (
|
||||
((weechat_strcasecmp (command, "privmsg") == 0)
|
||||
|| (weechat_strcasecmp (command, "notice") == 0))
|
||||
server
|
||||
&& ((weechat_strcasecmp (command, "privmsg") == 0)
|
||||
|| (weechat_strcasecmp (command, "notice") == 0))
|
||||
&& message
|
||||
&& strchr (message, '\n')
|
||||
&& (index_args + 1 <= argc - 1)
|
||||
|
||||
@@ -3056,6 +3056,7 @@ irc_protocol_privmsg_display_ctcp_send (struct t_irc_protocol_ctxt *ctxt,
|
||||
ctxt->server,
|
||||
ctxt->date,
|
||||
ctxt->date_usec,
|
||||
ctxt->tags,
|
||||
target,
|
||||
ctxt->address,
|
||||
"privmsg",
|
||||
@@ -3347,6 +3348,7 @@ IRC_PROTOCOL_CALLBACK(privmsg)
|
||||
ctxt->server,
|
||||
ctxt->date,
|
||||
ctxt->date_usec,
|
||||
ctxt->tags,
|
||||
remote_nick,
|
||||
ctxt->address,
|
||||
"privmsg",
|
||||
@@ -8085,7 +8087,7 @@ irc_protocol_recv_command (struct t_irc_server *server,
|
||||
char *message_colors_decoded, *pos_space, *tags;
|
||||
struct t_irc_channel *ptr_channel;
|
||||
t_irc_recv_func *cmd_recv_func;
|
||||
const char *ptr_msg_after_tags, *ptr_batch_ref;
|
||||
const char *ptr_msg_after_tags, *ptr_batch_ref, *ptr_tag_time;
|
||||
const char *nick1, *address1, *host1;
|
||||
char *address, *host, *host_no_color;
|
||||
struct t_irc_protocol_ctxt ctxt;
|
||||
@@ -8308,11 +8310,15 @@ irc_protocol_recv_command (struct t_irc_server *server,
|
||||
if (ctxt.tags)
|
||||
{
|
||||
irc_tag_parse (tags, ctxt.tags, NULL);
|
||||
weechat_util_parse_time (
|
||||
weechat_hashtable_get (ctxt.tags, "time"),
|
||||
&tv);
|
||||
ctxt.date = tv.tv_sec;
|
||||
ctxt.date_usec = tv.tv_usec;
|
||||
ptr_tag_time = weechat_hashtable_get (ctxt.tags, "time");
|
||||
if (ptr_tag_time)
|
||||
{
|
||||
if (weechat_util_parse_time (ptr_tag_time, &tv))
|
||||
{
|
||||
ctxt.date = tv.tv_sec;
|
||||
ctxt.date_usec = tv.tv_usec;
|
||||
}
|
||||
}
|
||||
}
|
||||
free (tags);
|
||||
}
|
||||
|
||||
@@ -1063,6 +1063,12 @@ plugin_script_remove (struct t_weechat_plugin *weechat_plugin,
|
||||
|
||||
plugin_script_remove_configs (weechat_plugin, script);
|
||||
|
||||
/*
|
||||
* remove again all hooks created by this script (just in case new hooks
|
||||
* were created by the calls above)
|
||||
*/
|
||||
weechat_unhook_all (script->name);
|
||||
|
||||
/* remove script from list */
|
||||
if (script->prev_script)
|
||||
(script->prev_script)->next_script = script->next_script;
|
||||
|
||||
@@ -80,8 +80,8 @@
|
||||
return PyLong_FromLong ((long)__int)
|
||||
#define API_RETURN_LONG(__long) \
|
||||
return PyLong_FromLong (__long)
|
||||
#define API_RETURN_LONGLONG(__longlong) \
|
||||
return PyLong_FromLongLong (__longlong)
|
||||
#define API_RETURN_ULONGLONG(__ulonglong) \
|
||||
return PyLong_FromUnsignedLongLong (__ulonglong)
|
||||
|
||||
|
||||
/*
|
||||
@@ -376,14 +376,14 @@ API_FUNC(string_parse_size)
|
||||
char *size;
|
||||
unsigned long long value;
|
||||
|
||||
API_INIT_FUNC(1, "string_parse_size", API_RETURN_LONGLONG(0));
|
||||
API_INIT_FUNC(1, "string_parse_size", API_RETURN_ULONGLONG(0));
|
||||
size = NULL;
|
||||
if (!PyArg_ParseTuple (args, "s", &size))
|
||||
API_WRONG_ARGS(API_RETURN_LONGLONG(0));
|
||||
API_WRONG_ARGS(API_RETURN_ULONGLONG(0));
|
||||
|
||||
value = weechat_string_parse_size (size);
|
||||
|
||||
API_RETURN_LONGLONG(value);
|
||||
API_RETURN_ULONGLONG(value);
|
||||
}
|
||||
|
||||
API_FUNC(string_color_code_size)
|
||||
|
||||
@@ -51,7 +51,7 @@ list(APPEND LINK_LIBS ${GCRYPT_LDFLAGS})
|
||||
list(APPEND LINK_LIBS ${ZLIB_LIBRARY})
|
||||
|
||||
if(ENABLE_ZSTD)
|
||||
include_directories(${ZSTD_INCLUDE_DIRS})
|
||||
include_directories(${LIBZSTD_INCLUDE_DIRS})
|
||||
list(APPEND LINK_LIBS ${LIBZSTD_LDFLAGS})
|
||||
endif()
|
||||
|
||||
|
||||
@@ -1634,6 +1634,9 @@ relay_client_set_status (struct t_relay_client *client,
|
||||
enum t_relay_status status)
|
||||
{
|
||||
struct t_relay_server *ptr_server;
|
||||
int old_status;
|
||||
|
||||
old_status = client->status;
|
||||
|
||||
/*
|
||||
* IMPORTANT: if changes are made in this function or sub-functions called,
|
||||
@@ -1658,9 +1661,16 @@ relay_client_set_status (struct t_relay_client *client,
|
||||
{
|
||||
client->end_time = time (NULL);
|
||||
|
||||
ptr_server = relay_server_search (client->protocol_string);
|
||||
if (ptr_server)
|
||||
ptr_server->last_client_disconnect = client->end_time;
|
||||
if (old_status == RELAY_STATUS_CONNECTED)
|
||||
{
|
||||
/*
|
||||
* set the last client disconnect time
|
||||
* (only if the client was connected)
|
||||
*/
|
||||
ptr_server = relay_server_search (client->protocol_string);
|
||||
if (ptr_server)
|
||||
ptr_server->last_client_disconnect = client->end_time;
|
||||
}
|
||||
|
||||
relay_client_outqueue_free_all (client);
|
||||
|
||||
|
||||
@@ -1371,6 +1371,11 @@ script_action_run_all ()
|
||||
script_buffer_open ();
|
||||
script_buffer_refresh (1);
|
||||
}
|
||||
if (script_buffer_detail_script)
|
||||
{
|
||||
/* back to list of scripts */
|
||||
script_buffer_show_detail_script (NULL);
|
||||
}
|
||||
weechat_buffer_set (script_buffer, "display", "1");
|
||||
}
|
||||
else if (weechat_strcmp (argv[0], "list") == 0)
|
||||
|
||||
@@ -135,21 +135,21 @@ script_mouse_init ()
|
||||
weechat_hashtable_set (
|
||||
keys,
|
||||
"@chat(" SCRIPT_PLUGIN_NAME "." SCRIPT_BUFFER_NAME "):button1",
|
||||
"/window ${_window_number};/script go ${_chat_line_y}");
|
||||
"/window ${_window_number};/script -go ${_chat_line_y}");
|
||||
weechat_hashtable_set (
|
||||
keys,
|
||||
"@chat(" SCRIPT_PLUGIN_NAME "." SCRIPT_BUFFER_NAME "):button2",
|
||||
"/window ${_window_number};"
|
||||
"/script go ${_chat_line_y};"
|
||||
"/script -go ${_chat_line_y};"
|
||||
"/script installremove -q ${script_name_with_extension}");
|
||||
weechat_hashtable_set (
|
||||
keys,
|
||||
"@chat(" SCRIPT_PLUGIN_NAME "." SCRIPT_BUFFER_NAME "):wheelup",
|
||||
"/script up 5");
|
||||
"/script -up 5");
|
||||
weechat_hashtable_set (
|
||||
keys,
|
||||
"@chat(" SCRIPT_PLUGIN_NAME "." SCRIPT_BUFFER_NAME "):wheeldown",
|
||||
"/script down 5");
|
||||
"/script -down 5");
|
||||
weechat_hashtable_set (keys, "__quiet", "1");
|
||||
weechat_key_bind ("mouse", keys);
|
||||
|
||||
|
||||
@@ -5686,7 +5686,8 @@ API_FUNC(hdata_long)
|
||||
{
|
||||
Tcl_Obj *objp;
|
||||
char *hdata, *pointer, *name;
|
||||
int result, i;
|
||||
long result;
|
||||
int i;
|
||||
|
||||
API_INIT_FUNC(1, "hdata_long", API_RETURN_LONG(0));
|
||||
if (objc < 4)
|
||||
|
||||
@@ -773,16 +773,6 @@ trigger_command_trigger (const void *pointer, void *data,
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
ptr_trigger = trigger_alloc (sargv[0]);
|
||||
if (!ptr_trigger)
|
||||
{
|
||||
weechat_printf_date_tags (
|
||||
NULL, 0, "no_trigger",
|
||||
_("%s%s: failed to create trigger \"%s\""),
|
||||
weechat_prefix ("error"), TRIGGER_PLUGIN_NAME,
|
||||
sargv[0]);
|
||||
goto end;
|
||||
}
|
||||
ptr_trigger = trigger_new (
|
||||
sargv[0], /* name */
|
||||
(weechat_strcmp (argv[1], "addoff") == 0) ? "off" : "on",
|
||||
|
||||
@@ -22,6 +22,11 @@
|
||||
|
||||
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_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);
|
||||
|
||||
#endif /* WEECHAT_PLUGIN_XFER_CHAT_H */
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "xfer.h"
|
||||
#include "xfer-upgrade.h"
|
||||
#include "xfer-buffer.h"
|
||||
#include "xfer-chat.h"
|
||||
|
||||
|
||||
/*
|
||||
@@ -80,6 +81,7 @@ xfer_upgrade_set_buffer_callbacks ()
|
||||
{
|
||||
struct t_infolist *infolist;
|
||||
struct t_gui_buffer *ptr_buffer;
|
||||
const char *type;
|
||||
|
||||
infolist = weechat_infolist_get ("buffer", NULL, NULL);
|
||||
if (infolist)
|
||||
@@ -89,12 +91,22 @@ xfer_upgrade_set_buffer_callbacks ()
|
||||
if (weechat_infolist_pointer (infolist, "plugin") == weechat_xfer_plugin)
|
||||
{
|
||||
ptr_buffer = weechat_infolist_pointer (infolist, "pointer");
|
||||
weechat_buffer_set_pointer (ptr_buffer, "close_callback", &xfer_buffer_close_cb);
|
||||
weechat_buffer_set_pointer (ptr_buffer, "input_callback", &xfer_buffer_input_cb);
|
||||
type = weechat_buffer_get_string (ptr_buffer, "localvar_type");
|
||||
if (strcmp (weechat_infolist_string (infolist, "name"),
|
||||
XFER_BUFFER_NAME) == 0)
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -173,19 +173,17 @@ record_match (struct t_hashtable *recorded_msg,
|
||||
/*
|
||||
* Searches if a prefix/message has been displayed in a buffer.
|
||||
*
|
||||
* Returns index of message displayed (≥ 0), -1 if message has NOT been
|
||||
* displayed.
|
||||
* Returns pointer to hashtable with the message found, NULL if the message
|
||||
* has NOT been displayed.
|
||||
*/
|
||||
|
||||
int
|
||||
struct t_hashtable *
|
||||
record_search (const char *buffer, const char *prefix, const char *message,
|
||||
const char *tags)
|
||||
{
|
||||
int i, rc, size;
|
||||
int i, size;
|
||||
struct t_hashtable *rec_msg;
|
||||
|
||||
rc = -1;
|
||||
|
||||
size = arraylist_size (recorded_messages);
|
||||
|
||||
for (i = 0; i < size; i++)
|
||||
@@ -198,12 +196,12 @@ record_search (const char *buffer, const char *prefix, const char *message,
|
||||
&& record_match (rec_msg, "message_no_color", message)
|
||||
&& (!tags || !tags[0] || record_match (rec_msg, "tags", tags)))
|
||||
{
|
||||
rc = i;
|
||||
break;
|
||||
return rec_msg;
|
||||
}
|
||||
}
|
||||
|
||||
return rc;
|
||||
/* message not displayed */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -24,8 +24,8 @@ extern struct t_arraylist *recorded_messages;
|
||||
|
||||
extern void record_start ();
|
||||
extern void record_stop ();
|
||||
extern int record_search (const char *buffer, const char *prefix,
|
||||
const char *message, const char *tags);
|
||||
extern struct t_hashtable *record_search (const char *buffer, const char *prefix,
|
||||
const char *message, const char *tags);
|
||||
extern void record_dump (char **msg);
|
||||
extern void record_error_missing (const char *message);
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ extern "C"
|
||||
command_record ("core.weechat", __command);
|
||||
|
||||
#define WEE_CHECK_MSG_BUFFER(__buffer_name, __prefix, __message) \
|
||||
if (record_search (__buffer_name, __prefix, __message, NULL) < 0) \
|
||||
if (!record_search (__buffer_name, __prefix, __message, NULL)) \
|
||||
{ \
|
||||
char **msg = command_build_error (__buffer_name, __prefix, \
|
||||
__message); \
|
||||
@@ -53,8 +53,6 @@ extern "C"
|
||||
|
||||
#define WEE_CHECK_MSG_CORE(__prefix, __message) \
|
||||
WEE_CHECK_MSG_BUFFER("core.weechat", __prefix, __message);
|
||||
#define WEE_SEARCH_MSG_CORE(__prefix, __message) \
|
||||
record_search ("core.weechat", __prefix, __message, NULL)
|
||||
|
||||
|
||||
TEST_GROUP(CoreCommand)
|
||||
@@ -380,10 +378,10 @@ TEST(CoreCommand, Reload)
|
||||
{
|
||||
WEE_CMD_CORE("/save");
|
||||
WEE_CMD_CORE("/reload");
|
||||
LONGS_EQUAL(0, WEE_SEARCH_MSG_CORE("", "Options reloaded from sec.conf"));
|
||||
LONGS_EQUAL(1, WEE_SEARCH_MSG_CORE("", "Options reloaded from weechat.conf"));
|
||||
LONGS_EQUAL(2, WEE_SEARCH_MSG_CORE("", "Options reloaded from plugins.conf"));
|
||||
LONGS_EQUAL(3, WEE_SEARCH_MSG_CORE("", "Options reloaded from charset.conf"));
|
||||
WEE_CHECK_MSG_CORE("", "Options reloaded from sec.conf");
|
||||
WEE_CHECK_MSG_CORE("", "Options reloaded from weechat.conf");
|
||||
WEE_CHECK_MSG_CORE("", "Options reloaded from plugins.conf");
|
||||
WEE_CHECK_MSG_CORE("", "Options reloaded from charset.conf");
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -229,13 +229,13 @@ TEST(CoreUtil, Strftimeval)
|
||||
|
||||
/* invalid microseconds digits (must be 1-6) */
|
||||
strcpy (str_time, "test");
|
||||
LONGS_EQUAL(23, util_strftimeval (str_time, sizeof (str_time),
|
||||
LONGS_EQUAL(20, util_strftimeval (str_time, sizeof (str_time),
|
||||
"%Y-%m-%d %H:%M:%S.%.0", &tv));
|
||||
STRCMP_EQUAL("2023-12-25 10:29:09.%.0", str_time);
|
||||
STRCMP_EQUAL("2023-12-25 10:29:09.", str_time);
|
||||
strcpy (str_time, "test");
|
||||
LONGS_EQUAL(23, util_strftimeval (str_time, sizeof (str_time),
|
||||
LONGS_EQUAL(20, util_strftimeval (str_time, sizeof (str_time),
|
||||
"%Y-%m-%d %H:%M:%S.%.7", &tv));
|
||||
STRCMP_EQUAL("2023-12-25 10:29:09.%.7", str_time);
|
||||
STRCMP_EQUAL("2023-12-25 10:29:09.", str_time);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -1997,6 +1997,21 @@ TEST(IrcMessage, Split)
|
||||
hashtable_remove (server->cap_list, "batch");
|
||||
hashtable_remove (server->cap_list, "draft/multiline");
|
||||
|
||||
/* PRIVMSG with newlines but no server: BATCH is not used */
|
||||
hashtable = irc_message_split (NULL, "PRIVMSG #channel :test\n\nline 3");
|
||||
CHECK(hashtable);
|
||||
LONGS_EQUAL(7, hashtable->items_count);
|
||||
STRCMP_EQUAL("3", (const char *)hashtable_get (hashtable, "count"));
|
||||
STRCMP_EQUAL("PRIVMSG #channel :test",
|
||||
(const char *)hashtable_get (hashtable, "msg1"));
|
||||
STRCMP_EQUAL("test", (const char *)hashtable_get (hashtable, "args1"));
|
||||
STRCMP_EQUAL("PRIVMSG #channel :",
|
||||
(const char *)hashtable_get (hashtable, "msg2"));
|
||||
STRCMP_EQUAL("", (const char *)hashtable_get (hashtable, "args2"));
|
||||
STRCMP_EQUAL("PRIVMSG #channel :line 3",
|
||||
(const char *)hashtable_get (hashtable, "msg3"));
|
||||
STRCMP_EQUAL("line 3", (const char *)hashtable_get (hashtable, "args3"));
|
||||
|
||||
/* 005: no split */
|
||||
hashtable = irc_message_split (server, "005 nick " MSG_005);
|
||||
CHECK(hashtable);
|
||||
|
||||
@@ -29,6 +29,7 @@ extern "C"
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
#include "src/core/wee-arraylist.h"
|
||||
#include "src/core/wee-config-file.h"
|
||||
#include "src/core/wee-hashtable.h"
|
||||
@@ -99,7 +100,7 @@ extern char *irc_protocol_cap_to_enable (const char *capabilities,
|
||||
server_recv (__irc_msg);
|
||||
|
||||
#define CHECK_CORE(__prefix, __message) \
|
||||
if (record_search ("core.weechat", __prefix, __message, NULL) < 0) \
|
||||
if (!record_search ("core.weechat", __prefix, __message, NULL)) \
|
||||
{ \
|
||||
char **msg = build_error ( \
|
||||
"Core message not displayed", \
|
||||
@@ -112,8 +113,8 @@ extern char *irc_protocol_cap_to_enable (const char *capabilities,
|
||||
}
|
||||
|
||||
#define CHECK_SRV(__prefix, __message, __tags) \
|
||||
if (record_search ("irc.server." IRC_FAKE_SERVER, __prefix, \
|
||||
__message, __tags) < 0) \
|
||||
if (!record_search ("irc.server." IRC_FAKE_SERVER, __prefix, \
|
||||
__message, __tags)) \
|
||||
{ \
|
||||
char **msg = build_error ( \
|
||||
"Server message not displayed", \
|
||||
@@ -144,8 +145,8 @@ extern char *irc_protocol_cap_to_enable (const char *capabilities,
|
||||
"");
|
||||
|
||||
#define CHECK_CHAN(__prefix, __message, __tags) \
|
||||
if (record_search ("irc." IRC_FAKE_SERVER ".#test", __prefix, \
|
||||
__message, __tags) < 0) \
|
||||
if (!record_search ("irc." IRC_FAKE_SERVER ".#test", __prefix, \
|
||||
__message, __tags)) \
|
||||
{ \
|
||||
char **msg = build_error ( \
|
||||
"Channel message not displayed", \
|
||||
@@ -157,9 +158,72 @@ extern char *irc_protocol_cap_to_enable (const char *capabilities,
|
||||
FAIL(string_dyn_free (msg, 0)); \
|
||||
}
|
||||
|
||||
#define CHECK_CHAN_DATE_VALUE(__prefix, __message, __tags, \
|
||||
__date_sec, __date_usec) \
|
||||
{ \
|
||||
struct timeval tv_now; \
|
||||
const char *ptr_date; \
|
||||
long value; \
|
||||
char *error; \
|
||||
gettimeofday (&tv_now, NULL); \
|
||||
struct t_hashtable *record = record_search ( \
|
||||
"irc." IRC_FAKE_SERVER ".#test", \
|
||||
__prefix, __message, __tags); \
|
||||
if (!record) \
|
||||
{ \
|
||||
char **msg = build_error ( \
|
||||
"Channel message not displayed", \
|
||||
__prefix, \
|
||||
__message, \
|
||||
__tags, \
|
||||
"All messages displayed"); \
|
||||
record_dump (msg); \
|
||||
FAIL(string_dyn_free (msg, 0)); \
|
||||
} \
|
||||
ptr_date = (const char *)hashtable_get (record, "date"); \
|
||||
CHECK(ptr_date); \
|
||||
value = strtol (ptr_date, &error, 10); \
|
||||
CHECK(error && !error[0]); \
|
||||
LONGS_EQUAL(__date_sec, value); \
|
||||
ptr_date = (const char *)hashtable_get (record, "date_usec"); \
|
||||
CHECK(ptr_date); \
|
||||
value = strtol (ptr_date, &error, 10); \
|
||||
CHECK(error && !error[0]); \
|
||||
LONGS_EQUAL(__date_usec, value); \
|
||||
}
|
||||
|
||||
#define CHECK_CHAN_DATE_NOW(__prefix, __message, __tags) \
|
||||
{ \
|
||||
struct timeval tv_now; \
|
||||
const char *ptr_date; \
|
||||
long value; \
|
||||
char *error; \
|
||||
gettimeofday (&tv_now, NULL); \
|
||||
struct t_hashtable *record = record_search ( \
|
||||
"irc." IRC_FAKE_SERVER ".#test", \
|
||||
__prefix, __message, __tags); \
|
||||
if (!record) \
|
||||
{ \
|
||||
char **msg = build_error ( \
|
||||
"Channel message not displayed", \
|
||||
__prefix, \
|
||||
__message, \
|
||||
__tags, \
|
||||
"All messages displayed"); \
|
||||
record_dump (msg); \
|
||||
FAIL(string_dyn_free (msg, 0)); \
|
||||
} \
|
||||
ptr_date = (const char *)hashtable_get (record, "date"); \
|
||||
CHECK(ptr_date); \
|
||||
value = strtol (ptr_date, &error, 10); \
|
||||
CHECK(error && !error[0]); \
|
||||
CHECK(value >= tv_now.tv_sec - 5); \
|
||||
CHECK(value <= tv_now.tv_sec + 5); \
|
||||
}
|
||||
|
||||
#define CHECK_PV(__nick, __prefix, __message, __tags) \
|
||||
if (record_search ("irc." IRC_FAKE_SERVER "." __nick, \
|
||||
__prefix, __message, __tags) < 0) \
|
||||
if (!record_search ("irc." IRC_FAKE_SERVER "." __nick, \
|
||||
__prefix, __message, __tags)) \
|
||||
{ \
|
||||
char **msg = build_error ( \
|
||||
"Private message not displayed", \
|
||||
@@ -2802,9 +2866,9 @@ TEST(IrcProtocolWithServer, privmsg)
|
||||
|
||||
/* message to channel/user */
|
||||
RECV(":bob!user@host PRIVMSG #test :this is the message ");
|
||||
CHECK_CHAN("bob", "this is the message ",
|
||||
"irc_privmsg,notify_message,prefix_nick_248,nick_bob,"
|
||||
"host_user@host,log1");
|
||||
CHECK_CHAN_DATE_NOW("bob", "this is the message ",
|
||||
"irc_privmsg,notify_message,prefix_nick_248,nick_bob,"
|
||||
"host_user@host,log1");
|
||||
RECV(":bob!user@host PRIVMSG alice :this is the message ");
|
||||
CHECK_PV_CLOSE("bob", "bob", "this is the message ",
|
||||
"irc_privmsg,notify_private,prefix_nick_248,nick_bob,"
|
||||
@@ -2813,15 +2877,60 @@ TEST(IrcProtocolWithServer, privmsg)
|
||||
/* message with tags to channel/user */
|
||||
RECV("@tag1=value1;tag2=value2 :bob!user@host PRIVMSG #test "
|
||||
":this is the message ");
|
||||
CHECK_CHAN("bob", "this is the message ",
|
||||
"irc_privmsg,irc_tag_tag1=value1,irc_tag_tag2=value2,"
|
||||
"notify_message,prefix_nick_248,nick_bob,host_user@host,log1");
|
||||
CHECK_CHAN_DATE_NOW("bob", "this is the message ",
|
||||
"irc_privmsg,irc_tag_tag1=value1,irc_tag_tag2=value2,"
|
||||
"notify_message,prefix_nick_248,nick_bob,host_user@host,log1");
|
||||
RECV("@tag1=value1;tag2=value2 :bob!user@host PRIVMSG alice "
|
||||
":this is the message ");
|
||||
CHECK_PV_CLOSE("bob", "bob", "this is the message ",
|
||||
"irc_privmsg,irc_tag_tag1=value1,irc_tag_tag2=value2,"
|
||||
"notify_private,prefix_nick_248,nick_bob,host_user@host,log1");
|
||||
|
||||
/* message with tags + time as timestamp to channel/user */
|
||||
RECV("@tag1=value1;tag2=value2;time=1703500149 :bob!user@host PRIVMSG #test "
|
||||
":this is the message ");
|
||||
CHECK_CHAN_DATE_VALUE(
|
||||
"bob",
|
||||
"this is the message ",
|
||||
"irc_privmsg,irc_tag_tag1=value1,irc_tag_tag2=value2,"
|
||||
"irc_tag_time=1703500149,notify_message,prefix_nick_248,nick_bob,"
|
||||
"host_user@host,log1",
|
||||
1703500149, 0);
|
||||
|
||||
/* message with tags + time as timestamp with milliseconds to channel/user */
|
||||
RECV("@tag1=value1;tag2=value2;time=1703500149.456 :bob!user@host PRIVMSG #test "
|
||||
":this is the message ");
|
||||
CHECK_CHAN_DATE_VALUE(
|
||||
"bob",
|
||||
"this is the message ",
|
||||
"irc_privmsg,irc_tag_tag1=value1,irc_tag_tag2=value2,"
|
||||
"irc_tag_time=1703500149.456,notify_message,prefix_nick_248,nick_bob,"
|
||||
"host_user@host,log1",
|
||||
1703500149, 456000);
|
||||
|
||||
/* message with tags + time as timestamp with microseconds to channel/user */
|
||||
RECV("@tag1=value1;tag2=value2;time=1703500149.456789 :bob!user@host PRIVMSG #test "
|
||||
":this is the message ");
|
||||
CHECK_CHAN_DATE_VALUE(
|
||||
"bob",
|
||||
"this is the message ",
|
||||
"irc_privmsg,irc_tag_tag1=value1,irc_tag_tag2=value2,"
|
||||
"irc_tag_time=1703500149.456789,notify_message,prefix_nick_248,nick_bob,"
|
||||
"host_user@host,log1",
|
||||
1703500149, 456789);
|
||||
|
||||
/* message with tags + time as ISO 8601 with microseconds to channel/user */
|
||||
RECV("@tag1=value1;tag2=value2;time=2023-12-25T10:29:09.456789Z "
|
||||
":bob!user@host PRIVMSG #test :this is the message ");
|
||||
CHECK_CHAN_DATE_VALUE(
|
||||
"bob",
|
||||
"this is the message ",
|
||||
"irc_privmsg,irc_tag_tag1=value1,irc_tag_tag2=value2,"
|
||||
"irc_tag_time=2023-12-25T10:29:09.456789Z,notify_message,"
|
||||
"prefix_nick_248,nick_bob,"
|
||||
"host_user@host,log1",
|
||||
1703500149, 456789);
|
||||
|
||||
/*
|
||||
* message to channel/user from self nick
|
||||
* (case of bouncer or if echo-message capability is enabled)
|
||||
@@ -2979,86 +3088,109 @@ TEST(IrcProtocolWithServer, privmsg)
|
||||
"), name: file.txt, 3 bytes (protocol: dcc)");
|
||||
|
||||
/* valid CTCP to channel */
|
||||
RECV(":bob!user@host PRIVMSG #test :\01TEST\01");
|
||||
RECV(":bob!user@host PRIVMSG #test :\01ACTION\01");
|
||||
RECV("@time=2023-12-25T10:29:09.456789Z "
|
||||
":bob!user@host PRIVMSG #test :\01TEST\01");
|
||||
RECV("@time=2023-12-25T10:29:09.456789Z "
|
||||
":bob!user@host PRIVMSG #test :\01ACTION\01");
|
||||
CHECK_CHAN(" *", "bob",
|
||||
"irc_privmsg,irc_action,notify_message,nick_bob,"
|
||||
"host_user@host,log1");
|
||||
RECV(":bob!user@host PRIVMSG #test :\01ACTION is testing with \02bold\02\01");
|
||||
"irc_privmsg,irc_tag_time=2023-12-25T10:29:09.456789Z,"
|
||||
"irc_action,notify_message,nick_bob,host_user@host,log1");
|
||||
RECV("@time=2023-12-25T10:29:09.456789Z "
|
||||
":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");
|
||||
"irc_privmsg,irc_tag_time=2023-12-25T10:29:09.456789Z,"
|
||||
"irc_action,notify_message,nick_bob,host_user@host,log1");
|
||||
RECV(":bob!user@host PRIVMSG #test :\01VERSION\01");
|
||||
RECV(":bob!user@host PRIVMSG #test :\01DCC SEND file.txt 1 2 3\01");
|
||||
|
||||
/* valid CTCP to ops of channel */
|
||||
RECV(":bob!user@host PRIVMSG @#test :\01ACTION\01");
|
||||
RECV("@time=2023-12-25T10:29:09.456789Z "
|
||||
":bob!user@host PRIVMSG @#test :\01ACTION\01");
|
||||
CHECK_CHAN("--", "Action -> @#test: bob",
|
||||
"irc_privmsg,irc_action,notify_message,nick_bob,"
|
||||
"host_user@host,log1");
|
||||
RECV(":bob!user@host PRIVMSG @#test :\01ACTION is testing\01");
|
||||
"irc_privmsg,irc_tag_time=2023-12-25T10:29:09.456789Z,"
|
||||
"irc_action,notify_message,nick_bob,host_user@host,log1");
|
||||
RECV("@time=2023-12-25T10:29:09.456789Z "
|
||||
":bob!user@host PRIVMSG @#test :\01ACTION is testing\01");
|
||||
CHECK_CHAN("--", "Action -> @#test: bob is testing",
|
||||
"irc_privmsg,irc_action,notify_message,nick_bob,"
|
||||
"host_user@host,log1");
|
||||
"irc_privmsg,irc_tag_time=2023-12-25T10:29:09.456789Z,"
|
||||
"irc_action,notify_message,nick_bob,host_user@host,log1");
|
||||
|
||||
/*
|
||||
* valid CTCP to channel from self nick
|
||||
* (case of bouncer or if echo-message capability is enabled)
|
||||
*/
|
||||
RECV(":alice!user@host PRIVMSG #test :\01VERSION\01");
|
||||
RECV("@time=2023-12-25T10:29:09.456789Z "
|
||||
":alice!user@host PRIVMSG #test :\01VERSION\01");
|
||||
CHECK_CHAN("--", "CTCP query to #test: VERSION",
|
||||
"irc_privmsg,irc_ctcp,self_msg,notify_none,no_highlight,"
|
||||
"nick_alice,host_user@host,log1");
|
||||
RECV(":alice!user@host PRIVMSG #test :\01ACTION\01");
|
||||
"irc_privmsg,irc_tag_time=2023-12-25T10:29:09.456789Z,"
|
||||
"irc_ctcp,self_msg,notify_none,no_highlight,nick_alice,"
|
||||
"host_user@host,log1");
|
||||
RECV("@time=2023-12-25T10:29:09.456789Z "
|
||||
":alice!user@host PRIVMSG #test :\01ACTION\01");
|
||||
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 with \02bold\02\01");
|
||||
"irc_privmsg,irc_tag_time=2023-12-25T10:29:09.456789Z,"
|
||||
"irc_action,self_msg,notify_none,no_highlight,nick_alice,"
|
||||
"host_user@host,log1");
|
||||
RECV("@time=2023-12-25T10:29:09.456789Z "
|
||||
":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");
|
||||
"irc_privmsg,irc_tag_time=2023-12-25T10:29:09.456789Z,"
|
||||
"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 or if echo-message capability is enabled)
|
||||
*/
|
||||
RECV(":alice!user@host PRIVMSG @#test :\01ACTION\01");
|
||||
RECV("@time=2023-12-25T10:29:09.456789Z "
|
||||
":alice!user@host PRIVMSG @#test :\01ACTION\01");
|
||||
CHECK_CHAN("--", "Action -> @#test: 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");
|
||||
"irc_privmsg,irc_tag_time=2023-12-25T10:29:09.456789Z,"
|
||||
"irc_action,self_msg,notify_none,no_highlight,nick_alice,"
|
||||
"host_user@host,log1");
|
||||
RECV("@time=2023-12-25T10:29:09.456789Z "
|
||||
":alice!user@host PRIVMSG @#test :\01ACTION is testing\01");
|
||||
CHECK_CHAN("--", "Action -> @#test: alice is testing",
|
||||
"irc_privmsg,irc_action,self_msg,notify_none,no_highlight,"
|
||||
"nick_alice,host_user@host,log1");
|
||||
"irc_privmsg,irc_tag_time=2023-12-25T10:29:09.456789Z,"
|
||||
"irc_action,self_msg,notify_none,no_highlight,nick_alice,"
|
||||
"host_user@host,log1");
|
||||
|
||||
/* valid CTCP to user */
|
||||
RECV(":bob!user@host PRIVMSG alice :\01TEST\01");
|
||||
RECV("@time=2023-12-25T10:29:09.456789Z "
|
||||
":bob!user@host PRIVMSG alice :\01TEST\01");
|
||||
CHECK_SENT(NULL);
|
||||
RECV(":bob!user@host PRIVMSG alice :\01ACTION\01");
|
||||
RECV("@time=2023-12-25T10:29:09.456789Z "
|
||||
":bob!user@host PRIVMSG alice :\01ACTION\01");
|
||||
CHECK_SENT(NULL);
|
||||
RECV(":bob!user@host PRIVMSG alice :\01ACTION is testing\01");
|
||||
RECV("@time=2023-12-25T10:29:09.456789Z "
|
||||
":bob!user@host PRIVMSG alice :\01ACTION is testing\01");
|
||||
CHECK_SENT(NULL);
|
||||
RECV(":bob!user@host PRIVMSG alice :\01VERSION\01");
|
||||
RECV("@time=2023-12-25T10:29:09.456789Z "
|
||||
":bob!user@host PRIVMSG alice :\01VERSION\01");
|
||||
CHECK_SRV("--", "CTCP requested by bob: VERSION",
|
||||
"irc_privmsg,irc_ctcp,nick_bob,host_user@host,log1");
|
||||
"irc_privmsg,irc_tag_time=2023-12-25T10:29:09.456789Z,"
|
||||
"irc_ctcp,nick_bob,host_user@host,log1");
|
||||
info = irc_ctcp_eval_reply (ptr_server,
|
||||
irc_ctcp_get_reply (ptr_server, "VERSION"));
|
||||
snprintf (message, sizeof (message),
|
||||
"CTCP reply to bob: VERSION %s", info);
|
||||
CHECK_SRV("--", message,
|
||||
"irc_privmsg,irc_ctcp,irc_ctcp_reply,self_msg,notify_none,"
|
||||
"no_highlight,nick_alice,log1");
|
||||
"irc_privmsg,irc_tag_time=2023-12-25T10:29:09.456789Z,"
|
||||
"irc_ctcp,irc_ctcp_reply,self_msg,notify_none,no_highlight,"
|
||||
"nick_alice,log1");
|
||||
snprintf (message, sizeof (message),
|
||||
"NOTICE bob :\01VERSION %s\01", info);
|
||||
CHECK_SENT(message);
|
||||
free (info);
|
||||
RECV(":bob!user@host PRIVMSG alice :\01SOURCE\01");
|
||||
RECV("@time=2023-12-25T10:29:09.456789Z "
|
||||
":bob!user@host PRIVMSG alice :\01SOURCE\01");
|
||||
info = hook_info_get (NULL, "weechat_site_download", "");
|
||||
snprintf (message, sizeof (message),
|
||||
"NOTICE bob :\01SOURCE %s\01", info);
|
||||
CHECK_SENT(message);
|
||||
free (info);
|
||||
RECV(":bob!user@host PRIVMSG alice :\01DCC SEND file.txt 1 2 3\01");
|
||||
RECV("@time=2023-12-25T10:29:09.456789Z "
|
||||
":bob!user@host PRIVMSG alice :\01DCC SEND file.txt 1 2 3\01");
|
||||
CHECK_CORE("",
|
||||
"xfer: incoming file from bob (0.0.0.1, irc." IRC_FAKE_SERVER
|
||||
"), name: file.txt, 3 bytes (protocol: dcc)");
|
||||
@@ -3068,31 +3200,38 @@ TEST(IrcProtocolWithServer, privmsg)
|
||||
* valid CTCP to channel from self nick
|
||||
* (case of bouncer or if echo-message capability is enabled)
|
||||
*/
|
||||
RECV(":alice!user@host PRIVMSG alice :\01CLIENTINFO\01");
|
||||
RECV("@time=2023-12-25T10:29:09.456789Z "
|
||||
":alice!user@host PRIVMSG alice :\01CLIENTINFO\01");
|
||||
if (i == 0)
|
||||
{
|
||||
CHECK_SRV("--", "CTCP requested by alice: CLIENTINFO",
|
||||
"irc_privmsg,irc_ctcp,nick_alice,host_user@host,log1");
|
||||
"irc_privmsg,irc_tag_time=2023-12-25T10:29:09.456789Z,"
|
||||
"irc_ctcp,nick_alice,host_user@host,log1");
|
||||
CHECK_SRV("--", "CTCP reply to alice: CLIENTINFO ACTION CLIENTINFO "
|
||||
"DCC PING SOURCE TIME VERSION",
|
||||
"irc_privmsg,irc_ctcp,irc_ctcp_reply,self_msg,notify_none,"
|
||||
"irc_privmsg,irc_tag_time=2023-12-25T10:29:09.456789Z,"
|
||||
"irc_ctcp,irc_ctcp_reply,self_msg,notify_none,"
|
||||
"no_highlight,nick_alice,host_user@host,log1");
|
||||
}
|
||||
else
|
||||
{
|
||||
CHECK_SRV("--", "CTCP query to alice: CLIENTINFO",
|
||||
"irc_privmsg,irc_ctcp,self_msg,notify_none,no_highlight,"
|
||||
"nick_alice,host_user@host,log1");
|
||||
"irc_privmsg,irc_tag_time=2023-12-25T10:29:09.456789Z,"
|
||||
"irc_ctcp,self_msg,notify_none,no_highlight,nick_alice,"
|
||||
"host_user@host,log1");
|
||||
/*
|
||||
* with echo-message capability, when the same message is received
|
||||
* for the second time, the request and reply are displayed
|
||||
*/
|
||||
RECV(":alice!user@host PRIVMSG alice :\01CLIENTINFO\01");
|
||||
RECV("@time=2023-12-25T10:29:09.456789Z "
|
||||
":alice!user@host PRIVMSG alice :\01CLIENTINFO\01");
|
||||
CHECK_SRV("--", "CTCP requested by alice: CLIENTINFO",
|
||||
"irc_privmsg,irc_ctcp,nick_alice,host_user@host,log1");
|
||||
"irc_privmsg,irc_tag_time=2023-12-25T10:29:09.456789Z,"
|
||||
"irc_ctcp,nick_alice,host_user@host,log1");
|
||||
CHECK_SRV("--", "CTCP reply to alice: CLIENTINFO ACTION CLIENTINFO "
|
||||
"DCC PING SOURCE TIME VERSION",
|
||||
"irc_privmsg,irc_ctcp,irc_ctcp_reply,self_msg,notify_none,"
|
||||
"irc_privmsg,irc_tag_time=2023-12-25T10:29:09.456789Z,"
|
||||
"irc_ctcp,irc_ctcp_reply,self_msg,notify_none,"
|
||||
"no_highlight,nick_alice,host_user@host,log1");
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -39,8 +39,8 @@
|
||||
# devel-number the devel version as hex number ("0x04010000" for "4.1.0-dev")
|
||||
#
|
||||
|
||||
weechat_stable="4.2.0"
|
||||
weechat_devel="4.2.0"
|
||||
weechat_stable="4.2.3"
|
||||
weechat_devel="4.2.3"
|
||||
|
||||
stable_major=$(echo "${weechat_stable}" | cut -d"." -f1)
|
||||
stable_minor=$(echo "${weechat_stable}" | cut -d"." -f2)
|
||||
|
||||
Reference in New Issue
Block a user