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

Compare commits

..

30 Commits

Author SHA1 Message Date
Sébastien Helleu ad4529dc39 Version 4.1.3 2024-01-20 09:18:02 +01:00
Sébastien Helleu aff7a19339 core: add release notes for next version 2024-01-20 09:12:35 +01:00
Sébastien Helleu 1eed2d0e50 core: add version 4.0.8 in ChangeLog and release notes 2024-01-20 09:11:53 +01:00
Sébastien Helleu 5cb0f201f5 irc: check if arguments are not NULL in some infos
Affected infos:

- irc_server_isupport
- irc_server_isupport_value
- irc_server_cap
- irc_server_cap_value
2024-01-12 18:02:54 +01:00
Sébastien Helleu 4cd22e470c irc: fix info "irc_is_message_ignored" (issue #2059) 2024-01-12 18:02:31 +01:00
Sébastien Helleu 97b9d4b26e irc: fix display of self messages in case of message split failure
When the message sends inconsistent max lengths in message 005, the split of
self message fails and causes a display issue: the channel name is displayed
with the message:

  nick | #channel :this is a test

instead of:

  nick | this is a test
2024-01-05 21:35:29 +01:00
Sébastien Helleu f0394bf486 core: fix crash on plugin reload when using musl libc (issue #2052) 2023-12-15 23:02:27 +01:00
Sébastien Helleu 94616b4294 core: fix infinite loop in display when the chat area is too small (issue #2053) 2023-12-14 23:21:08 +01:00
Sébastien Helleu 1ade7c54a2 Version 4.1.3-dev 2023-12-14 23:20:28 +01:00
Sébastien Helleu 14b8518ae2 Version 4.1.2 2023-12-03 19:17:25 +01:00
Sébastien Helleu 4dbae51568 core: add version 4.0.7 in ChangeLog and release notes 2023-12-03 19:12:59 +01:00
Sébastien Helleu 19a1b4145b irc: remove trailing "\r\n" in signals "irc_out" and "irc_outtags" when messages are queued 2023-11-26 18:57:21 +01:00
Sébastien Helleu f6912518b3 tests: add tests on IRC message 337 2023-11-07 21:59:22 +01:00
Sébastien Helleu 5115bebb27 irc: fix target buffer of IRC message 337 (whois reply: "is hiding their idle time") 2023-11-07 21:50:55 +01:00
Sébastien Helleu ceaaab3866 core: fix value of buffer variable "num_history" when the value defined in option weechat.history.max_commands is reached 2023-11-04 17:02:08 +01:00
Sébastien Helleu 4865087019 relay: close properly connection with the IRC client in case of server disconnection (issue #2038) 2023-11-04 09:05:39 +01:00
Sébastien Helleu 532f2ce683 core: remove incorrect warning when binding keys F10 to F20 (issue #2039) 2023-11-04 08:37:36 +01:00
Sébastien Helleu 67bcbf5256 core, plugins: set error to NULL before calling strtol()
This is not strictly necessary, just in case the function strtol() doesn't
update the pointer.
2023-11-01 14:17:15 +01:00
Sébastien Helleu 08fbfcc203 core: fix memory leak when config version is invalid or not supported 2023-10-30 23:30:01 +01:00
Sébastien Helleu fad3f0c942 core: check that buffer is not NULL in function gui_chat_printf_date_tags_internal 2023-10-30 23:29:25 +01:00
Sébastien Helleu 8c55f87fb2 core: fix use NULL pointer when a config file has no options 2023-10-30 23:29:17 +01:00
Sébastien Helleu 8fae2fd927 logger: remove dead assignment 2023-10-30 23:29:13 +01:00
Sébastien Helleu 53f1eb9b28 xfer: fix use of uninitialized variable when adding a new xfer 2023-10-30 23:29:05 +01:00
Sébastien Helleu 3e78d55495 xfer: fix use of NULL pointer in strrchr() 2023-10-30 23:28:51 +01:00
Sébastien Helleu aa5c03334a core: fix crash when "config_version" is present in a configuration file without a value 2023-10-30 23:28:07 +01:00
Sébastien Helleu 8e6647c7c9 core: display an error on startup if environment variable "HOME" is not set 2023-10-30 23:27:20 +01:00
Sébastien Helleu e140f3cf8e tests: check that environment variable "HOME" is set before using it 2023-10-30 23:26:01 +01:00
Sébastien Helleu 60b2b03f9a ruby: fix use of NULL variable when displaying exception 2023-10-30 23:25:51 +01:00
Sébastien Helleu 1769ce1814 Version 4.1.2-dev 2023-10-30 23:24:34 +01:00
Sébastien Helleu fbd579eb61 ci: uninstall php8.1-imagick before build (issue #2009)
When php imagick is installed and when WeeChat is compiled with gcc, there's a
crash when the php plugin is loaded.  Newer versions of gcc should fix the
issue, but as in CI we can't easily use them, uninstalling imagick avoids the
crash.
2023-10-28 09:21:00 +02:00
87 changed files with 638 additions and 50 deletions
+2
View File
@@ -34,6 +34,8 @@ jobs:
run: |
sudo apt-get update -qq
sudo apt-get --yes --no-install-recommends install ${{ env.WEECHAT_DEPENDENCIES }}
# uninstall php imagick as is causes a crash when loading php plugin (see #2009)
sudo apt-get --yes purge php8.1-imagick
sudo -H pip3 install --ignore-installed msgcheck
- name: Check gettext files
+52
View File
@@ -10,6 +10,32 @@ 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.1.3]]
== Version 4.1.3 (2024-01-20)
Bug fixes::
* core: fix crash on plugin reload when using musl libc (issue #2052)
* core: fix infinite loop in display when the chat area is too small (issue #2053)
* irc: check if arguments are not NULL in some infos
* irc: fix info "irc_is_message_ignored" (issue #2059)
* irc: fix display of self messages when the message split fails due to inconsistent max lengths sent by the server in message 005
[[v4.1.2]]
== Version 4.1.2 (2023-12-03)
Bug fixes::
* core: fix value of buffer variable "num_history" when the value defined in option weechat.history.max_commands is reached
* core: remove incorrect warning when binding keys kbd:[F10] to kbd:[F20] (issue #2039)
* core: fix memory leak when config version is invalid or not supported
* core: fix crash when "config_version" is present in a configuration file without a value
* core: display an error on startup if environment variable "HOME" is not set
* irc: remove trailing "\r\n" in signals "irc_out" and "irc_outtags" when messages are queued
* irc: fix target buffer of IRC message 337 (whois reply: "is hiding their idle time")
* relay: close properly connection with the IRC client in case of server disconnection (issue #2038)
* ruby: fix use of NULL variable when displaying exception
[[v4.1.1]]
== Version 4.1.1 (2023-10-26)
@@ -94,6 +120,32 @@ Build::
* core: fix build error if CMake option ENABLE_NLS is turned to off or if required dependencies are not found (issue #2026)
* core, logger, relay: make zstd dependency optional (issue #2024)
[[v4.0.8]]
== Version 4.0.8 (2024-01-20)
Bug fixes::
* core: fix crash on plugin reload when using musl libc (issue #2052)
* core: fix infinite loop in display when the chat area is too small (issue #2053)
* irc: check if arguments are not NULL in some infos
* irc: fix info "irc_is_message_ignored" (issue #2059)
* irc: fix display of self messages when the message split fails due to inconsistent max lengths sent by the server in message 005
[[v4.0.7]]
== Version 4.0.7 (2023-12-03)
Bug fixes::
* core: fix value of buffer variable "num_history" when the value defined in option weechat.history.max_commands is reached
* core: remove incorrect warning when binding keys kbd:[F10] to kbd:[F20] (issue #2039)
* core: fix memory leak when config version is invalid or not supported
* core: fix crash when "config_version" is present in a configuration file without a value
* core: display an error on startup if environment variable "HOME" is not set
* irc: remove trailing "\r\n" in signals "irc_out" and "irc_outtags" when messages are queued
* irc: fix target buffer of IRC message 337 (whois reply: "is hiding their idle time")
* relay: close properly connection with the IRC client in case of server disconnection (issue #2038)
* ruby: fix use of NULL variable when displaying exception
[[v4.0.6]]
== Version 4.0.6 (2023-10-26)
+20
View File
@@ -11,6 +11,16 @@ It is recommended to read it when upgrading to a new stable version. +
For a complete list of changes, please look at ChangeLog.
[[v4.1.3]]
== Version 4.1.3 (2024-01-20)
No release notes.
[[v4.1.2]]
== Version 4.1.2 (2023-12-03)
No release notes.
[[v4.1.1]]
== Version 4.1.1 (2023-10-26)
@@ -140,6 +150,16 @@ You can reset it with this command:
/reset weechat.key_mouse.@chat(fset.fset):button1
----
[[v4.0.8]]
== Version 4.0.8 (2024-01-20)
No release notes.
[[v4.0.7]]
== Version 4.0.7 (2023-12-03)
No release notes.
[[v4.0.6]]
== Version 4.0.6 (2023-10-26)
+6 -1
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-10-19 23:54+0200\n"
"POT-Creation-Date: 2023-10-30 23:26+0100\n"
"PO-Revision-Date: 2023-09-06 19:13+0200\n"
"Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -4708,6 +4708,11 @@ msgid ""
"Error: unable to create a temporary home directory (using template: \"%s\")\n"
msgstr "%s%s: nemohu vytvořit adresář pro logy (\"%s\")"
#, fuzzy
#| msgid "Environment variable \"%s\" is not defined"
msgid "Error: environment variable \"HOME\" is not defined\n"
msgstr "Proměnná prostředí \"%s\" není definována"
#, fuzzy, c-format
msgid "Error: \"%s\" is not a directory\n"
msgstr "Chyba: domovský adresář (%s) není adresářem\n"
+6 -1
View File
@@ -26,7 +26,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-10-19 23:54+0200\n"
"POT-Creation-Date: 2023-10-30 23:26+0100\n"
"PO-Revision-Date: 2023-10-11 07:51+0200\n"
"Last-Translator: Nils Görs <weechatter@arcor.de>\n"
"Language-Team: German <kde-i18n-de@kde.org>\n"
@@ -5918,6 +5918,11 @@ msgstr ""
"Fehler: es kann kein temporäres Heimatverzeichnis angelegt werden (mit "
"Befehl: \"%s\")\n"
#, fuzzy
#| msgid "Environment variable \"%s\" is not defined"
msgid "Error: environment variable \"HOME\" is not defined\n"
msgstr "Umgebungsvariable \"%s\" ist nicht definiert"
#, c-format
msgid "Error: \"%s\" is not a directory\n"
msgstr "Fehler: \"%s\" ist kein Verzeichnis\n"
+6 -1
View File
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-10-19 23:54+0200\n"
"POT-Creation-Date: 2023-10-30 23:26+0100\n"
"PO-Revision-Date: 2023-09-06 19:13+0200\n"
"Last-Translator: Santiago Forero <santiago@forero.xyz>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -5341,6 +5341,11 @@ msgid ""
"Error: unable to create a temporary home directory (using template: \"%s\")\n"
msgstr "%s%s: imposible crear directorio para registros (\"%s\")"
#, fuzzy
#| msgid "Environment variable \"%s\" is not defined"
msgid "Error: environment variable \"HOME\" is not defined\n"
msgstr "Variable \"%s\" no definida"
#, fuzzy, c-format
msgid "Error: \"%s\" is not a directory\n"
msgstr "Error: home (%s) no es un directorio\n"
+5 -2
View File
@@ -21,8 +21,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-10-19 23:54+0200\n"
"PO-Revision-Date: 2023-10-19 23:56+0200\n"
"POT-Creation-Date: 2023-10-30 23:26+0100\n"
"PO-Revision-Date: 2023-10-30 23:27+0100\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: fr\n"
@@ -5788,6 +5788,9 @@ msgstr ""
"Erreur : impossible de créer le répertoire de base temporaire (en utilisant "
"le modèle : \"%s\")\n"
msgid "Error: environment variable \"HOME\" is not defined\n"
msgstr "Erreur : la variable d'environnement \"HOME\" n'est pas définie\n"
#, c-format
msgid "Error: \"%s\" is not a directory\n"
msgstr "Erreur : \"%s\" n'est pas un répertoire\n"
+5 -1
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-10-19 23:54+0200\n"
"POT-Creation-Date: 2023-10-30 23:26+0100\n"
"PO-Revision-Date: 2023-09-06 19:13+0200\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -4236,6 +4236,10 @@ msgid ""
"Error: unable to create a temporary home directory (using template: \"%s\")\n"
msgstr "%s nem sikerült a szervert létrehozni\n"
#, fuzzy
msgid "Error: environment variable \"HOME\" is not defined\n"
msgstr " . típus: szám\n"
#, fuzzy, c-format
msgid "Error: \"%s\" is not a directory\n"
msgstr "%s nem sikerült a \"%s\" könyvtárat létrehozni\n"
+5 -1
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-10-19 23:54+0200\n"
"POT-Creation-Date: 2023-10-30 23:26+0100\n"
"PO-Revision-Date: 2023-09-06 19:13+0200\n"
"Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -4977,6 +4977,10 @@ msgid ""
"Error: unable to create a temporary home directory (using template: \"%s\")\n"
msgstr "%s%s: impossibile creare la directory per i log (\"%s\")"
#, fuzzy
msgid "Error: environment variable \"HOME\" is not defined\n"
msgstr "Variabili"
#, fuzzy, c-format
msgid "Error: \"%s\" is not a directory\n"
msgstr "Errore: home (%s) non è una directory\n"
+6 -1
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-10-19 23:54+0200\n"
"POT-Creation-Date: 2023-10-30 23:26+0100\n"
"PO-Revision-Date: 2023-09-06 19:13+0200\n"
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
"Language-Team: Japanese <https://github.com/l/weechat/tree/master/"
@@ -5626,6 +5626,11 @@ msgid ""
msgstr ""
"エラー: 一時的なホームディレクリ (テンプレート: \"%s\") を作成できません\n"
#, fuzzy
#| msgid "Environment variable \"%s\" is not defined"
msgid "Error: environment variable \"HOME\" is not defined\n"
msgstr "環境変数 \"%s\" が定義されていません"
#, fuzzy, c-format
msgid "Error: \"%s\" is not a directory\n"
msgstr "エラー: ホーム (%s) はディレクトリではありません\n"
+6 -1
View File
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-10-19 23:54+0200\n"
"POT-Creation-Date: 2023-10-30 23:26+0100\n"
"PO-Revision-Date: 2023-09-06 19:13+0200\n"
"Last-Translator: Krzysztof Korościk <soltys@soltys.info>\n"
"Language-Team: Polish <kde-i18n-doc@kde.org>\n"
@@ -6198,6 +6198,11 @@ msgstr ""
"Błąd: nie można utworzyć tymczasowego katalogu domowego (używając szablonu: "
"\"%s\")\n"
#, fuzzy
#| msgid "Environment variable \"%s\" is not defined"
msgid "Error: environment variable \"HOME\" is not defined\n"
msgstr "Zmienna środowiskowa \"%s\" nie jest zdefiniowana"
#, c-format
msgid "Error: \"%s\" is not a directory\n"
msgstr "Błąd: „%s” nie jest katalogiem\n"
+6 -1
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-10-19 23:54+0200\n"
"POT-Creation-Date: 2023-10-30 23:26+0100\n"
"PO-Revision-Date: 2023-09-06 19:13+0200\n"
"Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n"
"Language-Team: Portuguese <>\n"
@@ -5615,6 +5615,11 @@ msgid ""
"Error: unable to create a temporary home directory (using template: \"%s\")\n"
msgstr "%s%s: não foi possível criar diretório para registos (\"%s\")"
#, fuzzy
#| msgid "Environment variable \"%s\" is not defined"
msgid "Error: environment variable \"HOME\" is not defined\n"
msgstr "A variável de ambiente \"%s\" não está definida"
#, fuzzy, c-format
msgid "Error: \"%s\" is not a directory\n"
msgstr "Erro: a base (%s) não é um diretório\n"
+5 -1
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-10-19 23:54+0200\n"
"POT-Creation-Date: 2023-10-30 23:26+0100\n"
"PO-Revision-Date: 2023-09-06 19:13+0200\n"
"Last-Translator: Érico Nogueira <ericonr@disroot.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -4981,6 +4981,10 @@ msgid ""
"Error: unable to create a temporary home directory (using template: \"%s\")\n"
msgstr "%s%s: não foi possível criar diretório para registros (\"%s\")"
#, fuzzy
msgid "Error: environment variable \"HOME\" is not defined\n"
msgstr "Variáveis"
#, fuzzy, c-format
msgid "Error: \"%s\" is not a directory\n"
msgstr "Erro: (%s) não é um diretório\n"
+5 -1
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-10-19 23:54+0200\n"
"POT-Creation-Date: 2023-10-30 23:26+0100\n"
"PO-Revision-Date: 2023-09-06 19:13+0200\n"
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -4266,6 +4266,10 @@ msgid ""
"Error: unable to create a temporary home directory (using template: \"%s\")\n"
msgstr "%s не могу создать сервер \"%s\"\n"
#, fuzzy
msgid "Error: environment variable \"HOME\" is not defined\n"
msgstr " . тип: целочисленный\n"
#, fuzzy, c-format
msgid "Error: \"%s\" is not a directory\n"
msgstr "%s домашний каталог (%s) не является директорией\n"
+6 -1
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-10-19 23:54+0200\n"
"POT-Creation-Date: 2023-10-30 23:26+0100\n"
"PO-Revision-Date: 2023-09-06 19:13+0200\n"
"Last-Translator: Ivan Pešić <ivan.pesic@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -5706,6 +5706,11 @@ msgstr ""
"Грешка: не може да се креира привремени почетни директоријум (користећи "
"шаблон: \"%s\")\n"
#, fuzzy
#| msgid "Environment variable \"%s\" is not defined"
msgid "Error: environment variable \"HOME\" is not defined\n"
msgstr "Није дефинисана променљива окружења „%s”"
#, c-format
msgid "Error: \"%s\" is not a directory\n"
msgstr "Грешка: „%s” није директоријум\n"
+6 -1
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-10-19 23:54+0200\n"
"POT-Creation-Date: 2023-10-30 23:26+0100\n"
"PO-Revision-Date: 2023-09-06 19:13+0200\n"
"Last-Translator: Emir SARI <emir_sari@icloud.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -5758,6 +5758,11 @@ msgid ""
msgstr ""
"Hata: Geçici bir ev dizini oluşturulamıyor (kullanılan şablon: \"%s\")\n"
#, fuzzy
#| msgid "Environment variable \"%s\" is not defined"
msgid "Error: environment variable \"HOME\" is not defined\n"
msgstr "Ortam değişkeni \"%s\" tanımlanmamış"
#, c-format
msgid "Error: \"%s\" is not a directory\n"
msgstr "Hata: \"%s\" bir dizin değil\n"
+4 -1
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-10-19 23:54+0200\n"
"POT-Creation-Date: 2023-10-30 23:26+0100\n"
"PO-Revision-Date: 2014-08-16 10:27+0200\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -3882,6 +3882,9 @@ msgid ""
"Error: unable to create a temporary home directory (using template: \"%s\")\n"
msgstr ""
msgid "Error: environment variable \"HOME\" is not defined\n"
msgstr ""
#, c-format
msgid "Error: \"%s\" is not a directory\n"
msgstr ""
+1
View File
@@ -146,6 +146,7 @@ hook_process_hashtable (struct t_weechat_plugin *plugin,
ptr_value = hashtable_get (options, "buffer_flush");
if (ptr_value && ptr_value[0])
{
error = NULL;
number = strtol (ptr_value, &error, 10);
if (error && !error[0]
&& (number >= 1) && (number <= HOOK_PROCESS_BUFFER_SIZE))
+3
View File
@@ -739,6 +739,7 @@ COMMAND_CALLBACK(buffer)
else
{
ptr_buffer = gui_buffer_search_by_number_or_name (argv[i]);
error = NULL;
(void) strtol (argv[i], &error, 10);
clear_number = (error && !error[0]);
}
@@ -974,6 +975,7 @@ COMMAND_CALLBACK(buffer)
ptr_buffer = gui_buffer_search_by_number_or_name (argv[i]);
if (ptr_buffer)
{
error = NULL;
(void) strtol (argv[i], &error, 10);
if (error && !error[0])
{
@@ -1012,6 +1014,7 @@ COMMAND_CALLBACK(buffer)
ptr_buffer = gui_buffer_search_by_number_or_name (argv[i]);
if (ptr_buffer)
{
error = NULL;
(void) strtol (argv[i], &error, 10);
if (error && !error[0])
{
+12
View File
@@ -3255,6 +3255,10 @@ config_file_parse_version (const char *version)
long number;
char *error;
if (!version)
return -1;
error = NULL;
number = strtoll (version, &error, 10);
if (!error || error[0])
return -1;
@@ -3667,6 +3671,10 @@ config_file_read_internal (struct t_config_file *config_file, int reload)
filename, line_number,
line);
config_file_backup (filename);
if (option)
free (option);
if (value)
free (value);
goto end_file;
}
else
@@ -3684,6 +3692,10 @@ config_file_read_internal (struct t_config_file *config_file, int reload)
config_file->version_read,
config_file->version);
config_file_backup (filename);
if (option)
free (option);
if (value)
free (value);
goto end_file;
}
}
+16 -5
View File
@@ -442,6 +442,9 @@ dir_find_xdg_dirs (char **config_dir, char **data_dir, char **cache_dir,
*runtime_dir = NULL;
ptr_home = getenv ("HOME");
if (!ptr_home)
goto error_home;
xdg_config_home = getenv ("XDG_CONFIG_HOME");
xdg_data_home = getenv ("XDG_DATA_HOME");
xdg_cache_home = getenv ("XDG_CACHE_HOME");
@@ -462,7 +465,7 @@ dir_find_xdg_dirs (char **config_dir, char **data_dir, char **cache_dir,
}
*config_dir = strdup (path);
if (!*config_dir)
goto error;
goto error_memory;
/* set data dir: $XDG_DATA_HOME/weechat or $HOME/.local/share/weechat */
if (xdg_data_home && xdg_data_home[0])
@@ -480,7 +483,7 @@ dir_find_xdg_dirs (char **config_dir, char **data_dir, char **cache_dir,
}
*data_dir = strdup (path);
if (!*data_dir)
goto error;
goto error_memory;
/* set cache dir: $XDG_CACHE_HOME/weechat or $HOME/.cache/weechat */
if (xdg_cache_home && xdg_cache_home[0])
@@ -497,7 +500,7 @@ dir_find_xdg_dirs (char **config_dir, char **data_dir, char **cache_dir,
}
*cache_dir = strdup (path);
if (!*cache_dir)
goto error;
goto error_memory;
/* set runtime dir: $XDG_RUNTIME_DIR/weechat or same as cache dir */
if (xdg_runtime_dir && xdg_runtime_dir[0])
@@ -512,10 +515,19 @@ dir_find_xdg_dirs (char **config_dir, char **data_dir, char **cache_dir,
*runtime_dir = strdup (*cache_dir);
}
if (!*runtime_dir)
goto error;
goto error_memory;
return 1;
error_home:
string_fprintf (stderr,
_("Error: environment variable \"HOME\" is not defined\n"));
goto error;
error_memory:
string_fprintf (stderr, _("Error: not enough memory\n"));
goto error;
error:
if (*config_dir)
{
@@ -537,7 +549,6 @@ error:
free (*runtime_dir);
*runtime_dir = NULL;
}
string_fprintf (stderr, _("Error: not enough memory\n"));
return 0;
}
+7 -4
View File
@@ -598,10 +598,13 @@ doc_gen_user_options (const char *path, const char *lang)
free (default_value);
}
string_fprintf (
file,
"// end::%s_options[]\n",
old_config->name);
if (old_config)
{
string_fprintf (
file,
"// end::%s_options[]\n",
old_config->name);
}
arraylist_free (list_options);
+11
View File
@@ -413,6 +413,7 @@ eval_string_cut (const char *text, int screen)
if (!tmp)
return strdup ("");
error = NULL;
number = strtol (tmp, &error, 10);
if (!error || error[0] || (number < 0))
{
@@ -453,6 +454,7 @@ eval_string_repeat (const char *text)
if (!tmp)
return strdup ("");
error = NULL;
number = strtol (tmp, &error, 10);
if (!error || error[0] || (number < 0))
{
@@ -538,6 +540,7 @@ eval_string_split (const char *text)
}
else
{
error = NULL;
number = strtol (str_number, &error, 10);
if (!error || error[0] || (number == 0))
goto end;
@@ -578,6 +581,7 @@ eval_string_split (const char *text)
}
else if (strncmp (list_flags[i], "max_items=", 10) == 0)
{
error = NULL;
max_items = strtol (list_flags[i] + 10, &error, 10);
if (!error || error[0] || (max_items < 0))
goto end;
@@ -686,6 +690,7 @@ eval_string_split_shell (const char *text)
}
else
{
error = NULL;
number = strtol (str_number, &error, 10);
if (!error || error[0] || (number == 0))
goto end;
@@ -766,6 +771,7 @@ eval_string_regex_group (const char *text, struct t_eval_context *eval_context)
}
else
{
error = NULL;
number = strtol (text, &error, 10);
if (!error || error[0])
number = -1;
@@ -897,6 +903,7 @@ eval_string_base_encode (const char *text)
if (!base)
goto end;
error = NULL;
number = strtol (base, &error, 10);
if (!error || error[0])
goto end;
@@ -946,6 +953,7 @@ eval_string_base_decode (const char *text)
if (!base)
goto end;
error = NULL;
number = strtol (base, &error, 10);
if (!error || error[0])
goto end;
@@ -1087,6 +1095,7 @@ eval_string_random (const char *text)
tmp = string_strndup (text, pos - text);
if (!tmp)
goto error;
error = NULL;
min_number = strtoll (tmp, &error, 10);
if (!error || error[0])
{
@@ -1095,6 +1104,7 @@ eval_string_random (const char *text)
}
free (tmp);
error = NULL;
max_number = strtoll (pos + 1, &error, 10);
if (!error || error[0])
goto error;
@@ -2616,6 +2626,7 @@ eval_expression (const char *expr, struct t_hashtable *pointers,
ptr_value = hashtable_get (options, "debug");
if (ptr_value && ptr_value[0])
{
error = NULL;
number = strtol (ptr_value, &error, 10);
if (error && !error[0] && (number >= 1))
{
+1
View File
@@ -3343,6 +3343,7 @@ string_parse_size (const char *size)
if (!str_number)
goto end;
error = NULL;
number = strtoll (str_number, &error, 10);
if (!error || error[0])
goto end;
+4
View File
@@ -643,6 +643,8 @@ gui_chat_display_word (struct t_gui_window *window,
nick_offline);
}
ptr_data[pos_saved_char] = saved_char;
if (pos_saved_char == 0)
break;
ptr_data += pos_saved_char;
}
else
@@ -664,6 +666,8 @@ gui_chat_display_word (struct t_gui_window *window,
apply_style_inactive,
nick_offline);
}
if (!ptr_data[0])
break;
ptr_data += strlen (ptr_data);
}
+4
View File
@@ -2213,6 +2213,7 @@ gui_buffer_set_unread (struct t_gui_buffer *buffer, const char *argument)
else if (argument[0] == '-')
{
/* move the unread marker N lines towards the first line */
error = NULL;
number = strtol (argument, &error, 10);
if (error && !error[0] && (number < 0))
{
@@ -2240,6 +2241,7 @@ gui_buffer_set_unread (struct t_gui_buffer *buffer, const char *argument)
else if (argument[0] == '+')
{
/* move the unread marker N lines towards the last line */
error = NULL;
number = strtol (argument, &error, 10);
if (error && !error[0] && (number > 0))
{
@@ -2265,6 +2267,7 @@ gui_buffer_set_unread (struct t_gui_buffer *buffer, const char *argument)
else
{
/* move the unread marker N lines from the end towards the first line */
error = NULL;
number = strtol (argument, &error, 10);
if (error && !error[0] && (number > 0))
{
@@ -2953,6 +2956,7 @@ gui_buffer_search_by_number_or_name (const char *string)
ptr_buffer = NULL;
error = NULL;
number = strtol (string, &error, 10);
if (error && !error[0])
{
+4
View File
@@ -597,6 +597,9 @@ gui_chat_printf_date_tags_internal (struct t_gui_buffer *buffer,
char *modifier_data, *string, *new_string, *pos_newline;
struct t_gui_line *new_line;
if (!buffer)
return;
new_line = NULL;
string = NULL;
modifier_data = NULL;
@@ -1076,6 +1079,7 @@ gui_chat_hsignal_quote_line_cb (const void *pointer, void *data,
hashtable_get (hashtable, "_chat_line_date") : NULL;
if (date)
{
error = NULL;
number = strtol (date, &error, 10);
if (error && !error[0])
{
+1 -1
View File
@@ -88,7 +88,7 @@ gui_history_buffer_add (struct t_gui_buffer *buffer, const char *string)
free (buffer->last_history->text);
free (buffer->last_history);
buffer->last_history = ptr_history;
buffer->num_history++;
buffer->num_history--;
}
}
}
+2 -2
View File
@@ -75,8 +75,8 @@ char *gui_key_modifier_list[] =
{ "meta-", "ctrl-", "shift-", NULL };
char *gui_key_alias_list[] =
{ "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", "f8", "f9", "f10", "f11",
"f12", "f13", "f14", "f15", "f16", "f17", "f18", "f19", "f20",
{ "f10", "f11", "f12", "f13", "f14", "f15", "f16", "f17", "f18", "f19", "f20",
"f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", "f8", "f9",
"home", "insert", "delete", "end", "backspace", "pgup", "pgdn",
"up", "down", "right", "left", "tab", "return", "comma", "space", NULL };
+1
View File
@@ -765,6 +765,7 @@ buflist_bar_item_end ()
for (i = 0; i < BUFLIST_BAR_NUM_ITEMS; i++)
{
weechat_bar_item_remove (buflist_bar_item_buflist[i]);
buflist_bar_item_buflist[i] = NULL;
}
weechat_hashtable_free (buflist_hashtable_pointers);
+10
View File
@@ -844,6 +844,7 @@ buflist_config_free ()
int i;
weechat_config_free (buflist_config_file);
buflist_config_file = NULL;
if (buflist_config_signals_refresh)
buflist_config_free_signals_refresh ();
@@ -859,9 +860,18 @@ buflist_config_free ()
}
if (buflist_config_format_buffer_eval)
{
free (buflist_config_format_buffer_eval);
buflist_config_format_buffer_eval = NULL;
}
if (buflist_config_format_buffer_current_eval)
{
free (buflist_config_format_buffer_current_eval);
buflist_config_format_buffer_current_eval = NULL;
}
if (buflist_config_format_hotlist_eval)
{
free (buflist_config_format_hotlist_eval);
buflist_config_format_hotlist_eval = NULL;
}
}
+3
View File
@@ -62,6 +62,7 @@ buflist_focus_cb (const void *pointer, void *data, struct t_hashtable *info)
ptr_bar_item_line = weechat_hashtable_get (info, "_bar_item_line");
if (!ptr_bar_item_line)
goto end;
error = NULL;
item_line = strtol (ptr_bar_item_line, &error, 10);
if (!error || error[0])
goto end;
@@ -250,9 +251,11 @@ buflist_hsignal_cb (const void *pointer, void *data, const char *signal,
return WEECHAT_RC_OK;
ptr_buffer = (struct t_gui_buffer *)value;
error = NULL;
number = strtol (ptr_number, &error, 10);
if (!error || error[0])
return WEECHAT_RC_OK;
error = NULL;
number2 = strtol (ptr_number2, &error, 10);
if (!error || error[0])
return WEECHAT_RC_OK;
+7
View File
@@ -534,5 +534,12 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
buflist_config_write ();
buflist_config_free ();
buflist_hdata_window = NULL;
buflist_hdata_buffer = NULL;
buflist_hdata_hotlist = NULL;
buflist_hdata_bar = NULL;
buflist_hdata_bar_item = NULL;
buflist_hdata_bar_window = NULL;
return WEECHAT_RC_OK;
}
+7
View File
@@ -638,11 +638,18 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
charset_config_write ();
weechat_config_free (charset_config_file);
charset_config_file = NULL;
if (charset_terminal)
{
free (charset_terminal);
charset_terminal = NULL;
}
if (charset_internal)
{
free (charset_internal);
charset_internal = NULL;
}
return WEECHAT_RC_OK;
}
+1
View File
@@ -206,6 +206,7 @@ void
exec_config_free ()
{
weechat_config_free (exec_config_file);
exec_config_file = NULL;
if (exec_config_cmd_options)
{
+1
View File
@@ -157,4 +157,5 @@ void
fifo_config_free ()
{
weechat_config_free (fifo_config_file);
fifo_config_file = NULL;
}
+3
View File
@@ -367,6 +367,9 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
weechat_plugin = plugin;
fifo_quiet = 0;
fifo_fd = -1;
if (!fifo_config_init ())
return WEECHAT_RC_ERROR;
+1
View File
@@ -248,4 +248,5 @@ void
fset_bar_item_end ()
{
weechat_bar_item_remove (fset_bar_item_fset);
fset_bar_item_fset = NULL;
}
+16 -4
View File
@@ -1654,9 +1654,21 @@ fset_buffer_init ()
void
fset_buffer_end ()
{
weechat_hashtable_free (fset_buffer_hashtable_pointers);
fset_buffer_hashtable_pointers = NULL;
if (fset_buffer)
{
weechat_buffer_close (fset_buffer);
fset_buffer = NULL;
}
weechat_hashtable_free (fset_buffer_hashtable_extra_vars);
fset_buffer_hashtable_extra_vars = NULL;
if (fset_buffer_hashtable_pointers)
{
weechat_hashtable_free (fset_buffer_hashtable_pointers);
fset_buffer_hashtable_pointers = NULL;
}
if (fset_buffer_hashtable_extra_vars)
{
weechat_hashtable_free (fset_buffer_hashtable_extra_vars);
fset_buffer_hashtable_extra_vars = NULL;
}
}
+1
View File
@@ -1186,6 +1186,7 @@ void
fset_config_free ()
{
weechat_config_free (fset_config_file);
fset_config_file = NULL;
if (fset_config_auto_refresh)
{
+5
View File
@@ -1934,4 +1934,9 @@ fset_option_end ()
weechat_hashtable_free (fset_option_timer_options_changed);
fset_option_timer_options_changed = NULL;
}
if (fset_option_timer_hook)
{
weechat_unhook (fset_option_timer_hook);
fset_option_timer_hook = NULL;
}
}
+15
View File
@@ -1258,6 +1258,11 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
weechat_guile_plugin = plugin;
guile_quiet = 0;
guile_eval_mode = 0;
guile_eval_send_input = 0;
guile_eval_exec_commands = 0;
/* set interpreter name and version */
weechat_hashtable_set (plugin->variables, "interpreter_name",
plugin->name);
@@ -1354,12 +1359,22 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
/* free some data */
if (guile_action_install_list)
{
free (guile_action_install_list);
guile_action_install_list = NULL;
}
if (guile_action_remove_list)
{
free (guile_action_remove_list);
guile_action_remove_list = NULL;
}
if (guile_action_autoload_list)
{
free (guile_action_autoload_list);
guile_action_autoload_list = NULL;
}
weechat_string_dyn_free (guile_buffer_output, 1);
guile_buffer_output = NULL;
return WEECHAT_RC_OK;
}
+1
View File
@@ -4007,6 +4007,7 @@ void
irc_config_free ()
{
weechat_config_free (irc_config_file);
irc_config_file = NULL;
if (irc_config_hook_config_nick_color_options)
{
+13 -1
View File
@@ -344,6 +344,9 @@ irc_info_info_irc_server_isupport_cb (const void *pointer, void *data,
(void) data;
(void) info_name;
if (!arguments || !arguments[0])
return NULL;
isupport_value = NULL;
pos_comma = strchr (arguments, ',');
if (pos_comma)
@@ -382,6 +385,9 @@ irc_info_info_irc_server_isupport_value_cb (const void *pointer, void *data,
(void) data;
(void) info_name;
if (!arguments || !arguments[0])
return NULL;
isupport_value = NULL;
pos_comma = strchr (arguments, ',');
if (pos_comma)
@@ -420,6 +426,9 @@ irc_info_info_irc_server_cap_cb (const void *pointer, void *data,
(void) data;
(void) info_name;
if (!arguments || !arguments[0])
return NULL;
has_cap = 0;
pos_comma = strchr (arguments, ',');
if (pos_comma)
@@ -458,6 +467,9 @@ irc_info_info_irc_server_cap_value_cb (const void *pointer, void *data,
(void) data;
(void) info_name;
if (!arguments || !arguments[0])
return NULL;
cap_value = NULL;
pos_comma = strchr (arguments, ',');
if (pos_comma)
@@ -1262,7 +1274,7 @@ irc_info_init ()
"irc_is_message_ignored",
N_("1 if the nick is ignored (message is not displayed)"),
N_("server,message (message is the raw IRC message)"),
&irc_info_info_irc_is_channel_cb, NULL, NULL);
&irc_info_info_irc_is_message_ignored_cb, NULL, NULL);
/* info_hashtable hooks */
weechat_hook_info_hashtable (
+5
View File
@@ -281,6 +281,7 @@ irc_list_channel_match_filter (struct t_irc_server *server,
else if (strncmp (server->list->filter, "u:>", 3) == 0)
{
/* filter by users (> N)*/
error = NULL;
number = strtol (server->list->filter + 3, &error, 10);
if (error && !error[0] && channel->users > (int)number)
return 1;
@@ -288,6 +289,7 @@ irc_list_channel_match_filter (struct t_irc_server *server,
else if (strncmp (server->list->filter, "u:<", 3) == 0)
{
/* filter by users (< N)*/
error = NULL;
number = strtol (server->list->filter + 3, &error, 10);
if (error && !error[0] && channel->users < (int)number)
return 1;
@@ -295,6 +297,7 @@ irc_list_channel_match_filter (struct t_irc_server *server,
else if (strncmp (server->list->filter, "u:", 2) == 0)
{
/* filter by users */
error = NULL;
number = strtol (server->list->filter + 2, &error, 10);
if (error && !error[0] && channel->users >= (int)number)
return 1;
@@ -437,6 +440,7 @@ irc_list_parse_messages (struct t_irc_server *server, const char *output)
ptr_name++;
}
channel->name2 = strdup (ptr_name);
error = NULL;
number = strtol (params[2], &error, 10);
channel->users = (error && !error[0]) ? number : 0;
channel->topic = (num_params > 3) ?
@@ -1336,4 +1340,5 @@ irc_list_end ()
weechat_hashtable_free (irc_list_filter_hashtable_options);
irc_list_filter_hashtable_options = NULL;
}
irc_list_hdata_list_channel = NULL;
}
+11 -6
View File
@@ -625,6 +625,7 @@ irc_message_parse_cap_multiline_value (struct t_irc_server *server,
ptr_value = (const char *)weechat_hashtable_get (values, "max-bytes");
if (ptr_value)
{
error = NULL;
number = strtol (ptr_value, &error, 10);
if (error && !error[0])
server->multiline_max_bytes = number;
@@ -633,6 +634,7 @@ irc_message_parse_cap_multiline_value (struct t_irc_server *server,
ptr_value = (const char *)weechat_hashtable_get (values, "max-lines");
if (ptr_value)
{
error = NULL;
number = strtol (ptr_value, &error, 10);
if (error && !error[0])
server->multiline_max_lines = number;
@@ -1053,9 +1055,6 @@ irc_message_split_string (struct t_irc_message_split_context *context,
if (suffix)
max_length -= strlen (suffix);
if (max_length < 2)
return 0;
/* debug message */
if (weechat_irc_plugin->debug >= 2)
{
@@ -1067,17 +1066,23 @@ irc_message_split_string (struct t_irc_message_split_context *context,
max_length);
}
if (!arguments || !arguments[0])
if ((max_length < 2) || !arguments || !arguments[0])
{
snprintf (message, sizeof (message), "%s%s%s %s%s%s%s",
/*
* max length is not known (server probably sent values that are not
* consistent), or no arguments => in this case, we just return message
* as-is (no split)
*/
snprintf (message, sizeof (message), "%s%s%s %s%s%s%s%s",
(host) ? host : "",
(host) ? " " : "",
command,
(target) ? target : "",
(target && target[0]) ? " " : "",
(prefix) ? prefix : "",
(arguments) ? arguments : "",
(suffix) ? suffix : "");
irc_message_split_add (context, tags, message, "");
irc_message_split_add (context, tags, message, (arguments) ? arguments : "");
(context->number)++;
return 1;
}
+9
View File
@@ -1288,9 +1288,18 @@ void
irc_notify_end ()
{
if (irc_notify_timer_ison)
{
weechat_unhook (irc_notify_timer_ison);
irc_notify_timer_ison = NULL;
}
if (irc_notify_timer_whois)
{
weechat_unhook (irc_notify_timer_whois);
irc_notify_timer_whois = NULL;
}
if (irc_notify_hsignal)
{
weechat_unhook (irc_notify_hsignal);
irc_notify_hsignal = NULL;
}
}
+3 -1
View File
@@ -341,6 +341,7 @@ irc_protocol_parse_time (const char *time)
pos = strchr (time2, ',');
if (pos)
pos[0] = '\0';
error = NULL;
value = strtol (time2, &error, 10);
if (error && !error[0] && (value >= 0))
time_value = (int)value;
@@ -8034,7 +8035,8 @@ irc_protocol_recv_command (struct t_irc_server *server,
IRCB(331, 1, 0, 331), /* no topic for channel */
IRCB(332, 0, 1, 332), /* topic of channel */
IRCB(333, 1, 0, 333), /* topic info (nick/date) */
IRCB(335, 1, 0, whois_nick_msg), /* is a bot on */
IRCB(335, 1, 0, whois_nick_msg), /* whois (is a bot on) */
IRCB(337, 1, 0, whois_nick_msg), /* whois (is hiding idle time) */
IRCB(338, 1, 0, 338), /* whois (host) */
IRCB(341, 1, 0, 341), /* inviting */
IRCB(343, 1, 0, 330_343), /* is opered as */
+5
View File
@@ -673,6 +673,11 @@ irc_raw_end ()
{
irc_raw_message_free_all ();
if (irc_raw_buffer)
{
weechat_buffer_close (irc_raw_buffer);
irc_raw_buffer = NULL;
}
if (irc_raw_filter)
{
free (irc_raw_filter);
+4
View File
@@ -462,6 +462,7 @@ irc_redirect_new_with_commands (struct t_irc_server *server,
if (pos)
{
pos[0] = '\0';
error = NULL;
value = strtol (pos + 1, &error, 10);
if (!error || error[0])
value = -1;
@@ -1309,6 +1310,7 @@ irc_redirect_pattern_hsignal_cb (const void *pointer, void *data,
timeout = 0;
if (str_timeout && str_timeout[0])
{
error = NULL;
number = (int)strtol (str_timeout, &error, 10);
if (error && !error[0])
timeout = number;
@@ -1379,6 +1381,7 @@ irc_redirect_command_hsignal_cb (const void *pointer, void *data,
count = 1;
if (str_count && str_count[0])
{
error = NULL;
number = (int)strtol (str_count, &error, 10);
if (error && !error[0])
count = number;
@@ -1387,6 +1390,7 @@ irc_redirect_command_hsignal_cb (const void *pointer, void *data,
timeout = 0;
if (str_timeout && str_timeout[0])
{
error = NULL;
number = (int)strtol (str_timeout, &error, 10);
if (error && !error[0])
timeout = number;
+4 -2
View File
@@ -2850,11 +2850,10 @@ irc_server_outqueue_send (struct t_irc_server *server)
'\r');
if (pos)
pos[0] = '\0';
irc_raw_print (server, IRC_RAW_FLAG_SEND |
((server->outqueue[priority]->modified) ? IRC_RAW_FLAG_MODIFIED : 0),
server->outqueue[priority]->message_after_mod);
if (pos)
pos[0] = '\r';
/* send signal with command that will be sent to server */
(void) irc_server_send_signal (
@@ -2872,6 +2871,9 @@ irc_server_outqueue_send (struct t_irc_server *server)
if (tags_to_send)
free (tags_to_send);
if (pos)
pos[0] = '\r';
/* send command */
irc_server_send (
server, server->outqueue[priority]->message_after_mod,
+6
View File
@@ -193,6 +193,9 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
weechat_plugin = plugin;
irc_signal_quit_received = 0;
irc_signal_upgrade_received = 0;
if (!irc_config_init ())
return WEECHAT_RC_ERROR;
@@ -314,7 +317,10 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
(void) plugin;
if (irc_hook_timer)
{
weechat_unhook (irc_hook_timer);
irc_hook_timer = NULL;
}
if (irc_signal_upgrade_received)
{
+14
View File
@@ -930,6 +930,11 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
weechat_js_plugin = plugin;
js_quiet = 0;
js_eval_mode = 0;
js_eval_send_input = 0;
js_eval_exec_commands = 0;
/* set interpreter name and version */
snprintf (str_interpreter, sizeof (str_interpreter),
"%s (v8)", plugin->name);
@@ -980,11 +985,20 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
/* free some data */
if (js_action_install_list)
{
free (js_action_install_list);
js_action_install_list = NULL;
}
if (js_action_remove_list)
{
free (js_action_remove_list);
js_action_remove_list = NULL;
}
if (js_action_autoload_list)
{
free (js_action_autoload_list);
js_action_autoload_list = NULL;
}
/* weechat_string_dyn_free (js_buffer_output, 1); */
return WEECHAT_RC_OK;
-1
View File
@@ -261,7 +261,6 @@ logger_backlog_file (struct t_gui_buffer *buffer, const char *filename,
struct t_arraylist *last_lines, *messages;
int i, num_msgs, old_input_multiline;
num_msgs = 0;
last_lines = logger_tail_file (filename, lines);
if (!last_lines)
return;
+1
View File
@@ -780,4 +780,5 @@ void
logger_config_free ()
{
weechat_config_free (logger_config_file);
logger_config_file = NULL;
}
+15
View File
@@ -1243,6 +1243,11 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
weechat_lua_plugin = plugin;
lua_quiet = 0;
lua_eval_mode = 0;
lua_eval_send_input = 0;
lua_eval_exec_commands = 0;
/* set interpreter name and version */
weechat_hashtable_set (plugin->variables, "interpreter_name",
plugin->name);
@@ -1304,12 +1309,22 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
/* free some data */
if (lua_action_install_list)
{
free (lua_action_install_list);
lua_action_install_list = NULL;
}
if (lua_action_remove_list)
{
free (lua_action_remove_list);
lua_action_remove_list = NULL;
}
if (lua_action_autoload_list)
{
free (lua_action_autoload_list);
lua_action_autoload_list = NULL;
}
weechat_string_dyn_free (lua_buffer_output, 1);
lua_buffer_output = NULL;
return WEECHAT_RC_OK;
}
+15
View File
@@ -1264,6 +1264,11 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
weechat_perl_plugin = plugin;
perl_quiet = 0;
perl_eval_mode = 0;
perl_eval_send_input = 0;
perl_eval_exec_commands = 0;
/* set interpreter name and version */
weechat_hashtable_set (plugin->variables, "interpreter_name",
plugin->name);
@@ -1368,12 +1373,22 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
/* free some data */
if (perl_action_install_list)
{
free (perl_action_install_list);
perl_action_install_list = NULL;
}
if (perl_action_remove_list)
{
free (perl_action_remove_list);
perl_action_remove_list = NULL;
}
if (perl_action_autoload_list)
{
free (perl_action_autoload_list);
perl_action_autoload_list = NULL;
}
weechat_string_dyn_free (perl_buffer_output, 1);
perl_buffer_output = NULL;
return WEECHAT_RC_OK;
}
+14
View File
@@ -1311,6 +1311,11 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
weechat_php_plugin = plugin;
php_quiet = 0;
php_eval_mode = 0;
php_eval_send_input = 0;
php_eval_exec_commands = 0;
/* set interpreter name and version */
weechat_hashtable_set (plugin->variables, "interpreter_name",
plugin->name);
@@ -1385,11 +1390,20 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
php_embed_shutdown ();
if (php_action_install_list)
{
free (php_action_install_list);
php_action_install_list = NULL;
}
if (php_action_remove_list)
{
free (php_action_remove_list);
php_action_remove_list = NULL;
}
if (php_action_autoload_list)
{
free (php_action_autoload_list);
php_action_autoload_list = NULL;
}
/* weechat_string_dyn_free (php_buffer_output, 1); */
return WEECHAT_RC_OK;
+2
View File
@@ -877,6 +877,7 @@ plugin_api_info_nick_color_ignore_case_cb (const void *pointer, void *data,
case_range = -1;
if (num_items >= 2)
{
error = NULL;
number = strtol (items[1], &error, 10);
if (error && !error[0])
case_range = (int)number;
@@ -916,6 +917,7 @@ plugin_api_info_nick_color_name_ignore_case_cb (const void *pointer, void *data,
case_range = -1;
if (num_items >= 2)
{
error = NULL;
number = strtol (items[1], &error, 10);
if (error && !error[0])
case_range = (int)number;
+1
View File
@@ -1796,6 +1796,7 @@ plugin_script_end (struct t_weechat_plugin *weechat_plugin,
/* write config file (file: "<language>.conf") */
weechat_config_write (*(plugin_data->config_file));
weechat_config_free (*(plugin_data->config_file));
*(plugin_data->config_file) = NULL;
}
/*
+15
View File
@@ -1471,6 +1471,11 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
weechat_python_plugin = plugin;
python_quiet = 0;
python_eval_mode = 0;
python_eval_send_input = 0;
python_eval_exec_commands = 0;
/* set interpreter name and version */
weechat_hashtable_set (plugin->variables, "interpreter_name",
plugin->name);
@@ -1582,12 +1587,22 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
/* free some data */
if (python_action_install_list)
{
free (python_action_install_list);
python_action_install_list = NULL;
}
if (python_action_remove_list)
{
free (python_action_remove_list);
python_action_remove_list = NULL;
}
if (python_action_autoload_list)
{
free (python_action_autoload_list);
python_action_autoload_list = NULL;
}
weechat_string_dyn_free (python_buffer_output, 1);
python_buffer_output = NULL;
return WEECHAT_RC_OK;
}
+7
View File
@@ -616,6 +616,13 @@ relay_irc_signal_irc_disc_cb (const void *pointer, void *data,
if (strcmp ((char *)signal_data, client->protocol_args) == 0)
{
relay_irc_sendf (client,
":%s ERROR :WeeChat: disconnected from server \"%s\"",
RELAY_IRC_DATA(client, address),
client->protocol_args);
relay_irc_sendf (client,
":%s ERROR :Closing Link",
RELAY_IRC_DATA(client, address));
relay_client_set_status (client, RELAY_STATUS_DISCONNECTED);
}
+1
View File
@@ -247,6 +247,7 @@ relay_auth_parse_pbkdf2 (const char *parameters,
}
/* parameter 2: iterations */
error = NULL;
*iterations = (int)strtol (argv[1], &error, 10);
if (!error || error[0])
*iterations = 0;
+1
View File
@@ -1460,6 +1460,7 @@ void
relay_config_free ()
{
weechat_config_free (relay_config_file);
relay_config_file = NULL;
if (relay_config_regex_allowed_ips)
{
+3
View File
@@ -162,6 +162,9 @@ relay_network_set_priority ()
void
relay_network_init ()
{
relay_network_init_ok = 0;
relay_network_init_tls_cert_key_ok = 0;
/* credentials */
gnutls_certificate_allocate_credentials (&relay_gnutls_x509_cred);
relay_network_set_tls_cert_key (0);
+9
View File
@@ -203,6 +203,8 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
weechat_plugin = plugin;
relay_signal_upgrade_received = 0;
if (!relay_config_init ())
return WEECHAT_RC_ERROR;
@@ -240,7 +242,10 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
(void) plugin;
if (relay_hook_timer)
{
weechat_unhook (relay_hook_timer);
relay_hook_timer = NULL;
}
relay_config_write ();
@@ -254,7 +259,11 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
relay_server_free_all ();
if (relay_buffer)
{
weechat_buffer_close (relay_buffer);
relay_buffer = NULL;
}
relay_buffer_selected_line = 0;
relay_client_free_all ();
+16 -1
View File
@@ -287,7 +287,7 @@ weechat_ruby_print_exception (VALUE err)
err_class = StringValuePtr (class_name);
}
if (strcmp (err_class, "SyntaxError") == 0)
if (err_class && (strcmp (err_class, "SyntaxError") == 0))
{
tmp3 = rb_inspect (err);
weechat_printf (NULL,
@@ -1336,6 +1336,11 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
weechat_ruby_plugin = plugin;
ruby_quiet = 0;
ruby_eval_mode = 0;
ruby_eval_send_input = 0;
ruby_eval_exec_commands = 0;
/* set interpreter name and version */
weechat_hashtable_set (plugin->variables, "interpreter_name",
plugin->name);
@@ -1439,12 +1444,22 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
/* free some data */
if (ruby_action_install_list)
{
free (ruby_action_install_list);
ruby_action_install_list = NULL;
}
if (ruby_action_remove_list)
{
free (ruby_action_remove_list);
ruby_action_remove_list = NULL;
}
if (ruby_action_autoload_list)
{
free (ruby_action_autoload_list);
ruby_action_autoload_list = NULL;
}
weechat_string_dyn_free (ruby_buffer_output, 1);
ruby_buffer_output = NULL;
return WEECHAT_RC_OK;
}
+1
View File
@@ -840,4 +840,5 @@ void
script_config_free ()
{
weechat_config_free (script_config_file);
script_config_file = NULL;
}
+27
View File
@@ -386,6 +386,27 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
/* make C compiler happy */
(void) plugin;
if (script_loaded)
{
weechat_hashtable_free (script_loaded);
script_loaded = NULL;
}
if (script_timer_refresh)
{
weechat_unhook (script_timer_refresh);
script_timer_refresh = NULL;
}
if (script_buffer)
{
weechat_buffer_close (script_buffer);
script_buffer = NULL;
}
script_buffer_selected_line = 0;
script_buffer_detail_script = NULL;
script_buffer_detail_script_last_line = 0;
script_buffer_detail_script_line_diff = -1;
script_mouse_end ();
script_config_write ();
@@ -393,10 +414,16 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
script_repo_remove_all ();
if (script_repo_filter)
{
free (script_repo_filter);
script_repo_filter = NULL;
}
if (script_loaded)
{
weechat_hashtable_free (script_loaded);
script_loaded = NULL;
}
script_config_free ();
+7
View File
@@ -654,9 +654,16 @@ void
spell_config_free ()
{
weechat_config_free (spell_config_file);
spell_config_file = NULL;
if (spell_commands_to_check)
{
weechat_string_free_split (spell_commands_to_check);
spell_commands_to_check = NULL;
}
if (spell_length_commands_to_check)
{
free (spell_length_commands_to_check);
spell_length_commands_to_check = NULL;
}
}
+3
View File
@@ -501,5 +501,8 @@ void
spell_speller_end ()
{
weechat_hashtable_free (spell_spellers);
spell_spellers = NULL;
weechat_hashtable_free (spell_speller_buffer);
spell_speller_buffer = NULL;
}
+7
View File
@@ -1188,6 +1188,8 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
weechat_plugin = plugin;
spell_enabled = 0;
spell_warning_aspell_config ();
#ifdef USE_ENCHANT
@@ -1260,10 +1262,15 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
#ifdef USE_ENCHANT
/* release enchant broker */
enchant_broker_free (broker);
broker = NULL;
#endif /* USE_ENCHANT */
if (spell_nick_completer)
{
free (spell_nick_completer);
spell_nick_completer = NULL;
}
spell_len_nick_completer = 0;
return WEECHAT_RC_OK;
}
+14 -1
View File
@@ -56,7 +56,6 @@ struct t_plugin_script *tcl_script_eval = NULL;
int tcl_eval_mode = 0;
int tcl_eval_send_input = 0;
int tcl_eval_exec_commands = 0;
struct t_gui_buffer *tcl_eval_buffer = NULL;
struct t_plugin_script *tcl_scripts = NULL;
struct t_plugin_script *last_tcl_script = NULL;
@@ -928,6 +927,11 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
weechat_tcl_plugin = plugin;
tcl_quiet = 0;
tcl_eval_mode = 0;
tcl_eval_send_input = 0;
tcl_eval_exec_commands = 0;
/* set interpreter name and version */
weechat_hashtable_set (plugin->variables, "interpreter_name",
plugin->name);
@@ -984,11 +988,20 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
/* free some data */
if (tcl_action_install_list)
{
free (tcl_action_install_list);
tcl_action_install_list = NULL;
}
if (tcl_action_remove_list)
{
free (tcl_action_remove_list);
tcl_action_remove_list = NULL;
}
if (tcl_action_autoload_list)
{
free (tcl_action_autoload_list);
tcl_action_autoload_list = NULL;
}
/* weechat_string_dyn_free (tcl_buffer_output, 1); */
return WEECHAT_RC_OK;
+6
View File
@@ -394,6 +394,12 @@ trigger_buffer_display_trigger (struct t_trigger *trigger,
void
trigger_buffer_end ()
{
if (trigger_buffer)
{
weechat_buffer_close (trigger_buffer);
trigger_buffer = NULL;
}
if (trigger_buffer_filters)
{
weechat_string_free_split (trigger_buffer_filters);
+3
View File
@@ -1534,5 +1534,8 @@ void
trigger_callback_end ()
{
if (trigger_callback_hashtable_options_conditions)
{
weechat_hashtable_free (trigger_callback_hashtable_options_conditions);
trigger_callback_hashtable_options_conditions = NULL;
}
}
+2
View File
@@ -105,6 +105,8 @@ struct t_trigger_context
} \
return __rc;
extern unsigned long trigger_context_id;
extern int trigger_callback_signal_cb (const void *pointer, void *data,
const char *signal,
const char *type_data,
+1
View File
@@ -831,4 +831,5 @@ void
trigger_config_free ()
{
weechat_config_free (trigger_config_file);
trigger_config_file = NULL;
}
+3
View File
@@ -1391,6 +1391,8 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
weechat_plugin = plugin;
trigger_enabled = 1;
trigger_callback_init ();
trigger_command_init ();
@@ -1427,6 +1429,7 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
trigger_free_all ();
trigger_config_free ();
trigger_callback_end ();
trigger_context_id = 0;
return WEECHAT_RC_OK;
}
+1
View File
@@ -218,4 +218,5 @@ void
typing_config_free ()
{
weechat_config_free (typing_config_file);
typing_config_file = NULL;
}
+41
View File
@@ -580,6 +580,45 @@ typing_setup_hooks ()
}
}
/*
* Removes all hooks.
*/
void
typing_remove_hooks ()
{
if (typing_signal_buffer_closing)
{
weechat_unhook (typing_signal_buffer_closing);
typing_signal_buffer_closing = NULL;
}
if (typing_signal_input_text_changed)
{
weechat_unhook (typing_signal_input_text_changed);
typing_signal_input_text_changed = NULL;
}
if (typing_modifier_input_text_for_buffer)
{
weechat_unhook (typing_modifier_input_text_for_buffer);
typing_modifier_input_text_for_buffer = NULL;
}
if (typing_timer)
{
weechat_unhook (typing_timer);
typing_timer = NULL;
}
if (typing_signal_typing_set_nick)
{
weechat_unhook (typing_signal_typing_set_nick);
typing_signal_typing_set_nick = NULL;
}
if (typing_signal_typing_reset_buffer)
{
weechat_unhook (typing_signal_typing_reset_buffer);
typing_signal_typing_reset_buffer = NULL;
}
}
/*
* Initializes typing plugin.
*/
@@ -615,6 +654,8 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
/* make C compiler happy */
(void) plugin;
typing_remove_hooks ();
typing_config_write ();
typing_config_free ();
+1
View File
@@ -63,6 +63,7 @@ xfer_network_convert_integer_to_ipv4 (const char *str_address)
if (!str_address || !str_address[0])
return NULL;
error = NULL;
number = strtoll (str_address, &error, 10);
if (!error || error[0] || (number <= 0) || (number > UINT32_MAX))
return NULL;
+14 -3
View File
@@ -1064,6 +1064,9 @@ xfer_add_cb (const void *pointer, void *data,
token = weechat_infolist_string (infolist, "token");
protocol = XFER_NO_PROTOCOL;
memset (&local_addr_storage, 0, sizeof (local_addr_storage));
local_addr_length = sizeof (local_addr_storage);
if (!plugin_name || !plugin_id || !str_type || !remote_nick || !local_nick)
{
weechat_printf (NULL,
@@ -1234,8 +1237,6 @@ xfer_add_cb (const void *pointer, void *data,
{
/* no own_ip, so bind_addr's family comes from irc connection */
/* use the local interface, from the server socket */
memset (&local_addr_storage, 0, sizeof (local_addr_storage));
local_addr_length = sizeof (local_addr_storage);
server_sock = weechat_infolist_integer (infolist, "socket");
if (getsockname (server_sock, (struct sockaddr *)&local_addr_storage, &local_addr_length))
{
@@ -1330,7 +1331,7 @@ xfer_add_cb (const void *pointer, void *data,
}
}
if (XFER_IS_FILE(type))
if (XFER_IS_FILE(type) && filename2)
{
/* extract short filename (without path) */
pos = strrchr (filename2, DIR_SEPARATOR_CHAR);
@@ -1837,6 +1838,8 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
weechat_plugin = plugin;
xfer_signal_upgrade_received = 0;
if (!xfer_config_init ())
return WEECHAT_RC_ERROR;
@@ -1879,6 +1882,13 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
/* make C compiler happy */
(void) plugin;
if (xfer_buffer)
{
weechat_buffer_close (xfer_buffer);
xfer_buffer = NULL;
}
xfer_buffer_selected_line = 0;
xfer_config_write ();
if (xfer_signal_upgrade_received)
@@ -1889,6 +1899,7 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
xfer_free_all ();
weechat_config_free (xfer_config_file);
xfer_config_file = NULL;
return WEECHAT_RC_OK;
}
+2
View File
@@ -903,6 +903,7 @@ TEST(CoreString, ExpandHome)
int length_home;
home = getenv ("HOME");
CHECK(home);
length_home = strlen (home);
POINTERS_EQUAL(NULL, string_expand_home (NULL));
@@ -927,6 +928,7 @@ TEST(CoreString, EvalPathHome)
struct t_hashtable *extra_vars, *options;
home = getenv ("HOME");
CHECK(home);
length_home = strlen (home);
length_weechat_config_dir = strlen (weechat_config_dir);
+14
View File
@@ -1053,18 +1053,32 @@ TEST(GuiKey, SeemsValid)
LONGS_EQUAL(0, gui_key_seems_valid (GUI_KEY_CONTEXT_DEFAULT, "meta-cb"));
LONGS_EQUAL(0, gui_key_seems_valid (GUI_KEY_CONTEXT_DEFAULT, "meta-updown"));
LONGS_EQUAL(0, gui_key_seems_valid (GUI_KEY_CONTEXT_DEFAULT, "@chat:button1"));
LONGS_EQUAL(0, gui_key_seems_valid (GUI_KEY_CONTEXT_DEFAULT, "meta-test"));
LONGS_EQUAL(0, gui_key_seems_valid (GUI_KEY_CONTEXT_DEFAULT, "ctrl-test"));
LONGS_EQUAL(0, gui_key_seems_valid (GUI_KEY_CONTEXT_DEFAULT, "shift-test"));
/* valid keys */
LONGS_EQUAL(1, gui_key_seems_valid (GUI_KEY_CONTEXT_DEFAULT, "a"));
LONGS_EQUAL(1, gui_key_seems_valid (GUI_KEY_CONTEXT_DEFAULT, "A"));
LONGS_EQUAL(1, gui_key_seems_valid (GUI_KEY_CONTEXT_DEFAULT, "é"));
LONGS_EQUAL(1, gui_key_seems_valid (GUI_KEY_CONTEXT_DEFAULT, "/"));
LONGS_EQUAL(1, gui_key_seems_valid (GUI_KEY_CONTEXT_DEFAULT, "f1"));
LONGS_EQUAL(1, gui_key_seems_valid (GUI_KEY_CONTEXT_DEFAULT, "f10"));
LONGS_EQUAL(1, gui_key_seems_valid (GUI_KEY_CONTEXT_DEFAULT, "f11"));
LONGS_EQUAL(1, gui_key_seems_valid (GUI_KEY_CONTEXT_DEFAULT, "f2"));
LONGS_EQUAL(1, gui_key_seems_valid (GUI_KEY_CONTEXT_DEFAULT, "f20"));
LONGS_EQUAL(1, gui_key_seems_valid (GUI_KEY_CONTEXT_DEFAULT, "meta-a"));
LONGS_EQUAL(1, gui_key_seems_valid (GUI_KEY_CONTEXT_DEFAULT, "meta-ctrl-a"));
LONGS_EQUAL(1, gui_key_seems_valid (GUI_KEY_CONTEXT_DEFAULT, "meta-c,b"));
LONGS_EQUAL(1, gui_key_seems_valid (GUI_KEY_CONTEXT_DEFAULT, "meta-w,meta-up"));
LONGS_EQUAL(1, gui_key_seems_valid (GUI_KEY_CONTEXT_DEFAULT, "ctrl-left"));
LONGS_EQUAL(1, gui_key_seems_valid (GUI_KEY_CONTEXT_DEFAULT, "ctrl-u"));
LONGS_EQUAL(1, gui_key_seems_valid (GUI_KEY_CONTEXT_DEFAULT, "shift-home"));
LONGS_EQUAL(1, gui_key_seems_valid (GUI_KEY_CONTEXT_DEFAULT, "shift-f1"));
LONGS_EQUAL(1, gui_key_seems_valid (GUI_KEY_CONTEXT_DEFAULT, "shift-f10"));
LONGS_EQUAL(1, gui_key_seems_valid (GUI_KEY_CONTEXT_DEFAULT, "shift-f11"));
LONGS_EQUAL(1, gui_key_seems_valid (GUI_KEY_CONTEXT_DEFAULT, "shift-f2"));
LONGS_EQUAL(1, gui_key_seems_valid (GUI_KEY_CONTEXT_DEFAULT, "shift-f20"));
LONGS_EQUAL(1, gui_key_seems_valid (GUI_KEY_CONTEXT_CURSOR, "@chat:q"));
LONGS_EQUAL(1, gui_key_seems_valid (GUI_KEY_CONTEXT_MOUSE, "@chat:button1"));
}
@@ -1137,6 +1137,7 @@ TEST(IrcMessage, Split)
struct t_hashtable *hashtable;
const char *ptr_msg, *pos1, *pos2;
char batch_ref[512], msg[4096];
int old_nick_max_length;
server = irc_server_alloc ("test_split_msg");
CHECK(server);
@@ -1552,6 +1553,21 @@ TEST(IrcMessage, Split)
(const char *)hashtable_get (hashtable, "args1"));
hashtable_free (hashtable);
/* PRIVMSG with small content but inconsistent max length: no split */
old_nick_max_length = server->nick_max_length;
server->nick_max_length = 4096;
hashtable = irc_message_split (server, "PRIVMSG #channel :test");
CHECK(hashtable);
LONGS_EQUAL(3, hashtable->items_count);
STRCMP_EQUAL("1",
(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"));
hashtable_free (hashtable);
server->nick_max_length = old_nick_max_length;
/* PRIVMSG with 512 bytes of content: 1 split */
hashtable = irc_message_split (server,
"PRIVMSG #channel :" LOREM_IPSUM_512);
+10 -1
View File
@@ -3562,7 +3562,8 @@ TEST(IrcProtocolWithServer, 221)
* 319: whois (channels)
* 320: whois (identified user)
* 326: whois (has oper privs)
* 335: is a bot on
* 335: whois (is a bot on)
* 337: whois ((is hiding idle time)
* 378: whois (connecting from)
* 379: whois (using modes)
* 671: whois (secure connection)
@@ -3621,6 +3622,10 @@ TEST(IrcProtocolWithServer, whois_nick_msg)
CHECK_ERROR_PARAMS("335", 0, 2);
RECV(":server 335 alice");
CHECK_ERROR_PARAMS("335", 1, 2);
RECV(":server 337");
CHECK_ERROR_PARAMS("337", 0, 2);
RECV(":server 337 alice");
CHECK_ERROR_PARAMS("337", 1, 2);
RECV(":server 378");
CHECK_ERROR_PARAMS("378", 0, 2);
RECV(":server 378 alice");
@@ -3687,6 +3692,10 @@ TEST(IrcProtocolWithServer, whois_nick_msg)
CHECK_SRV("--", "[bob] is a bot", "irc_335,irc_numeric,log3");
RECV(":server 335 alice bob");
CHECK_SRV("--", "bob", "irc_335,irc_numeric,log3");
RECV(":server 337 alice bob :is hiding their idle time");
CHECK_SRV("--", "[bob] is hiding their idle time", "irc_337,irc_numeric,log3");
RECV(":server 337 alice bob");
CHECK_SRV("--", "bob", "irc_337,irc_numeric,log3");
RECV(":server 378 alice bob");
CHECK_SRV("--", "bob", "irc_378,irc_numeric,log3");
RECV(":server 378 alice bob :connecting from");
+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.1.1"
weechat_devel="4.1.1"
weechat_stable="4.1.3"
weechat_devel="4.1.3"
stable_major=$(echo "${weechat_stable}" | cut -d"." -f1)
stable_minor=$(echo "${weechat_stable}" | cut -d"." -f2)