logger: add option logger.look.backlog_conditions (closes #1132)
This commit is contained in:
parent
9b935836e0
commit
a4b1952c75
@ -25,6 +25,7 @@ New features::
|
||||
* core: add option "add" in command /buffer (issue #1113)
|
||||
* core: add option weechat.completion.partial_completion_templates to force partial completion on specific templates
|
||||
* api: add hashtable with variables in plugin structure
|
||||
* logger: add option logger.look.backlog_conditions (issue #1132)
|
||||
* scripts: add "eval" option in script commands and info "xxx_eval" (python, perl, ruby, lua and guile) (issue #128)
|
||||
* scripts: add infos "xxx_interpreter" and "xxx_version" in script plugins (issue #1075)
|
||||
* scripts: add option "version" in script commands (issue #1075)
|
||||
|
@ -79,3 +79,9 @@
|
||||
** Typ: integer
|
||||
** Werte: 0 .. 2147483647
|
||||
** Standardwert: `+20+`
|
||||
|
||||
* [[option_logger.look.backlog_conditions]] *logger.look.backlog_conditions*
|
||||
** Beschreibung: pass:none[conditions to display the backlog (note: content is evaluated, see /help eval); empty value displays the backlog on all buffers; for example to display backlog on private buffers only: "${type} == private"]
|
||||
** Typ: Zeichenkette
|
||||
** Werte: beliebige Zeichenkette
|
||||
** Standardwert: `+""+`
|
||||
|
@ -79,3 +79,9 @@
|
||||
** type: integer
|
||||
** values: 0 .. 2147483647
|
||||
** default value: `+20+`
|
||||
|
||||
* [[option_logger.look.backlog_conditions]] *logger.look.backlog_conditions*
|
||||
** description: pass:none[conditions to display the backlog (note: content is evaluated, see /help eval); empty value displays the backlog on all buffers; for example to display backlog on private buffers only: "${type} == private"]
|
||||
** type: string
|
||||
** values: any string
|
||||
** default value: `+""+`
|
||||
|
@ -79,3 +79,9 @@
|
||||
** type: entier
|
||||
** valeurs: 0 .. 2147483647
|
||||
** valeur par défaut: `+20+`
|
||||
|
||||
* [[option_logger.look.backlog_conditions]] *logger.look.backlog_conditions*
|
||||
** description: pass:none[conditions pour afficher l'historique (note : le contenu est évalué, voir /help eval) ; une valeur vide affiche l'historique sur tous les tampons ; par exemple pour afficher l'historique seulement sur les tampons privés : "${type} == private"]
|
||||
** type: chaîne
|
||||
** valeurs: toute chaîne
|
||||
** valeur par défaut: `+""+`
|
||||
|
@ -79,3 +79,9 @@
|
||||
** tipo: intero
|
||||
** valori: 0 .. 2147483647
|
||||
** valore predefinito: `+20+`
|
||||
|
||||
* [[option_logger.look.backlog_conditions]] *logger.look.backlog_conditions*
|
||||
** descrizione: pass:none[conditions to display the backlog (note: content is evaluated, see /help eval); empty value displays the backlog on all buffers; for example to display backlog on private buffers only: "${type} == private"]
|
||||
** tipo: stringa
|
||||
** valori: qualsiasi stringa
|
||||
** valore predefinito: `+""+`
|
||||
|
@ -79,3 +79,9 @@
|
||||
** タイプ: 整数
|
||||
** 値: 0 .. 2147483647
|
||||
** デフォルト値: `+20+`
|
||||
|
||||
* [[option_logger.look.backlog_conditions]] *logger.look.backlog_conditions*
|
||||
** 説明: pass:none[conditions to display the backlog (note: content is evaluated, see /help eval); empty value displays the backlog on all buffers; for example to display backlog on private buffers only: "${type} == private"]
|
||||
** タイプ: 文字列
|
||||
** 値: 未制約文字列
|
||||
** デフォルト値: `+""+`
|
||||
|
@ -79,3 +79,9 @@
|
||||
** typ: liczba
|
||||
** wartości: 0 .. 2147483647
|
||||
** domyślna wartość: `+20+`
|
||||
|
||||
* [[option_logger.look.backlog_conditions]] *logger.look.backlog_conditions*
|
||||
** opis: pass:none[conditions to display the backlog (note: content is evaluated, see /help eval); empty value displays the backlog on all buffers; for example to display backlog on private buffers only: "${type} == private"]
|
||||
** typ: ciąg
|
||||
** wartości: dowolny ciąg
|
||||
** domyślna wartość: `+""+`
|
||||
|
8
po/cs.po
8
po/cs.po
@ -21,7 +21,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2018-01-08 21:58+0100\n"
|
||||
"POT-Creation-Date: 2018-01-11 15:55+0100\n"
|
||||
"PO-Revision-Date: 2018-01-06 13:50+0100\n"
|
||||
"Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@ -9729,6 +9729,12 @@ msgstr ""
|
||||
"maximální počet řádek zobrazených z logovacího souboru při vytvořezí nového "
|
||||
"bufferu (0 = žádný zpětný log)"
|
||||
|
||||
msgid ""
|
||||
"conditions to display the backlog (note: content is evaluated, see /help "
|
||||
"eval); empty value displays the backlog on all buffers; for example to "
|
||||
"display backlog on private buffers only: \"${type} == private\""
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy
|
||||
msgid "color for line ending the backlog"
|
||||
msgstr "barva textu pro akce ve vstupní řádce"
|
||||
|
8
po/de.po
8
po/de.po
@ -23,7 +23,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2018-01-08 21:58+0100\n"
|
||||
"POT-Creation-Date: 2018-01-11 15:55+0100\n"
|
||||
"PO-Revision-Date: 2018-01-07 14:46+0100\n"
|
||||
"Last-Translator: Nils Görs <weechatter@arcor.de>\n"
|
||||
"Language-Team: German <kde-i18n-de@kde.org>\n"
|
||||
@ -11498,6 +11498,12 @@ msgstr ""
|
||||
"maximale Anzahl der letzten Zeilen die aus der Protokolldatei dargestellt "
|
||||
"werden sollen, sobald ein Buffer geöffnet wird (0 = kein Darstellung)"
|
||||
|
||||
msgid ""
|
||||
"conditions to display the backlog (note: content is evaluated, see /help "
|
||||
"eval); empty value displays the backlog on all buffers; for example to "
|
||||
"display backlog on private buffers only: \"${type} == private\""
|
||||
msgstr ""
|
||||
|
||||
msgid "color for line ending the backlog"
|
||||
msgstr "Farbe für die letzte Zeile im Verlaufsspeicher"
|
||||
|
||||
|
8
po/es.po
8
po/es.po
@ -22,7 +22,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2018-01-08 21:58+0100\n"
|
||||
"POT-Creation-Date: 2018-01-11 15:55+0100\n"
|
||||
"PO-Revision-Date: 2018-01-06 13:50+0100\n"
|
||||
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@ -10055,6 +10055,12 @@ msgstr ""
|
||||
"máximo número de líneas a mostrar del registro cuando se crea un buffer "
|
||||
"nuevo (0 = no mostrar nada)"
|
||||
|
||||
msgid ""
|
||||
"conditions to display the backlog (note: content is evaluated, see /help "
|
||||
"eval); empty value displays the backlog on all buffers; for example to "
|
||||
"display backlog on private buffers only: \"${type} == private\""
|
||||
msgstr ""
|
||||
|
||||
msgid "color for line ending the backlog"
|
||||
msgstr "color para el final de línea del último registro"
|
||||
|
||||
|
14
po/fr.po
14
po/fr.po
@ -21,8 +21,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2018-01-08 15:01+0100\n"
|
||||
"PO-Revision-Date: 2018-01-08 21:55+0100\n"
|
||||
"POT-Creation-Date: 2018-01-11 15:55+0100\n"
|
||||
"PO-Revision-Date: 2018-01-11 16:03+0100\n"
|
||||
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
"Language: fr\n"
|
||||
@ -11231,6 +11231,16 @@ msgstr ""
|
||||
"nombre maximum de lignes à afficher du fichier de log lors de l'ouverture du "
|
||||
"tampon (0 = ne rien afficher)"
|
||||
|
||||
msgid ""
|
||||
"conditions to display the backlog (note: content is evaluated, see /help "
|
||||
"eval); empty value displays the backlog on all buffers; for example to "
|
||||
"display backlog on private buffers only: \"${type} == private\""
|
||||
msgstr ""
|
||||
"conditions pour afficher l'historique (note : le contenu est évalué, voir /"
|
||||
"help eval) ; une valeur vide affiche l'historique sur tous les tampons ; par "
|
||||
"exemple pour afficher l'historique seulement sur les tampons privés : "
|
||||
"\"${type} == private\""
|
||||
|
||||
msgid "color for line ending the backlog"
|
||||
msgstr "couleur pour la ligne de fin de l'historique"
|
||||
|
||||
|
8
po/hu.po
8
po/hu.po
@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2018-01-08 21:58+0100\n"
|
||||
"POT-Creation-Date: 2018-01-11 15:55+0100\n"
|
||||
"PO-Revision-Date: 2018-01-06 13:50+0100\n"
|
||||
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@ -9080,6 +9080,12 @@ msgid ""
|
||||
msgstr ""
|
||||
"felhasználói parancsok maximális száma az előzményekben (0 = korlátlan)"
|
||||
|
||||
msgid ""
|
||||
"conditions to display the backlog (note: content is evaluated, see /help "
|
||||
"eval); empty value displays the backlog on all buffers; for example to "
|
||||
"display backlog on private buffers only: \"${type} == private\""
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy
|
||||
msgid "color for line ending the backlog"
|
||||
msgstr "nevek színe"
|
||||
|
8
po/it.po
8
po/it.po
@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2018-01-08 21:58+0100\n"
|
||||
"POT-Creation-Date: 2018-01-11 15:55+0100\n"
|
||||
"PO-Revision-Date: 2018-01-06 13:50+0100\n"
|
||||
"Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@ -10244,6 +10244,12 @@ msgstr ""
|
||||
"numero massimo di righe da visualizzare dal file di log alla creazione di un "
|
||||
"nuovo buffer (0 = nessuna cronologia)"
|
||||
|
||||
msgid ""
|
||||
"conditions to display the backlog (note: content is evaluated, see /help "
|
||||
"eval); empty value displays the backlog on all buffers; for example to "
|
||||
"display backlog on private buffers only: \"${type} == private\""
|
||||
msgstr ""
|
||||
|
||||
msgid "color for line ending the backlog"
|
||||
msgstr "colore per la riga finale nella cronologia"
|
||||
|
||||
|
8
po/ja.po
8
po/ja.po
@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2018-01-08 21:58+0100\n"
|
||||
"POT-Creation-Date: 2018-01-11 15:55+0100\n"
|
||||
"PO-Revision-Date: 2018-01-08 09:00+0900\n"
|
||||
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
|
||||
"Language-Team: Japanese <https://github.com/l/weechat/tree/master/"
|
||||
@ -10801,6 +10801,12 @@ msgid ""
|
||||
msgstr ""
|
||||
"新規バッファの作成時にログファイルから表示する行の最大数 (0 = バックログ無し)"
|
||||
|
||||
msgid ""
|
||||
"conditions to display the backlog (note: content is evaluated, see /help "
|
||||
"eval); empty value displays the backlog on all buffers; for example to "
|
||||
"display backlog on private buffers only: \"${type} == private\""
|
||||
msgstr ""
|
||||
|
||||
msgid "color for line ending the backlog"
|
||||
msgstr "バックログの最終行の色"
|
||||
|
||||
|
8
po/pl.po
8
po/pl.po
@ -21,7 +21,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2018-01-08 21:58+0100\n"
|
||||
"POT-Creation-Date: 2018-01-11 15:55+0100\n"
|
||||
"PO-Revision-Date: 2018-01-06 13:50+0100\n"
|
||||
"Last-Translator: Krzysztof Korościk <soltys@soltys.info>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@ -10979,6 +10979,12 @@ msgstr ""
|
||||
"maksymalna ilość linii wyświetlana z logu podczas tworzenia nowego bufora (0 "
|
||||
"= bez historii)"
|
||||
|
||||
msgid ""
|
||||
"conditions to display the backlog (note: content is evaluated, see /help "
|
||||
"eval); empty value displays the backlog on all buffers; for example to "
|
||||
"display backlog on private buffers only: \"${type} == private\""
|
||||
msgstr ""
|
||||
|
||||
msgid "color for line ending the backlog"
|
||||
msgstr "kolor linii kończącej backloga"
|
||||
|
||||
|
8
po/pt.po
8
po/pt.po
@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2018-01-08 21:58+0100\n"
|
||||
"POT-Creation-Date: 2018-01-11 15:55+0100\n"
|
||||
"PO-Revision-Date: 2018-01-06 13:50+0100\n"
|
||||
"Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n"
|
||||
"Language-Team: Portuguese <>\n"
|
||||
@ -10690,6 +10690,12 @@ msgstr ""
|
||||
"número máximo de linhas do ficheiro de registo para mostrar ao criar um novo "
|
||||
"buffer (0 = não apresentar registo)"
|
||||
|
||||
msgid ""
|
||||
"conditions to display the backlog (note: content is evaluated, see /help "
|
||||
"eval); empty value displays the backlog on all buffers; for example to "
|
||||
"display backlog on private buffers only: \"${type} == private\""
|
||||
msgstr ""
|
||||
|
||||
msgid "color for line ending the backlog"
|
||||
msgstr "cor da linha que termina o registo recente"
|
||||
|
||||
|
@ -21,7 +21,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2018-01-08 21:58+0100\n"
|
||||
"POT-Creation-Date: 2018-01-11 15:55+0100\n"
|
||||
"PO-Revision-Date: 2018-01-06 13:50+0100\n"
|
||||
"Last-Translator: Eduardo Elias <camponez@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@ -9563,6 +9563,12 @@ msgstr ""
|
||||
"número máximo de linhas a exibir do arquivo de registro (backlog) quando um "
|
||||
"novo buffer for criado (0 = sem backlog)"
|
||||
|
||||
msgid ""
|
||||
"conditions to display the backlog (note: content is evaluated, see /help "
|
||||
"eval); empty value displays the backlog on all buffers; for example to "
|
||||
"display backlog on private buffers only: \"${type} == private\""
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy
|
||||
msgid "color for line ending the backlog"
|
||||
msgstr "cor para o apelido na barra de entrada"
|
||||
|
8
po/ru.po
8
po/ru.po
@ -21,7 +21,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2018-01-08 21:58+0100\n"
|
||||
"POT-Creation-Date: 2018-01-11 15:55+0100\n"
|
||||
"PO-Revision-Date: 2018-01-06 13:50+0100\n"
|
||||
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@ -9117,6 +9117,12 @@ msgid ""
|
||||
"= no backlog)"
|
||||
msgstr "максимальное количество команд в истории (0 = не ограничено)"
|
||||
|
||||
msgid ""
|
||||
"conditions to display the backlog (note: content is evaluated, see /help "
|
||||
"eval); empty value displays the backlog on all buffers; for example to "
|
||||
"display backlog on private buffers only: \"${type} == private\""
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy
|
||||
msgid "color for line ending the backlog"
|
||||
msgstr "цвет ников"
|
||||
|
8
po/tr.po
8
po/tr.po
@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2018-01-08 21:58+0100\n"
|
||||
"POT-Creation-Date: 2018-01-11 15:55+0100\n"
|
||||
"PO-Revision-Date: 2017-06-26 23:33+0200\n"
|
||||
"Last-Translator: Hasan Kiran <sunder67@hotmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@ -8298,6 +8298,12 @@ msgid ""
|
||||
"= no backlog)"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"conditions to display the backlog (note: content is evaluated, see /help "
|
||||
"eval); empty value displays the backlog on all buffers; for example to "
|
||||
"display backlog on private buffers only: \"${type} == private\""
|
||||
msgstr ""
|
||||
|
||||
msgid "color for line ending the backlog"
|
||||
msgstr ""
|
||||
|
||||
|
@ -21,7 +21,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2018-01-08 21:58+0100\n"
|
||||
"POT-Creation-Date: 2018-01-11 15:55+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"
|
||||
@ -8180,6 +8180,12 @@ msgid ""
|
||||
"= no backlog)"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"conditions to display the backlog (note: content is evaluated, see /help "
|
||||
"eval); empty value displays the backlog on all buffers; for example to "
|
||||
"display backlog on private buffers only: \"${type} == private\""
|
||||
msgstr ""
|
||||
|
||||
msgid "color for line ending the backlog"
|
||||
msgstr ""
|
||||
|
||||
|
@ -36,6 +36,7 @@ int logger_config_loading = 0;
|
||||
/* logger config, look section */
|
||||
|
||||
struct t_config_option *logger_config_look_backlog;
|
||||
struct t_config_option *logger_config_look_backlog_conditions;
|
||||
|
||||
/* logger config, color section */
|
||||
|
||||
@ -397,6 +398,16 @@ logger_config_init ()
|
||||
"new buffer (0 = no backlog)"),
|
||||
NULL, 0, INT_MAX, "20", NULL, 0,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
logger_config_look_backlog_conditions = weechat_config_new_option (
|
||||
logger_config_file, ptr_section,
|
||||
"backlog_conditions", "string",
|
||||
N_("conditions to display the backlog "
|
||||
"(note: content is evaluated, see /help eval); "
|
||||
"empty value displays the backlog on all buffers; "
|
||||
"for example to display backlog on private buffers only: "
|
||||
"\"${type} == private\""),
|
||||
NULL, 0, 0, "", NULL, 0,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
|
||||
/* color */
|
||||
ptr_section = weechat_config_new_section (logger_config_file, "color",
|
||||
|
@ -24,6 +24,7 @@
|
||||
|
||||
|
||||
extern struct t_config_option *logger_config_look_backlog;
|
||||
extern struct t_config_option *logger_config_look_backlog_conditions;
|
||||
|
||||
extern struct t_config_option *logger_config_color_backlog_end;
|
||||
extern struct t_config_option *logger_config_color_backlog_line;
|
||||
|
@ -953,6 +953,62 @@ logger_buffer_renamed_signal_cb (const void *pointer, void *data,
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Checks conditions to display the backlog.
|
||||
*
|
||||
* Returns:
|
||||
* 1: conditions OK (backlog is displayed)
|
||||
* 0: conditions not OK (backlog is NOT displayed)
|
||||
*/
|
||||
|
||||
int
|
||||
logger_backlog_check_conditions (struct t_gui_buffer *buffer)
|
||||
{
|
||||
struct t_hashtable *pointers, *options;
|
||||
const char *ptr_condition;
|
||||
char *result;
|
||||
int condition_ok;
|
||||
|
||||
ptr_condition = weechat_config_string (logger_config_look_backlog_conditions);
|
||||
|
||||
/* empty condition displays the backlog everywhere */
|
||||
if (!ptr_condition || !ptr_condition[0])
|
||||
return 1;
|
||||
|
||||
pointers = weechat_hashtable_new (32,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
WEECHAT_HASHTABLE_POINTER,
|
||||
NULL,
|
||||
NULL);
|
||||
if (pointers)
|
||||
{
|
||||
weechat_hashtable_set (pointers, "window",
|
||||
weechat_window_search_with_buffer (buffer));
|
||||
weechat_hashtable_set (pointers, "buffer", buffer);
|
||||
}
|
||||
|
||||
options = weechat_hashtable_new (32,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
NULL,
|
||||
NULL);
|
||||
if (options)
|
||||
weechat_hashtable_set (options, "type", "condition");
|
||||
|
||||
result = weechat_string_eval_expression (ptr_condition,
|
||||
pointers, NULL, options);
|
||||
condition_ok = (result && (strcmp (result, "1") == 0));
|
||||
if (result)
|
||||
free (result);
|
||||
|
||||
if (pointers)
|
||||
weechat_hashtable_free (pointers);
|
||||
if (options)
|
||||
weechat_hashtable_free (options);
|
||||
|
||||
return condition_ok;
|
||||
}
|
||||
|
||||
/*
|
||||
* Displays backlog for a buffer (by reading end of log file).
|
||||
*/
|
||||
@ -1053,24 +1109,24 @@ logger_backlog_signal_cb (const void *pointer, void *data,
|
||||
(void) signal;
|
||||
(void) type_data;
|
||||
|
||||
if (weechat_config_integer (logger_config_look_backlog) >= 0)
|
||||
if (weechat_config_integer (logger_config_look_backlog) == 0)
|
||||
return WEECHAT_RC_OK;
|
||||
|
||||
if (!logger_backlog_check_conditions (signal_data))
|
||||
return WEECHAT_RC_OK;
|
||||
|
||||
ptr_logger_buffer = logger_buffer_search_buffer (signal_data);
|
||||
if (ptr_logger_buffer && ptr_logger_buffer->log_enabled)
|
||||
{
|
||||
ptr_logger_buffer = logger_buffer_search_buffer (signal_data);
|
||||
if (ptr_logger_buffer && ptr_logger_buffer->log_enabled)
|
||||
if (!ptr_logger_buffer->log_filename)
|
||||
logger_set_log_filename (ptr_logger_buffer);
|
||||
if (ptr_logger_buffer->log_filename)
|
||||
{
|
||||
if (!ptr_logger_buffer->log_filename)
|
||||
logger_set_log_filename (ptr_logger_buffer);
|
||||
|
||||
if (ptr_logger_buffer->log_filename)
|
||||
{
|
||||
ptr_logger_buffer->log_enabled = 0;
|
||||
|
||||
logger_backlog (signal_data,
|
||||
ptr_logger_buffer->log_filename,
|
||||
weechat_config_integer (logger_config_look_backlog));
|
||||
|
||||
ptr_logger_buffer->log_enabled = 1;
|
||||
}
|
||||
ptr_logger_buffer->log_enabled = 0;
|
||||
logger_backlog (signal_data,
|
||||
ptr_logger_buffer->log_filename,
|
||||
weechat_config_integer (logger_config_look_backlog));
|
||||
ptr_logger_buffer->log_enabled = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user