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

Compare commits

...

21 Commits

Author SHA1 Message Date
Sébastien Helleu abb13d6bcc Version 4.2.2 2024-04-07 18:37:29 +02:00
Sébastien Helleu 0e074aa4bb relay: set the last IRC client disconnection time only after a successful connection (issue #2103) 2024-04-07 18:16:17 +02:00
Sébastien Helleu ea87d42b49 exec: remove trailing space on buffers with free content when line numbers are not displayed 2024-04-07 18:10:08 +02:00
Sébastien Helleu 88cd804eb7 exec: add missing exec tags in lines of buffers with free content (issue #2086) 2024-04-07 18:09:03 +02:00
Sébastien Helleu 3d5d5a64ee core: fix tests on function strftimeval on Alpine 2024-03-24 21:02:08 +01:00
Trygve Aaberge fe14cedf92 core: make search_stop scroll to search start position (issue #2093)
When you run /input search_stop it should scroll to the scroll position
the buffer was at before starting the search, rather than to the bottom
of the buffer.

Fixes a regression introduced in commit b83b428c5c

Fixes #2093
2024-03-13 13:52:42 +01:00
Sébastien Helleu 90b96f9cdd python: fix truncation of unsigned long long integer returned by function string_parse_size 2024-02-25 17:12:41 +01:00
Sébastien Helleu c6e11ac95b tcl: fix truncation of long integer returned by function hdata_long 2024-02-25 16:16:42 +01:00
Sébastien Helleu 4f6af9cf81 core: add missing mouse events "alt-ctrl-button2" and "alt-ctrl-button3" 2024-02-25 13:49:13 +01:00
Sébastien Helleu 641f477c3c script: always display list of scripts when searching scripts with /script search (issue #2077) 2024-02-21 21:40:09 +01:00
Sébastien Helleu 0762856b85 script: fix default mouse keys (issue #2076)
Some parameters of command `/script` were renamed in commit
85b5bacfe3 but the default mouse keys were not
changed and still using the old parameters names.
2024-02-21 21:20:41 +01:00
Sébastien Helleu c576af67b3 irc: add missing tags on self action messages when capability echo-message is enabled (issue #2074) 2024-02-16 21:06:37 +01:00
Sébastien Helleu 9aa2cbd365 core: move lines from 4.1.0 to 4.2.0 in ChangeLog 2024-02-11 14:37:26 +01:00
Sébastien Helleu 798e6fe4cc core: add again line about function hook_url in ChangeLog (issue #1723) 2024-02-11 14:23:16 +01:00
Sébastien Helleu 65a7d92b93 trigger: fix memory leak when adding a new trigger with /trigger command 2024-02-10 18:00:51 +01:00
Sébastien Helleu b43fcac7d6 ci: remove tests on macOS 11 2024-02-04 14:06:14 +01:00
Sébastien Helleu 9b846cb947 scripts: fix crash on script unload when a hook is created in a buffer close callback (issue #2067) 2024-02-04 13:59:44 +01:00
Sébastien Helleu 61bcf8dc02 Version 4.2.2-dev 2024-02-04 13:58:53 +01:00
Sébastien Helleu 9ad62dec1e Version 4.2.1 2024-01-22 18:46:53 +01:00
Sébastien Helleu f9cc10005c irc: fix random date displayed when a received message contains tags but no "time" (issue #2064) 2024-01-22 13:59:46 +01:00
Sébastien Helleu e42e632408 Version 4.2.1-dev 2024-01-22 13:09:45 +01:00
31 changed files with 409 additions and 179 deletions
-1
View File
@@ -85,7 +85,6 @@ jobs:
matrix:
os:
- macos-12
- macos-11
config:
- { name: "gcc", cc: "gcc", cxx: "g++" }
- { name: "clang", cc: "clang", cxx: "clang++" }
+32 -2
View File
@@ -10,6 +10,35 @@ 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.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 +57,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 +163,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)
+24
View File
@@ -11,6 +11,30 @@ 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.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)
+6 -6
View File
@@ -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+`
+6 -6
View File
@@ -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+`
+6 -6
View File
@@ -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+`
+6 -6
View File
@@ -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+`
+6 -6
View File
@@ -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+`
+6 -6
View File
@@ -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+`
+6 -6
View File
@@ -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+`
+16 -8
View File
@@ -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'))
{
+2
View File
@@ -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 } };
+1 -1
View File
@@ -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
View File
@@ -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
{
+6
View File
@@ -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",
+3
View File
@@ -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",
+2
View File
@@ -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,
+12 -6
View File
@@ -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);
}
+6
View File
@@ -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;
+5 -5
View File
@@ -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)
+13 -3
View File
@@ -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);
+5
View File
@@ -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)
+4 -4
View File
@@ -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);
+2 -1
View File
@@ -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)
-10
View File
@@ -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",
+7 -9
View File
@@ -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;
}
/*
+2 -2
View File
@@ -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);
+5 -7
View File
@@ -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");
}
/*
+4 -4
View File
@@ -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);
}
/*
+197 -58
View File
@@ -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
View File
@@ -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.2"
weechat_devel="4.2.2"
stable_major=$(echo "${weechat_stable}" | cut -d"." -f1)
stable_minor=$(echo "${weechat_stable}" | cut -d"." -f2)