mirror of
https://github.com/weechat/weechat.git
synced 2026-07-03 08:13:14 +02:00
trigger: add elapsed time for trigger execution on monitor buffer when trigger debug is set (closes #1806)
This commit is contained in:
@@ -27,6 +27,7 @@ New features::
|
||||
* buflist: add variable `${hotlist_priority_number}` (integer version of `${hotlist_priority}`)
|
||||
* irc: display SETNAME command in channels and private buffers, add options irc.color.message_setname and irc.look.smart_filter_setname (issue #1805)
|
||||
* irc: display an error message when using command /dcc without xfer plugin loaded
|
||||
* trigger: add elapsed time for trigger execution on monitor buffer when trigger debug is set (issue #1806)
|
||||
|
||||
Bug fixes::
|
||||
|
||||
|
||||
@@ -1550,6 +1550,12 @@
|
||||
** Werte: ein Farbname für WeeChat (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), eine Terminal-Farbnummer oder ein Alias; Attribute können vor eine Farbe gesetzt werden (gilt ausschließlich für die Textfarbe und nicht für den Hintergrund): "*" für fett, "!" für invertiert, "/" für kursiv, "_" für unterstrichen
|
||||
** Standardwert: `+lightmagenta+`
|
||||
|
||||
* [[option_trigger.color.identifier]] *trigger.color.identifier*
|
||||
** Beschreibung: pass:none[text color for trigger context identifier in monitor buffer]
|
||||
** Typ: Farbe
|
||||
** Werte: ein Farbname für WeeChat (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), eine Terminal-Farbnummer oder ein Alias; Attribute können vor eine Farbe gesetzt werden (gilt ausschließlich für die Textfarbe und nicht für den Hintergrund): "*" für fett, "!" für invertiert, "/" für kursiv, "_" für unterstrichen
|
||||
** Standardwert: `+cyan+`
|
||||
|
||||
* [[option_trigger.color.regex]] *trigger.color.regex*
|
||||
** Beschreibung: pass:none[Textfarbe für reguläre Ausdrücke]
|
||||
** Typ: Farbe
|
||||
|
||||
@@ -1550,6 +1550,12 @@
|
||||
** values: a WeeChat color name (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), a terminal color number or an alias; attributes are allowed before color (for text color only, not background): "*" for bold, "!" for reverse, "/" for italic, "_" for underline
|
||||
** default value: `+lightmagenta+`
|
||||
|
||||
* [[option_trigger.color.identifier]] *trigger.color.identifier*
|
||||
** description: pass:none[text color for trigger context identifier in monitor buffer]
|
||||
** type: color
|
||||
** values: a WeeChat color name (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), a terminal color number or an alias; attributes are allowed before color (for text color only, not background): "*" for bold, "!" for reverse, "/" for italic, "_" for underline
|
||||
** default value: `+cyan+`
|
||||
|
||||
* [[option_trigger.color.regex]] *trigger.color.regex*
|
||||
** description: pass:none[text color for regular expressions]
|
||||
** type: color
|
||||
|
||||
@@ -1550,6 +1550,12 @@
|
||||
** valeurs: un nom de couleur WeeChat (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), un numéro de couleur du terminal ou un alias ; des attributs sont autorisés avant la couleur (seulement pour la couleur du texte, pas le fond) : "*" pour le gras, "!" pour la vidéo inverse, "/" pour l'italique, "_" pour le souligné
|
||||
** valeur par défaut: `+lightmagenta+`
|
||||
|
||||
* [[option_trigger.color.identifier]] *trigger.color.identifier*
|
||||
** description: pass:none[couleur du texte pour l'identifiant de contexte du trigger dans le tampon moniteur]
|
||||
** type: couleur
|
||||
** valeurs: un nom de couleur WeeChat (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), un numéro de couleur du terminal ou un alias ; des attributs sont autorisés avant la couleur (seulement pour la couleur du texte, pas le fond) : "*" pour le gras, "!" pour la vidéo inverse, "/" pour l'italique, "_" pour le souligné
|
||||
** valeur par défaut: `+cyan+`
|
||||
|
||||
* [[option_trigger.color.regex]] *trigger.color.regex*
|
||||
** description: pass:none[couleur du texte pour les expressions régulières]
|
||||
** type: couleur
|
||||
|
||||
@@ -1550,6 +1550,12 @@
|
||||
** valori: a WeeChat color name (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), a terminal color number or an alias; attributes are allowed before color (for text color only, not background): "*" for bold, "!" for reverse, "/" for italic, "_" for underline
|
||||
** valore predefinito: `+lightmagenta+`
|
||||
|
||||
* [[option_trigger.color.identifier]] *trigger.color.identifier*
|
||||
** descrizione: pass:none[text color for trigger context identifier in monitor buffer]
|
||||
** tipo: colore
|
||||
** valori: a WeeChat color name (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), a terminal color number or an alias; attributes are allowed before color (for text color only, not background): "*" for bold, "!" for reverse, "/" for italic, "_" for underline
|
||||
** valore predefinito: `+cyan+`
|
||||
|
||||
* [[option_trigger.color.regex]] *trigger.color.regex*
|
||||
** descrizione: pass:none[text color for regular expressions]
|
||||
** tipo: colore
|
||||
|
||||
@@ -1550,6 +1550,12 @@
|
||||
** 値: WeeChat の色名 (default、black、(dark)gray、white、(light)red、(light)green、brown、yellow、(light)blue、(light)magenta、(light)cyan) 、端末色番号またはその別名; 色の前に属性を置くことができます (テキスト前景色のみ、背景色は出来ません): 太字は "*"、反転は "!"、イタリックは "/"、下線は "_"
|
||||
** デフォルト値: `+lightmagenta+`
|
||||
|
||||
* [[option_trigger.color.identifier]] *trigger.color.identifier*
|
||||
** 説明: pass:none[text color for trigger context identifier in monitor buffer]
|
||||
** タイプ: 色
|
||||
** 値: WeeChat の色名 (default、black、(dark)gray、white、(light)red、(light)green、brown、yellow、(light)blue、(light)magenta、(light)cyan) 、端末色番号またはその別名; 色の前に属性を置くことができます (テキスト前景色のみ、背景色は出来ません): 太字は "*"、反転は "!"、イタリックは "/"、下線は "_"
|
||||
** デフォルト値: `+cyan+`
|
||||
|
||||
* [[option_trigger.color.regex]] *trigger.color.regex*
|
||||
** 説明: pass:none[正規表現に対するテキスト色]
|
||||
** タイプ: 色
|
||||
|
||||
@@ -1550,6 +1550,12 @@
|
||||
** wartości: nazwa koloru WeeChat (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), numer koloru terminala albo alias; atrybuty dozwolone przed kolorem (tylko dla kolorów testu, nie tła): "*" pogrubienie, "!" odwrócenie, "/" pochylenie, "_" podkreślenie
|
||||
** domyślna wartość: `+lightmagenta+`
|
||||
|
||||
* [[option_trigger.color.identifier]] *trigger.color.identifier*
|
||||
** opis: pass:none[text color for trigger context identifier in monitor buffer]
|
||||
** typ: kolor
|
||||
** wartości: nazwa koloru WeeChat (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), numer koloru terminala albo alias; atrybuty dozwolone przed kolorem (tylko dla kolorów testu, nie tła): "*" pogrubienie, "!" odwrócenie, "/" pochylenie, "_" podkreślenie
|
||||
** domyślna wartość: `+cyan+`
|
||||
|
||||
* [[option_trigger.color.regex]] *trigger.color.regex*
|
||||
** opis: pass:none[kolor tekstu dla wyrażeń regularnych]
|
||||
** typ: kolor
|
||||
|
||||
@@ -1550,6 +1550,12 @@
|
||||
** вредности: име WeeChat боје (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), број terminal боје или алијас; испред боје су дозвољени атрибути (само за боју текста, не и за позадину): „*” за подебљано, „!” за обрнуто, „/” за курзив, „_” за подвучено
|
||||
** подразумевана вредност: `+lightmagenta+`
|
||||
|
||||
* [[option_trigger.color.identifier]] *trigger.color.identifier*
|
||||
** опис: pass:none[text color for trigger context identifier in monitor buffer]
|
||||
** тип: боја
|
||||
** вредности: име WeeChat боје (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), број terminal боје или алијас; испред боје су дозвољени атрибути (само за боју текста, не и за позадину): „*” за подебљано, „!” за обрнуто, „/” за курзив, „_” за подвучено
|
||||
** подразумевана вредност: `+cyan+`
|
||||
|
||||
* [[option_trigger.color.regex]] *trigger.color.regex*
|
||||
** опис: pass:none[боја текста за регуларне изразе]
|
||||
** тип: боја
|
||||
|
||||
@@ -21,7 +21,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2022-08-13 22:39+0200\n"
|
||||
"POT-Creation-Date: 2022-08-15 11:20+0200\n"
|
||||
"PO-Revision-Date: 2022-06-18 16:11+0200\n"
|
||||
"Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -12698,10 +12698,17 @@ msgstr "není proměnná"
|
||||
msgid "creating variable"
|
||||
msgstr "čtení - proměnná"
|
||||
|
||||
#, c-format
|
||||
msgid "%s running command %s\"%s%s%s\"%s on buffer %s%s%s"
|
||||
#, fuzzy, c-format
|
||||
#| msgid "%s running command %s\"%s%s%s\"%s on buffer %s%s%s"
|
||||
msgid "%s%lu%s running command %s\"%s%s%s\"%s on buffer %s%s%s"
|
||||
msgstr "%s běžící povel %s\"%s%s%s\"%s na bufferu %s%s%s"
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%s%lu%s elapsed: init=%.6fs, conditions=%.6fs, regex=%.6fs, command=%.6fs, "
|
||||
"total=%.6fs"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy
|
||||
msgid "Triggers enabled"
|
||||
msgstr "Seznam trigerů:"
|
||||
@@ -13093,6 +13100,10 @@ msgstr "barva textu pro skupiny v seznamu přezdívek"
|
||||
msgid "text color for post action flag (in /trigger list)"
|
||||
msgstr "barva textu pro akce ve vstupní řádce"
|
||||
|
||||
#, fuzzy
|
||||
msgid "text color for trigger context identifier in monitor buffer"
|
||||
msgstr "barva textu řádku vybraného klienta"
|
||||
|
||||
#, fuzzy
|
||||
msgid "text color for regular expressions"
|
||||
msgstr "barva textu pro nahrazující text (pro regulární výraz)"
|
||||
|
||||
@@ -25,7 +25,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2022-08-13 22:39+0200\n"
|
||||
"POT-Creation-Date: 2022-08-15 11:20+0200\n"
|
||||
"PO-Revision-Date: 2022-08-08 10:21+0200\n"
|
||||
"Last-Translator: Nils Görs <weechatter@arcor.de>\n"
|
||||
"Language-Team: German <kde-i18n-de@kde.org>\n"
|
||||
@@ -15281,10 +15281,17 @@ msgstr "keine Variable"
|
||||
msgid "creating variable"
|
||||
msgstr "erstelle Variable"
|
||||
|
||||
#, c-format
|
||||
msgid "%s running command %s\"%s%s%s\"%s on buffer %s%s%s"
|
||||
#, fuzzy, c-format
|
||||
#| msgid "%s running command %s\"%s%s%s\"%s on buffer %s%s%s"
|
||||
msgid "%s%lu%s running command %s\"%s%s%s\"%s on buffer %s%s%s"
|
||||
msgstr "%s auszuführender Befehl %s\"%s%s%s\"%s in Buffer %s%s%s"
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%s%lu%s elapsed: init=%.6fs, conditions=%.6fs, regex=%.6fs, command=%.6fs, "
|
||||
"total=%.6fs"
|
||||
msgstr ""
|
||||
|
||||
msgid "Triggers enabled"
|
||||
msgstr "Trigger aktiviert"
|
||||
|
||||
@@ -15900,6 +15907,11 @@ msgstr ""
|
||||
"Textfarbe für das Flag welches anzeigt welche nachfolgende Aktion ausgeführt "
|
||||
"werden soll (in /trigger list)"
|
||||
|
||||
#, fuzzy
|
||||
#| msgid "hooks for triggers (for filter in monitor buffer)"
|
||||
msgid "text color for trigger context identifier in monitor buffer"
|
||||
msgstr "Hooks für Trigger (definiert den Filter für den Monitor-Buffer)"
|
||||
|
||||
msgid "text color for regular expressions"
|
||||
msgstr "Textfarbe für reguläre Ausdrücke"
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2022-08-13 22:39+0200\n"
|
||||
"POT-Creation-Date: 2022-08-15 11:20+0200\n"
|
||||
"PO-Revision-Date: 2022-06-18 16:11+0200\n"
|
||||
"Last-Translator: Santiago Forero <santiago@forero.xyz>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -13313,9 +13313,15 @@ msgid "creating variable"
|
||||
msgstr "lectura - variable"
|
||||
|
||||
#, fuzzy, c-format
|
||||
msgid "%s running command %s\"%s%s%s\"%s on buffer %s%s%s"
|
||||
msgid "%s%lu%s running command %s\"%s%s%s\"%s on buffer %s%s%s"
|
||||
msgstr "Ejecutando el comando: \"%s\""
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%s%lu%s elapsed: init=%.6fs, conditions=%.6fs, regex=%.6fs, command=%.6fs, "
|
||||
"total=%.6fs"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy
|
||||
msgid "Triggers enabled"
|
||||
msgstr "Filtro \"%s\" activado"
|
||||
@@ -13707,6 +13713,11 @@ msgstr "color para grupos en la lista de apodos"
|
||||
msgid "text color for post action flag (in /trigger list)"
|
||||
msgstr "color para acciones en la línea de entrada"
|
||||
|
||||
#, fuzzy
|
||||
#| msgid "text color for selected line in script buffer"
|
||||
msgid "text color for trigger context identifier in monitor buffer"
|
||||
msgstr "color del texto para la línea seleccionada en el buffer de scripts"
|
||||
|
||||
msgid "text color for regular expressions"
|
||||
msgstr "color para expresiones regulares"
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2022-08-13 22:39+0200\n"
|
||||
"PO-Revision-Date: 2022-08-13 22:43+0200\n"
|
||||
"POT-Creation-Date: 2022-08-15 11:20+0200\n"
|
||||
"PO-Revision-Date: 2022-08-15 11:21+0200\n"
|
||||
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
"Language: fr\n"
|
||||
@@ -14957,8 +14957,16 @@ msgid "creating variable"
|
||||
msgstr "création de la variable"
|
||||
|
||||
#, c-format
|
||||
msgid "%s running command %s\"%s%s%s\"%s on buffer %s%s%s"
|
||||
msgstr "%s lancement de la commande %s\"%s%s%s\"%s sur le tampon %s%s%s"
|
||||
msgid "%s%lu%s running command %s\"%s%s%s\"%s on buffer %s%s%s"
|
||||
msgstr "%s%lu%s lancement de la commande %s\"%s%s%s\"%s sur le tampon %s%s%s"
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%s%lu%s elapsed: init=%.6fs, conditions=%.6fs, regex=%.6fs, command=%.6fs, "
|
||||
"total=%.6fs"
|
||||
msgstr ""
|
||||
"%s%lu%s écoulé : init=%.6fs, conditions=%.6fs, regex=%.6fs, commande=%.6fs, "
|
||||
"total=%.6fs"
|
||||
|
||||
msgid "Triggers enabled"
|
||||
msgstr "Triggers activés"
|
||||
@@ -15477,6 +15485,11 @@ msgid "text color for post action flag (in /trigger list)"
|
||||
msgstr ""
|
||||
"couleur du texte pour le drapeau de l'action \"post\" (dans /trigger list)"
|
||||
|
||||
msgid "text color for trigger context identifier in monitor buffer"
|
||||
msgstr ""
|
||||
"couleur du texte pour l'identifiant de contexte du trigger dans le tampon "
|
||||
"moniteur"
|
||||
|
||||
msgid "text color for regular expressions"
|
||||
msgstr "couleur du texte pour les expressions régulières"
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2022-08-13 22:39+0200\n"
|
||||
"POT-Creation-Date: 2022-08-15 11:20+0200\n"
|
||||
"PO-Revision-Date: 2022-04-24 10:20+0200\n"
|
||||
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -12059,9 +12059,15 @@ msgid "creating variable"
|
||||
msgstr " . típus: szám\n"
|
||||
|
||||
#, fuzzy, c-format
|
||||
msgid "%s running command %s\"%s%s%s\"%s on buffer %s%s%s"
|
||||
msgid "%s%lu%s running command %s\"%s%s%s\"%s on buffer %s%s%s"
|
||||
msgstr "%s belső parancsok:\n"
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%s%lu%s elapsed: init=%.6fs, conditions=%.6fs, regex=%.6fs, command=%.6fs, "
|
||||
"total=%.6fs"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy
|
||||
msgid "Triggers enabled"
|
||||
msgstr "a felhasználók le lettek tiltva"
|
||||
@@ -12449,6 +12455,10 @@ msgstr "név színe"
|
||||
msgid "text color for post action flag (in /trigger list)"
|
||||
msgstr "kilépési nyíl színe"
|
||||
|
||||
#, fuzzy
|
||||
msgid "text color for trigger context identifier in monitor buffer"
|
||||
msgstr "szerver nevének színe"
|
||||
|
||||
#, fuzzy
|
||||
msgid "text color for regular expressions"
|
||||
msgstr "belépési nyíl színe"
|
||||
|
||||
@@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2022-08-13 22:39+0200\n"
|
||||
"POT-Creation-Date: 2022-08-15 11:20+0200\n"
|
||||
"PO-Revision-Date: 2022-04-24 10:20+0200\n"
|
||||
"Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -13136,9 +13136,15 @@ msgid "creating variable"
|
||||
msgstr "lettura - variabile"
|
||||
|
||||
#, fuzzy, c-format
|
||||
msgid "%s running command %s\"%s%s%s\"%s on buffer %s%s%s"
|
||||
msgid "%s%lu%s running command %s\"%s%s%s\"%s on buffer %s%s%s"
|
||||
msgstr "Esecuzione comando: \"%s\""
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%s%lu%s elapsed: init=%.6fs, conditions=%.6fs, regex=%.6fs, command=%.6fs, "
|
||||
"total=%.6fs"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy
|
||||
msgid "Triggers enabled"
|
||||
msgstr "Filtro \"%s\" abilitato"
|
||||
@@ -13530,6 +13536,11 @@ msgstr "colore del testo per i gruppi nella lista nick"
|
||||
msgid "text color for post action flag (in /trigger list)"
|
||||
msgstr "colore del testo per le azioni sulla riga di input"
|
||||
|
||||
#, fuzzy
|
||||
#| msgid "text color for selected line in script buffer"
|
||||
msgid "text color for trigger context identifier in monitor buffer"
|
||||
msgstr "colore del testo della riga selezionata nel buffer degli script"
|
||||
|
||||
#, fuzzy
|
||||
msgid "text color for regular expressions"
|
||||
msgstr "colore del testo per il prefisso di errore"
|
||||
|
||||
@@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2022-08-13 22:39+0200\n"
|
||||
"POT-Creation-Date: 2022-08-15 11:20+0200\n"
|
||||
"PO-Revision-Date: 2022-06-18 16:12+0200\n"
|
||||
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
|
||||
"Language-Team: Japanese <https://github.com/l/weechat/tree/master/"
|
||||
@@ -14253,11 +14253,18 @@ msgstr "変数がありません"
|
||||
msgid "creating variable"
|
||||
msgstr "変数を作成中"
|
||||
|
||||
#, c-format
|
||||
msgid "%s running command %s\"%s%s%s\"%s on buffer %s%s%s"
|
||||
#, fuzzy, c-format
|
||||
#| msgid "%s running command %s\"%s%s%s\"%s on buffer %s%s%s"
|
||||
msgid "%s%lu%s running command %s\"%s%s%s\"%s on buffer %s%s%s"
|
||||
msgstr ""
|
||||
"%1$s バッファ %7$s%8$s%9$s でコマンド %2$s\"%3$s%4$s%5$s\"%6$s を実行中"
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%s%lu%s elapsed: init=%.6fs, conditions=%.6fs, regex=%.6fs, command=%.6fs, "
|
||||
"total=%.6fs"
|
||||
msgstr ""
|
||||
|
||||
msgid "Triggers enabled"
|
||||
msgstr "トリガが有効化されました"
|
||||
|
||||
@@ -14741,6 +14748,11 @@ msgstr "リターンコードに対するテキスト色 (/trigger list 用)"
|
||||
msgid "text color for post action flag (in /trigger list)"
|
||||
msgstr "実行後処遇フラグに対するテキスト色 (/trigger list 用)"
|
||||
|
||||
#, fuzzy
|
||||
#| msgid "hooks for triggers (for filter in monitor buffer)"
|
||||
msgid "text color for trigger context identifier in monitor buffer"
|
||||
msgstr "トリガに対するフック (モニタバッファのフィルタ用)"
|
||||
|
||||
msgid "text color for regular expressions"
|
||||
msgstr "正規表現に対するテキスト色"
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2022-08-13 22:39+0200\n"
|
||||
"POT-Creation-Date: 2022-08-15 11:20+0200\n"
|
||||
"PO-Revision-Date: 2022-06-18 16:12+0200\n"
|
||||
"Last-Translator: Krzysztof Korościk <soltys@soltys.info>\n"
|
||||
"Language-Team: Polish <kde-i18n-doc@kde.org>\n"
|
||||
@@ -14882,10 +14882,17 @@ msgstr "brak zmiennej"
|
||||
msgid "creating variable"
|
||||
msgstr "tworzenie zmiennej"
|
||||
|
||||
#, c-format
|
||||
msgid "%s running command %s\"%s%s%s\"%s on buffer %s%s%s"
|
||||
#, fuzzy, c-format
|
||||
#| msgid "%s running command %s\"%s%s%s\"%s on buffer %s%s%s"
|
||||
msgid "%s%lu%s running command %s\"%s%s%s\"%s on buffer %s%s%s"
|
||||
msgstr "%s wykonuje komendę %s\"%s%s%s\"%s na buforze %s%s%s"
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%s%lu%s elapsed: init=%.6fs, conditions=%.6fs, regex=%.6fs, command=%.6fs, "
|
||||
"total=%.6fs"
|
||||
msgstr ""
|
||||
|
||||
msgid "Triggers enabled"
|
||||
msgstr "Triggery włączone"
|
||||
|
||||
@@ -15480,6 +15487,11 @@ msgstr "kolor tekstu dla flagi zwracanego kodu (w /trigger list)"
|
||||
msgid "text color for post action flag (in /trigger list)"
|
||||
msgstr "kolor tekstu dla flagi końca akcji (w /trigger list)"
|
||||
|
||||
#, fuzzy
|
||||
#| msgid "hooks for triggers (for filter in monitor buffer)"
|
||||
msgid "text color for trigger context identifier in monitor buffer"
|
||||
msgstr "uchwyty dla triggerów (dla filtrowania w buforze monitora)"
|
||||
|
||||
msgid "text color for regular expressions"
|
||||
msgstr "kolor tekstu dla wyrażeń regularnych"
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2022-08-13 22:39+0200\n"
|
||||
"POT-Creation-Date: 2022-08-15 11:20+0200\n"
|
||||
"PO-Revision-Date: 2022-06-18 16:12+0200\n"
|
||||
"Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n"
|
||||
"Language-Team: Portuguese <>\n"
|
||||
@@ -14078,10 +14078,17 @@ msgstr "nenhum variável"
|
||||
msgid "creating variable"
|
||||
msgstr "leitura - variável"
|
||||
|
||||
#, c-format
|
||||
msgid "%s running command %s\"%s%s%s\"%s on buffer %s%s%s"
|
||||
#, fuzzy, c-format
|
||||
#| msgid "%s running command %s\"%s%s%s\"%s on buffer %s%s%s"
|
||||
msgid "%s%lu%s running command %s\"%s%s%s\"%s on buffer %s%s%s"
|
||||
msgstr "%s a executar o comando %s\"%s%s%s\"%s no buffer %s%s%s"
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%s%lu%s elapsed: init=%.6fs, conditions=%.6fs, regex=%.6fs, command=%.6fs, "
|
||||
"total=%.6fs"
|
||||
msgstr ""
|
||||
|
||||
msgid "Triggers enabled"
|
||||
msgstr "Acionadores ativado"
|
||||
|
||||
@@ -14573,6 +14580,11 @@ msgstr "cor do texto para o indicador de código de retorno (em /trigger list)"
|
||||
msgid "text color for post action flag (in /trigger list)"
|
||||
msgstr "cor do texto para o indicador de ação posterior (em /trigger list)"
|
||||
|
||||
#, fuzzy
|
||||
#| msgid "hooks for triggers (for filter in monitor buffer)"
|
||||
msgid "text color for trigger context identifier in monitor buffer"
|
||||
msgstr "hooks de acionadores (de filtros no buffer monitor)"
|
||||
|
||||
msgid "text color for regular expressions"
|
||||
msgstr "cor do texto para expressões regulares"
|
||||
|
||||
|
||||
+13
-2
@@ -21,7 +21,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2022-08-13 22:39+0200\n"
|
||||
"POT-Creation-Date: 2022-08-15 11:20+0200\n"
|
||||
"PO-Revision-Date: 2022-04-24 10:20+0200\n"
|
||||
"Last-Translator: Érico Nogueira <ericonr@disroot.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -12587,9 +12587,15 @@ msgid "creating variable"
|
||||
msgstr "Variáveis"
|
||||
|
||||
#, fuzzy, c-format
|
||||
msgid "%s running command %s\"%s%s%s\"%s on buffer %s%s%s"
|
||||
msgid "%s%lu%s running command %s\"%s%s%s\"%s on buffer %s%s%s"
|
||||
msgstr "Executando comando: \"%s\""
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%s%lu%s elapsed: init=%.6fs, conditions=%.6fs, regex=%.6fs, command=%.6fs, "
|
||||
"total=%.6fs"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy
|
||||
msgid "Triggers enabled"
|
||||
msgstr "Filtro \"%s\" habilitado"
|
||||
@@ -12977,6 +12983,11 @@ msgstr "cor de texto para gropos na lista de apelidos"
|
||||
msgid "text color for post action flag (in /trigger list)"
|
||||
msgstr "cor de texto para ações de linha de entrada"
|
||||
|
||||
#, fuzzy
|
||||
#| msgid "hooks for triggers (for filter in monitor buffer)"
|
||||
msgid "text color for trigger context identifier in monitor buffer"
|
||||
msgstr "hooks para gatilhos (para o filtro no monitor do buffer)"
|
||||
|
||||
#, fuzzy
|
||||
msgid "text color for regular expressions"
|
||||
msgstr "cor do texto para o prefixo de erro"
|
||||
|
||||
@@ -21,7 +21,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2022-08-13 22:39+0200\n"
|
||||
"POT-Creation-Date: 2022-08-15 11:20+0200\n"
|
||||
"PO-Revision-Date: 2022-04-24 10:20+0200\n"
|
||||
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -12097,9 +12097,15 @@ msgid "creating variable"
|
||||
msgstr " . тип: целочисленный\n"
|
||||
|
||||
#, fuzzy, c-format
|
||||
msgid "%s running command %s\"%s%s%s\"%s on buffer %s%s%s"
|
||||
msgid "%s%lu%s running command %s\"%s%s%s\"%s on buffer %s%s%s"
|
||||
msgstr "Внутренние команды %s:\n"
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%s%lu%s elapsed: init=%.6fs, conditions=%.6fs, regex=%.6fs, command=%.6fs, "
|
||||
"total=%.6fs"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy
|
||||
msgid "Triggers enabled"
|
||||
msgstr "команда users отключена"
|
||||
@@ -12486,6 +12492,10 @@ msgstr "цвет ника"
|
||||
msgid "text color for post action flag (in /trigger list)"
|
||||
msgstr "цвет действий в поле ввода"
|
||||
|
||||
#, fuzzy
|
||||
msgid "text color for trigger context identifier in monitor buffer"
|
||||
msgstr "цвет названия сервера"
|
||||
|
||||
#, fuzzy
|
||||
msgid "text color for regular expressions"
|
||||
msgstr "цвет стрелки захода на канал (префикс)"
|
||||
|
||||
@@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2022-08-13 22:39+0200\n"
|
||||
"POT-Creation-Date: 2022-08-15 11:20+0200\n"
|
||||
"PO-Revision-Date: 2022-07-06 08:29+0400\n"
|
||||
"Last-Translator: Ivan Pešić <ivan.pesic@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -14725,10 +14725,17 @@ msgstr "нема променљиве"
|
||||
msgid "creating variable"
|
||||
msgstr "креира се променљива"
|
||||
|
||||
#, c-format
|
||||
msgid "%s running command %s\"%s%s%s\"%s on buffer %s%s%s"
|
||||
#, fuzzy, c-format
|
||||
#| msgid "%s running command %s\"%s%s%s\"%s on buffer %s%s%s"
|
||||
msgid "%s%lu%s running command %s\"%s%s%s\"%s on buffer %s%s%s"
|
||||
msgstr "%s извршава се команда %s„%s%s%s”%s у баферу %s%s%s"
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%s%lu%s elapsed: init=%.6fs, conditions=%.6fs, regex=%.6fs, command=%.6fs, "
|
||||
"total=%.6fs"
|
||||
msgstr ""
|
||||
|
||||
msgid "Triggers enabled"
|
||||
msgstr "Окидачи су укључени"
|
||||
|
||||
@@ -15324,6 +15331,11 @@ msgstr "боја текста за заставицу повратног код
|
||||
msgid "text color for post action flag (in /trigger list)"
|
||||
msgstr "боја текста за заставицу пост акције (у /trigger list)"
|
||||
|
||||
#, fuzzy
|
||||
#| msgid "hooks for triggers (for filter in monitor buffer)"
|
||||
msgid "text color for trigger context identifier in monitor buffer"
|
||||
msgstr "куке за окидаче (за филтере у монитор баферу)"
|
||||
|
||||
msgid "text color for regular expressions"
|
||||
msgstr "боја текста за регуларне изразе"
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2022-08-13 22:39+0200\n"
|
||||
"POT-Creation-Date: 2022-08-15 11:20+0200\n"
|
||||
"PO-Revision-Date: 2022-07-27 23:00+0300\n"
|
||||
"Last-Translator: Emir SARI <emir_sari@icloud.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -14469,10 +14469,17 @@ msgstr "değişken yok"
|
||||
msgid "creating variable"
|
||||
msgstr "değişken oluşturuluyor"
|
||||
|
||||
#, c-format
|
||||
msgid "%s running command %s\"%s%s%s\"%s on buffer %s%s%s"
|
||||
#, fuzzy, c-format
|
||||
#| msgid "%s running command %s\"%s%s%s\"%s on buffer %s%s%s"
|
||||
msgid "%s%lu%s running command %s\"%s%s%s\"%s on buffer %s%s%s"
|
||||
msgstr "%s %s\"%s%s%s\"%s komutu %s%s%s arabelleğinde çalıştırılıyor"
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%s%lu%s elapsed: init=%.6fs, conditions=%.6fs, regex=%.6fs, command=%.6fs, "
|
||||
"total=%.6fs"
|
||||
msgstr ""
|
||||
|
||||
msgid "Triggers enabled"
|
||||
msgstr "Tetikler etkin"
|
||||
|
||||
@@ -15061,6 +15068,11 @@ msgstr "dönüş kodu metin rengi (/trigger list içinde)"
|
||||
msgid "text color for post action flag (in /trigger list)"
|
||||
msgstr "eylem gönderim bayrağı metin rengi (/trigger list içinde)"
|
||||
|
||||
#, fuzzy
|
||||
#| msgid "hooks for triggers (for filter in monitor buffer)"
|
||||
msgid "text color for trigger context identifier in monitor buffer"
|
||||
msgstr "tetik kancaları (ekran arabelleğinde süzmek için)"
|
||||
|
||||
msgid "text color for regular expressions"
|
||||
msgstr "düzenli ifade metin rengi"
|
||||
|
||||
|
||||
+11
-2
@@ -21,7 +21,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2022-08-13 22:39+0200\n"
|
||||
"POT-Creation-Date: 2022-08-15 11:20+0200\n"
|
||||
"PO-Revision-Date: 2014-08-16 10:27+0200\n"
|
||||
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -10916,7 +10916,13 @@ msgid "creating variable"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%s running command %s\"%s%s%s\"%s on buffer %s%s%s"
|
||||
msgid "%s%lu%s running command %s\"%s%s%s\"%s on buffer %s%s%s"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%s%lu%s elapsed: init=%.6fs, conditions=%.6fs, regex=%.6fs, command=%.6fs, "
|
||||
"total=%.6fs"
|
||||
msgstr ""
|
||||
|
||||
msgid "Triggers enabled"
|
||||
@@ -11284,6 +11290,9 @@ msgstr ""
|
||||
msgid "text color for post action flag (in /trigger list)"
|
||||
msgstr ""
|
||||
|
||||
msgid "text color for trigger context identifier in monitor buffer"
|
||||
msgstr ""
|
||||
|
||||
msgid "text color for regular expressions"
|
||||
msgstr ""
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "../weechat-plugin.h"
|
||||
#include "trigger.h"
|
||||
#include "trigger-buffer.h"
|
||||
#include "trigger-callback.h"
|
||||
#include "trigger-config.h"
|
||||
|
||||
|
||||
@@ -250,13 +251,15 @@ trigger_buffer_hashtable_map_cb (void *data,
|
||||
struct t_hashtable *hashtable,
|
||||
const void *key, const void *value)
|
||||
{
|
||||
struct t_trigger_context *context;
|
||||
const char *value_type;
|
||||
char *value_no_color;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) data;
|
||||
(void) hashtable;
|
||||
|
||||
context = (struct t_trigger_context *)data;
|
||||
|
||||
value_type = weechat_hashtable_get_string (hashtable, "type_values");
|
||||
if (!value_type)
|
||||
return;
|
||||
@@ -267,7 +270,9 @@ trigger_buffer_hashtable_map_cb (void *data,
|
||||
weechat_string_remove_color ((const char *)value, NULL) : NULL;
|
||||
weechat_printf_date_tags (
|
||||
trigger_buffer, 0, "no_trigger",
|
||||
"\t %s: %s\"%s%s%s\"",
|
||||
"%s%lu\t %s: %s\"%s%s%s\"",
|
||||
weechat_color (weechat_config_string (trigger_config_color_identifier)),
|
||||
context->id,
|
||||
(char *)key,
|
||||
weechat_color ("chat_delimiters"),
|
||||
weechat_color ("reset"),
|
||||
@@ -278,10 +283,13 @@ trigger_buffer_hashtable_map_cb (void *data,
|
||||
}
|
||||
else if (strcmp (value_type, "pointer") == 0)
|
||||
{
|
||||
weechat_printf_date_tags (trigger_buffer, 0, "no_trigger",
|
||||
"\t %s: 0x%lx",
|
||||
(char *)key,
|
||||
value);
|
||||
weechat_printf_date_tags (
|
||||
trigger_buffer, 0, "no_trigger",
|
||||
"%s%lu\t %s: 0x%lx",
|
||||
weechat_color (weechat_config_string (trigger_config_color_identifier)),
|
||||
context->id,
|
||||
(char *)key,
|
||||
value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -290,15 +298,22 @@ trigger_buffer_hashtable_map_cb (void *data,
|
||||
*/
|
||||
|
||||
void
|
||||
trigger_buffer_display_hashtable (const char *name,
|
||||
trigger_buffer_display_hashtable (struct t_trigger_context *context,
|
||||
const char *name,
|
||||
struct t_hashtable *hashtable)
|
||||
{
|
||||
if (!trigger_buffer)
|
||||
return;
|
||||
|
||||
weechat_printf_date_tags (trigger_buffer, 0, "no_trigger", " %s:", name);
|
||||
weechat_printf_date_tags (
|
||||
trigger_buffer, 0, "no_trigger",
|
||||
"%s%lu\t %s:",
|
||||
weechat_color (weechat_config_string (trigger_config_color_identifier)),
|
||||
context->id,
|
||||
name);
|
||||
|
||||
weechat_hashtable_map (hashtable, &trigger_buffer_hashtable_map_cb, NULL);
|
||||
weechat_hashtable_map (hashtable,
|
||||
&trigger_buffer_hashtable_map_cb, context);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -311,9 +326,7 @@ trigger_buffer_display_hashtable (const char *name,
|
||||
|
||||
int
|
||||
trigger_buffer_display_trigger (struct t_trigger *trigger,
|
||||
struct t_gui_buffer *buffer,
|
||||
struct t_hashtable *pointers,
|
||||
struct t_hashtable *extra_vars)
|
||||
struct t_trigger_context *context)
|
||||
{
|
||||
if (!trigger_buffer)
|
||||
return 0;
|
||||
@@ -324,26 +337,37 @@ trigger_buffer_display_trigger (struct t_trigger *trigger,
|
||||
|
||||
weechat_printf_date_tags (
|
||||
trigger_buffer, 0, "no_trigger",
|
||||
"%s\t%s%s %s(%s%s%s)",
|
||||
"--> %s%lu\t%s: %s%s %s(%s%s%s)%s",
|
||||
weechat_color (weechat_config_string (trigger_config_color_identifier)),
|
||||
context->id,
|
||||
trigger_hook_type_string[weechat_config_integer (trigger->options[TRIGGER_OPTION_HOOK])],
|
||||
weechat_color (weechat_config_string (trigger_config_color_trigger)),
|
||||
trigger->name,
|
||||
weechat_color ("chat_delimiters"),
|
||||
weechat_color ("reset"),
|
||||
weechat_config_string (trigger->options[TRIGGER_OPTION_ARGUMENTS]),
|
||||
weechat_color ("chat_delimiters"));
|
||||
if (buffer)
|
||||
weechat_color ("chat_delimiters"),
|
||||
weechat_color ("reset"));
|
||||
if (context->buffer)
|
||||
{
|
||||
weechat_printf_date_tags (
|
||||
trigger_buffer, 0, "no_trigger",
|
||||
"\t buffer: %s%s",
|
||||
"%s%lu\t buffer: %s%s",
|
||||
weechat_color (weechat_config_string (trigger_config_color_identifier)),
|
||||
context->id,
|
||||
weechat_color ("chat_buffer"),
|
||||
weechat_buffer_get_string (buffer, "full_name"));
|
||||
weechat_buffer_get_string (context->buffer, "full_name"));
|
||||
}
|
||||
if (context->pointers)
|
||||
{
|
||||
trigger_buffer_display_hashtable (context,
|
||||
"pointers", context->pointers);
|
||||
}
|
||||
if (context->extra_vars)
|
||||
{
|
||||
trigger_buffer_display_hashtable (context,
|
||||
"extra_vars", context->extra_vars);
|
||||
}
|
||||
if (pointers)
|
||||
trigger_buffer_display_hashtable ("pointers", pointers);
|
||||
if (extra_vars)
|
||||
trigger_buffer_display_hashtable ("extra_vars", extra_vars);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -22,14 +22,14 @@
|
||||
|
||||
#define TRIGGER_BUFFER_NAME "monitor"
|
||||
|
||||
struct t_trigger_context;
|
||||
|
||||
extern struct t_gui_buffer *trigger_buffer;
|
||||
|
||||
extern void trigger_buffer_set_callbacks ();
|
||||
extern void trigger_buffer_open (const char *filter, int switch_to_buffer);
|
||||
extern int trigger_buffer_display_trigger (struct t_trigger *trigger,
|
||||
struct t_gui_buffer *buffer,
|
||||
struct t_hashtable *pointers,
|
||||
struct t_hashtable *extra_vars);
|
||||
struct t_trigger_context *context);
|
||||
extern void trigger_buffer_end ();
|
||||
|
||||
#endif /* WEECHAT_PLUGIN_TRIGGER_BUFFER_H */
|
||||
|
||||
@@ -22,14 +22,23 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#include "../weechat-plugin.h"
|
||||
#include "trigger.h"
|
||||
#include "trigger-callback.h"
|
||||
#include "trigger-buffer.h"
|
||||
#include "trigger-config.h"
|
||||
|
||||
|
||||
/*
|
||||
* trigger context id to correlate messages in monitor buffer with
|
||||
* the running trigger
|
||||
*/
|
||||
unsigned long trigger_context_id = 0;
|
||||
|
||||
/* hashtable used to evaluate "conditions" */
|
||||
struct t_hashtable *trigger_callback_hashtable_options_conditions = NULL;
|
||||
|
||||
@@ -259,9 +268,7 @@ trigger_callback_check_conditions (struct t_trigger *trigger,
|
||||
|
||||
void
|
||||
trigger_callback_replace_regex (struct t_trigger *trigger,
|
||||
struct t_hashtable *pointers,
|
||||
struct t_hashtable *extra_vars,
|
||||
struct t_weelist *vars_updated,
|
||||
struct t_trigger_context *context,
|
||||
int display_monitor)
|
||||
{
|
||||
char *value;
|
||||
@@ -274,13 +281,13 @@ trigger_callback_replace_regex (struct t_trigger *trigger,
|
||||
if (trigger->regex_count == 0)
|
||||
return;
|
||||
|
||||
if (!pointers)
|
||||
if (!context->pointers)
|
||||
{
|
||||
pointers = weechat_hashtable_new (32,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
WEECHAT_HASHTABLE_POINTER,
|
||||
NULL, NULL);
|
||||
if (!pointers)
|
||||
context->pointers = weechat_hashtable_new (32,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
WEECHAT_HASHTABLE_POINTER,
|
||||
NULL, NULL);
|
||||
if (!context->pointers)
|
||||
return;
|
||||
pointers_allocated = 1;
|
||||
}
|
||||
@@ -299,23 +306,30 @@ trigger_callback_replace_regex (struct t_trigger *trigger,
|
||||
if (trigger_buffer && display_monitor)
|
||||
{
|
||||
weechat_printf_date_tags (trigger_buffer, 0, "no_trigger",
|
||||
"\t regex %d: %s",
|
||||
i + 1, _("no variable"));
|
||||
"%s%lu\t regex %d: %s",
|
||||
weechat_color (weechat_config_string (trigger_config_color_identifier)),
|
||||
context->id,
|
||||
i + 1,
|
||||
_("no variable"));
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
ptr_value = weechat_hashtable_get (extra_vars, ptr_key);
|
||||
ptr_value = weechat_hashtable_get (context->extra_vars, ptr_key);
|
||||
if (!ptr_value)
|
||||
{
|
||||
if (trigger_buffer && display_monitor)
|
||||
{
|
||||
weechat_printf_date_tags (trigger_buffer, 0, "no_trigger",
|
||||
"\t regex %d (%s): %s",
|
||||
i + 1, ptr_key, _("creating variable"));
|
||||
"%s%lu\t regex %d (%s): %s",
|
||||
weechat_color (weechat_config_string (trigger_config_color_identifier)),
|
||||
context->id,
|
||||
i + 1,
|
||||
ptr_key,
|
||||
_("creating variable"));
|
||||
}
|
||||
weechat_hashtable_set (extra_vars, ptr_key, "");
|
||||
ptr_value = weechat_hashtable_get (extra_vars, ptr_key);
|
||||
weechat_hashtable_set (context->extra_vars, ptr_key, "");
|
||||
ptr_value = weechat_hashtable_get (context->extra_vars, ptr_key);
|
||||
}
|
||||
|
||||
hashtable_options_regex = weechat_hashtable_new (
|
||||
@@ -324,15 +338,16 @@ trigger_callback_replace_regex (struct t_trigger *trigger,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
NULL, NULL);
|
||||
|
||||
weechat_hashtable_set (pointers, "regex", trigger->regex[i].regex);
|
||||
weechat_hashtable_set (context->pointers,
|
||||
"regex", trigger->regex[i].regex);
|
||||
weechat_hashtable_set (hashtable_options_regex,
|
||||
"regex_replace",
|
||||
trigger->regex[i].replace_escaped);
|
||||
|
||||
value = weechat_string_eval_expression (
|
||||
ptr_value,
|
||||
pointers,
|
||||
extra_vars,
|
||||
context->pointers,
|
||||
context->extra_vars,
|
||||
hashtable_options_regex);
|
||||
|
||||
weechat_hashtable_free (hashtable_options_regex);
|
||||
@@ -343,8 +358,10 @@ trigger_callback_replace_regex (struct t_trigger *trigger,
|
||||
if (trigger_buffer && display_monitor)
|
||||
{
|
||||
weechat_printf_date_tags (trigger_buffer, 0, "no_trigger",
|
||||
"\t regex %d %s(%s%s%s)%s: "
|
||||
"%s%lu\t regex %d %s(%s%s%s)%s: "
|
||||
"%s\"%s%s%s\"",
|
||||
weechat_color (weechat_config_string (trigger_config_color_identifier)),
|
||||
context->id,
|
||||
i + 1,
|
||||
weechat_color ("chat_delimiters"),
|
||||
weechat_color ("reset"),
|
||||
@@ -356,10 +373,11 @@ trigger_callback_replace_regex (struct t_trigger *trigger,
|
||||
value,
|
||||
weechat_color ("chat_delimiters"));
|
||||
}
|
||||
weechat_hashtable_set (extra_vars, ptr_key, value);
|
||||
if (vars_updated)
|
||||
weechat_hashtable_set (context->extra_vars, ptr_key, value);
|
||||
if (context->vars_updated)
|
||||
{
|
||||
weechat_list_add (vars_updated, ptr_key, WEECHAT_LIST_POS_END,
|
||||
weechat_list_add (context->vars_updated,
|
||||
ptr_key, WEECHAT_LIST_POS_END,
|
||||
NULL);
|
||||
}
|
||||
free (value);
|
||||
@@ -367,9 +385,14 @@ trigger_callback_replace_regex (struct t_trigger *trigger,
|
||||
}
|
||||
|
||||
if (pointers_allocated)
|
||||
weechat_hashtable_free (pointers);
|
||||
{
|
||||
weechat_hashtable_free (context->pointers);
|
||||
context->pointers = NULL;
|
||||
}
|
||||
else
|
||||
weechat_hashtable_remove (pointers, "regex");
|
||||
{
|
||||
weechat_hashtable_remove (context->pointers, "regex");
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -378,17 +401,17 @@ trigger_callback_replace_regex (struct t_trigger *trigger,
|
||||
|
||||
void
|
||||
trigger_callback_run_command (struct t_trigger *trigger,
|
||||
struct t_gui_buffer *buffer,
|
||||
struct t_hashtable *pointers,
|
||||
struct t_hashtable *extra_vars,
|
||||
struct t_trigger_context *context,
|
||||
int display_monitor)
|
||||
{
|
||||
struct t_gui_buffer *buffer;
|
||||
char *command_eval;
|
||||
int i;
|
||||
|
||||
if (!trigger->commands)
|
||||
return;
|
||||
|
||||
buffer = context->buffer;
|
||||
if (!buffer)
|
||||
{
|
||||
buffer = weechat_buffer_search_main ();
|
||||
@@ -399,7 +422,8 @@ trigger_callback_run_command (struct t_trigger *trigger,
|
||||
for (i = 0; trigger->commands[i]; i++)
|
||||
{
|
||||
command_eval = weechat_string_eval_expression (trigger->commands[i],
|
||||
pointers, extra_vars,
|
||||
context->pointers,
|
||||
context->extra_vars,
|
||||
NULL);
|
||||
if (command_eval)
|
||||
{
|
||||
@@ -408,8 +432,10 @@ trigger_callback_run_command (struct t_trigger *trigger,
|
||||
{
|
||||
weechat_printf_date_tags (
|
||||
trigger_buffer, 0, "no_trigger",
|
||||
_("%s running command %s\"%s%s%s\"%s "
|
||||
_("%s%lu%s running command %s\"%s%s%s\"%s "
|
||||
"on buffer %s%s%s"),
|
||||
weechat_color (weechat_config_string (trigger_config_color_identifier)),
|
||||
context->id,
|
||||
"\t",
|
||||
weechat_color ("chat_delimiters"),
|
||||
weechat_color ("reset"),
|
||||
@@ -444,36 +470,78 @@ trigger_callback_run_command (struct t_trigger *trigger,
|
||||
|
||||
int
|
||||
trigger_callback_execute (struct t_trigger *trigger,
|
||||
struct t_gui_buffer *buffer,
|
||||
struct t_hashtable *pointers,
|
||||
struct t_hashtable *extra_vars,
|
||||
struct t_weelist *vars_updated)
|
||||
struct t_trigger_context *context)
|
||||
{
|
||||
int display_monitor;
|
||||
int rc, display_monitor;
|
||||
long long time_init, time_cond, time_regex, time_cmd, time_total;
|
||||
|
||||
rc = 0;
|
||||
|
||||
trigger_context_id = (trigger_context_id < ULONG_MAX) ?
|
||||
trigger_context_id + 1 : 0;
|
||||
context->id = trigger_context_id;
|
||||
|
||||
/* display debug info on trigger buffer */
|
||||
if (!trigger_buffer && (weechat_trigger_plugin->debug >= 1))
|
||||
trigger_buffer_open (NULL, 0);
|
||||
display_monitor = trigger_buffer_display_trigger (trigger,
|
||||
buffer,
|
||||
pointers,
|
||||
extra_vars);
|
||||
display_monitor = trigger_buffer_display_trigger (trigger, context);
|
||||
|
||||
/* check conditions */
|
||||
if (trigger_callback_check_conditions (trigger, pointers, extra_vars))
|
||||
if (weechat_trigger_plugin->debug >= 1)
|
||||
{
|
||||
/* replace text with regex */
|
||||
trigger_callback_replace_regex (trigger, pointers, extra_vars,
|
||||
vars_updated, display_monitor);
|
||||
|
||||
/* execute command(s) */
|
||||
trigger_callback_run_command (trigger, buffer, pointers, extra_vars,
|
||||
display_monitor);
|
||||
|
||||
return 1;
|
||||
gettimeofday (&(context->start_check_conditions), NULL);
|
||||
context->start_replace_regex = context->start_check_conditions;
|
||||
context->start_run_command = context->start_check_conditions;
|
||||
}
|
||||
|
||||
return 0;
|
||||
/* check conditions */
|
||||
if (trigger_callback_check_conditions (trigger,
|
||||
context->pointers,
|
||||
context->extra_vars))
|
||||
{
|
||||
/* replace text with regex */
|
||||
if (weechat_trigger_plugin->debug >= 1)
|
||||
gettimeofday (&(context->start_check_conditions), NULL);
|
||||
trigger_callback_replace_regex (trigger, context, display_monitor);
|
||||
|
||||
/* execute command(s) */
|
||||
if (weechat_trigger_plugin->debug >= 1)
|
||||
gettimeofday (&(context->start_run_command), NULL);
|
||||
trigger_callback_run_command (trigger, context, display_monitor);
|
||||
|
||||
rc = 1;
|
||||
}
|
||||
|
||||
if (weechat_trigger_plugin->debug >= 1)
|
||||
gettimeofday (&(context->end_exec), NULL);
|
||||
|
||||
if (trigger_buffer && display_monitor
|
||||
&& (weechat_trigger_plugin->debug >= 1))
|
||||
{
|
||||
time_init = weechat_util_timeval_diff (&(context->start_exec),
|
||||
&(context->start_check_conditions));
|
||||
time_cond = weechat_util_timeval_diff (&(context->start_check_conditions),
|
||||
&(context->start_replace_regex));
|
||||
time_regex = weechat_util_timeval_diff (&(context->start_replace_regex),
|
||||
&(context->start_run_command));
|
||||
time_cmd = weechat_util_timeval_diff (&(context->start_run_command),
|
||||
&(context->end_exec));
|
||||
time_total = time_init + time_cond + time_regex + time_cmd;
|
||||
|
||||
weechat_printf_date_tags (trigger_buffer, 0, "no_trigger",
|
||||
_("%s%lu%s elapsed: init=%.6fs, "
|
||||
"conditions=%.6fs, regex=%.6fs, "
|
||||
"command=%.6fs, total=%.6fs"),
|
||||
weechat_color (weechat_config_string (trigger_config_color_identifier)),
|
||||
context->id,
|
||||
"\t",
|
||||
(float)time_init / 1000000,
|
||||
(float)time_cond / 1000000,
|
||||
(float)time_regex / 1000000,
|
||||
(float)time_cmd / 1000000,
|
||||
(float)time_total / 1000000);
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -527,32 +595,33 @@ trigger_callback_signal_cb (const void *pointer, void *data,
|
||||
}
|
||||
if (irc_server_name && ptr_irc_message)
|
||||
{
|
||||
extra_vars = trigger_callback_irc_message_parse (ptr_irc_message,
|
||||
irc_server_name);
|
||||
if (extra_vars)
|
||||
ctx.extra_vars = trigger_callback_irc_message_parse (
|
||||
ptr_irc_message,
|
||||
irc_server_name);
|
||||
if (ctx.extra_vars)
|
||||
{
|
||||
weechat_hashtable_set (extra_vars, "server", irc_server_name);
|
||||
weechat_hashtable_set (ctx.extra_vars, "server", irc_server_name);
|
||||
trigger_callback_get_irc_server_channel (
|
||||
irc_server_name,
|
||||
weechat_hashtable_get (extra_vars, "channel"),
|
||||
weechat_hashtable_get (ctx.extra_vars, "channel"),
|
||||
&ptr_irc_server,
|
||||
&ptr_irc_channel);
|
||||
weechat_hashtable_set (pointers, "irc_server", ptr_irc_server);
|
||||
weechat_hashtable_set (pointers, "irc_channel", ptr_irc_channel);
|
||||
weechat_hashtable_set (ctx.pointers, "irc_server", ptr_irc_server);
|
||||
weechat_hashtable_set (ctx.pointers, "irc_channel", ptr_irc_channel);
|
||||
}
|
||||
}
|
||||
if (irc_server_name)
|
||||
free (irc_server_name);
|
||||
|
||||
/* create hashtable (if not already created) */
|
||||
if (!extra_vars)
|
||||
if (!ctx.extra_vars)
|
||||
{
|
||||
TRIGGER_CALLBACK_CB_NEW_EXTRA_VARS;
|
||||
}
|
||||
|
||||
/* add data in hashtable used for conditions/replace/command */
|
||||
trigger_callback_set_common_vars (trigger, extra_vars);
|
||||
weechat_hashtable_set (extra_vars, "tg_signal", signal);
|
||||
trigger_callback_set_common_vars (trigger, ctx.extra_vars);
|
||||
weechat_hashtable_set (ctx.extra_vars, "tg_signal", signal);
|
||||
ptr_signal_data = NULL;
|
||||
if (strcmp (type_data, WEECHAT_HOOK_SIGNAL_STRING) == 0)
|
||||
{
|
||||
@@ -578,10 +647,10 @@ trigger_callback_signal_cb (const void *pointer, void *data,
|
||||
}
|
||||
ptr_signal_data = str_data;
|
||||
}
|
||||
weechat_hashtable_set (extra_vars, "tg_signal_data", ptr_signal_data);
|
||||
weechat_hashtable_set (ctx.extra_vars, "tg_signal_data", ptr_signal_data);
|
||||
|
||||
/* execute the trigger (conditions, regex, command) */
|
||||
if (!trigger_callback_execute (trigger, NULL, pointers, extra_vars, NULL))
|
||||
if (!trigger_callback_execute (trigger, &ctx))
|
||||
trigger_rc = WEECHAT_RC_OK;
|
||||
|
||||
end:
|
||||
@@ -608,30 +677,30 @@ trigger_callback_hsignal_cb (const void *pointer, void *data,
|
||||
type_values = weechat_hashtable_get_string (hashtable, "type_values");
|
||||
if (strcmp (type_values, "pointer") == 0)
|
||||
{
|
||||
pointers = weechat_hashtable_dup (hashtable);
|
||||
if (!pointers)
|
||||
ctx.pointers = weechat_hashtable_dup (hashtable);
|
||||
if (!ctx.pointers)
|
||||
goto end;
|
||||
}
|
||||
else if (strcmp (type_values, "string") == 0)
|
||||
{
|
||||
extra_vars = weechat_hashtable_dup (hashtable);
|
||||
if (!extra_vars)
|
||||
ctx.extra_vars = weechat_hashtable_dup (hashtable);
|
||||
if (!ctx.extra_vars)
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
/* create hashtable (if not already created) */
|
||||
if (!extra_vars)
|
||||
if (!ctx.extra_vars)
|
||||
{
|
||||
TRIGGER_CALLBACK_CB_NEW_EXTRA_VARS;
|
||||
}
|
||||
|
||||
/* add data in hashtable used for conditions/replace/command */
|
||||
trigger_callback_set_common_vars (trigger, extra_vars);
|
||||
weechat_hashtable_set (extra_vars, "tg_signal", signal);
|
||||
trigger_callback_set_common_vars (trigger, ctx.extra_vars);
|
||||
weechat_hashtable_set (ctx.extra_vars, "tg_signal", signal);
|
||||
|
||||
/* execute the trigger (conditions, regex, command) */
|
||||
if (!trigger_callback_execute (trigger, NULL, pointers, extra_vars, NULL))
|
||||
if (!trigger_callback_execute (trigger, &ctx))
|
||||
trigger_rc = WEECHAT_RC_OK;
|
||||
|
||||
end:
|
||||
@@ -670,35 +739,35 @@ trigger_callback_modifier_cb (const void *pointer, void *data,
|
||||
|| (strncmp (modifier, "irc_out1_", 9) == 0)
|
||||
|| (strncmp (modifier, "irc_out_", 8) == 0))
|
||||
{
|
||||
extra_vars = trigger_callback_irc_message_parse (string,
|
||||
modifier_data);
|
||||
if (extra_vars)
|
||||
ctx.extra_vars = trigger_callback_irc_message_parse (string,
|
||||
modifier_data);
|
||||
if (ctx.extra_vars)
|
||||
{
|
||||
weechat_hashtable_set (extra_vars, "server", modifier_data);
|
||||
weechat_hashtable_set (ctx.extra_vars, "server", modifier_data);
|
||||
trigger_callback_get_irc_server_channel (
|
||||
modifier_data,
|
||||
weechat_hashtable_get (extra_vars, "channel"),
|
||||
weechat_hashtable_get (ctx.extra_vars, "channel"),
|
||||
&ptr_irc_server,
|
||||
&ptr_irc_channel);
|
||||
weechat_hashtable_set (pointers, "irc_server", ptr_irc_server);
|
||||
weechat_hashtable_set (pointers, "irc_channel", ptr_irc_channel);
|
||||
weechat_hashtable_set (ctx.pointers, "irc_server", ptr_irc_server);
|
||||
weechat_hashtable_set (ctx.pointers, "irc_channel", ptr_irc_channel);
|
||||
}
|
||||
}
|
||||
|
||||
if (!extra_vars)
|
||||
if (!ctx.extra_vars)
|
||||
{
|
||||
TRIGGER_CALLBACK_CB_NEW_EXTRA_VARS;
|
||||
}
|
||||
|
||||
/* add data in hashtable used for conditions/replace/command */
|
||||
trigger_callback_set_common_vars (trigger, extra_vars);
|
||||
weechat_hashtable_set (extra_vars, "tg_modifier", modifier);
|
||||
weechat_hashtable_set (extra_vars, "tg_modifier_data", modifier_data);
|
||||
weechat_hashtable_set (extra_vars, "tg_string", string);
|
||||
trigger_callback_set_common_vars (trigger, ctx.extra_vars);
|
||||
weechat_hashtable_set (ctx.extra_vars, "tg_modifier", modifier);
|
||||
weechat_hashtable_set (ctx.extra_vars, "tg_modifier_data", modifier_data);
|
||||
weechat_hashtable_set (ctx.extra_vars, "tg_string", string);
|
||||
string_no_color = weechat_string_remove_color (string, NULL);
|
||||
if (string_no_color)
|
||||
{
|
||||
weechat_hashtable_set (extra_vars,
|
||||
weechat_hashtable_set (ctx.extra_vars,
|
||||
"tg_string_nocolor", string_no_color);
|
||||
}
|
||||
|
||||
@@ -714,17 +783,17 @@ trigger_callback_modifier_cb (const void *pointer, void *data,
|
||||
prefix = weechat_strndup (string, pos - string);
|
||||
if (prefix)
|
||||
{
|
||||
weechat_hashtable_set (extra_vars, "tg_prefix", prefix);
|
||||
weechat_hashtable_set (ctx.extra_vars, "tg_prefix", prefix);
|
||||
free (prefix);
|
||||
}
|
||||
}
|
||||
pos++;
|
||||
if (pos[0] == '\t')
|
||||
pos++;
|
||||
weechat_hashtable_set (extra_vars, "tg_message", pos);
|
||||
weechat_hashtable_set (ctx.extra_vars, "tg_message", pos);
|
||||
}
|
||||
else
|
||||
weechat_hashtable_set (extra_vars, "tg_message", string);
|
||||
weechat_hashtable_set (ctx.extra_vars, "tg_message", string);
|
||||
|
||||
/* set "tg_prefix_nocolor" and "tg_message_nocolor" */
|
||||
if (string_no_color)
|
||||
@@ -738,7 +807,7 @@ trigger_callback_modifier_cb (const void *pointer, void *data,
|
||||
pos - string_no_color);
|
||||
if (prefix)
|
||||
{
|
||||
weechat_hashtable_set (extra_vars,
|
||||
weechat_hashtable_set (ctx.extra_vars,
|
||||
"tg_prefix_nocolor", prefix);
|
||||
free (prefix);
|
||||
}
|
||||
@@ -746,11 +815,11 @@ trigger_callback_modifier_cb (const void *pointer, void *data,
|
||||
pos++;
|
||||
if (pos[0] == '\t')
|
||||
pos++;
|
||||
weechat_hashtable_set (extra_vars, "tg_message_nocolor", pos);
|
||||
weechat_hashtable_set (ctx.extra_vars, "tg_message_nocolor", pos);
|
||||
}
|
||||
else
|
||||
{
|
||||
weechat_hashtable_set (extra_vars,
|
||||
weechat_hashtable_set (ctx.extra_vars,
|
||||
"tg_message_nocolor", string_no_color);
|
||||
}
|
||||
}
|
||||
@@ -771,11 +840,11 @@ trigger_callback_modifier_cb (const void *pointer, void *data,
|
||||
{
|
||||
buffer = (struct t_gui_buffer *)value;
|
||||
weechat_hashtable_set (
|
||||
extra_vars,
|
||||
ctx.extra_vars,
|
||||
"tg_plugin",
|
||||
weechat_buffer_get_string (buffer, "plugin"));
|
||||
weechat_hashtable_set (
|
||||
extra_vars,
|
||||
ctx.extra_vars,
|
||||
"tg_buffer",
|
||||
weechat_buffer_get_string (buffer, "full_name"));
|
||||
pos++;
|
||||
@@ -795,7 +864,7 @@ trigger_callback_modifier_cb (const void *pointer, void *data,
|
||||
if (str_tags)
|
||||
{
|
||||
snprintf (str_tags, length, ",%s,", pos);
|
||||
weechat_hashtable_set (extra_vars, "tg_tags",
|
||||
weechat_hashtable_set (ctx.extra_vars, "tg_tags",
|
||||
str_tags);
|
||||
free (str_tags);
|
||||
}
|
||||
@@ -804,24 +873,23 @@ trigger_callback_modifier_cb (const void *pointer, void *data,
|
||||
free (buffer_pointer);
|
||||
}
|
||||
}
|
||||
weechat_hashtable_set (pointers, "buffer", buffer);
|
||||
weechat_hashtable_set (ctx.pointers, "buffer", buffer);
|
||||
}
|
||||
|
||||
if (tags)
|
||||
{
|
||||
if (!trigger_callback_set_tags (buffer, (const char **)tags, num_tags,
|
||||
extra_vars))
|
||||
ctx.extra_vars))
|
||||
{
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
/* execute the trigger (conditions, regex, command) */
|
||||
(void) trigger_callback_execute (trigger, buffer, pointers, extra_vars,
|
||||
NULL);
|
||||
(void) trigger_callback_execute (trigger, &ctx);
|
||||
|
||||
end:
|
||||
ptr_string = weechat_hashtable_get (extra_vars, "tg_string");
|
||||
ptr_string = weechat_hashtable_get (ctx.extra_vars, "tg_string");
|
||||
string_modified = (ptr_string && (strcmp (ptr_string, string) != 0)) ?
|
||||
strdup (ptr_string) : NULL;
|
||||
|
||||
@@ -857,14 +925,14 @@ trigger_callback_line_cb (const void *pointer, void *data,
|
||||
TRIGGER_CALLBACK_CB_NEW_POINTERS;
|
||||
TRIGGER_CALLBACK_CB_NEW_VARS_UPDATED;
|
||||
|
||||
extra_vars = weechat_hashtable_dup (line);
|
||||
ctx.extra_vars = weechat_hashtable_dup (line);
|
||||
|
||||
weechat_hashtable_remove (extra_vars, "buffer");
|
||||
weechat_hashtable_remove (extra_vars, "tags_count");
|
||||
weechat_hashtable_remove (extra_vars, "tags");
|
||||
weechat_hashtable_remove (ctx.extra_vars, "buffer");
|
||||
weechat_hashtable_remove (ctx.extra_vars, "tags_count");
|
||||
weechat_hashtable_remove (ctx.extra_vars, "tags");
|
||||
|
||||
/* add data in hashtables used for conditions/replace/command */
|
||||
trigger_callback_set_common_vars (trigger, extra_vars);
|
||||
trigger_callback_set_common_vars (trigger, ctx.extra_vars);
|
||||
ptr_value = weechat_hashtable_get (line, "buffer");
|
||||
if (!ptr_value || (ptr_value[0] != '0') || (ptr_value[1] != 'x'))
|
||||
goto end;
|
||||
@@ -873,7 +941,7 @@ trigger_callback_line_cb (const void *pointer, void *data,
|
||||
goto end;
|
||||
buffer = (void *)value;
|
||||
|
||||
weechat_hashtable_set (pointers, "buffer", buffer);
|
||||
weechat_hashtable_set (ctx.pointers, "buffer", buffer);
|
||||
ptr_value = weechat_hashtable_get (line, "tags");
|
||||
tags = weechat_string_split ((ptr_value) ? ptr_value : "",
|
||||
",",
|
||||
@@ -891,33 +959,32 @@ trigger_callback_line_cb (const void *pointer, void *data,
|
||||
{
|
||||
snprintf (str_tags, length, ",%s,",
|
||||
(ptr_value) ? ptr_value : "");
|
||||
weechat_hashtable_set (extra_vars, "tags", str_tags);
|
||||
weechat_hashtable_set (ctx.extra_vars, "tags", str_tags);
|
||||
free (str_tags);
|
||||
}
|
||||
|
||||
/* build prefix without colors */
|
||||
ptr_value = weechat_hashtable_get (line, "prefix");
|
||||
string_no_color = weechat_string_remove_color (ptr_value, NULL);
|
||||
weechat_hashtable_set (extra_vars, "tg_prefix_nocolor", string_no_color);
|
||||
weechat_hashtable_set (ctx.extra_vars, "tg_prefix_nocolor", string_no_color);
|
||||
if (string_no_color)
|
||||
free (string_no_color);
|
||||
|
||||
/* build message without colors */
|
||||
ptr_value = weechat_hashtable_get (line, "message");
|
||||
string_no_color = weechat_string_remove_color (ptr_value, NULL);
|
||||
weechat_hashtable_set (extra_vars, "tg_message_nocolor", string_no_color);
|
||||
weechat_hashtable_set (ctx.extra_vars, "tg_message_nocolor", string_no_color);
|
||||
if (string_no_color)
|
||||
free (string_no_color);
|
||||
|
||||
if (!trigger_callback_set_tags (buffer, (const char **)tags, num_tags,
|
||||
extra_vars))
|
||||
ctx.extra_vars))
|
||||
{
|
||||
goto end;
|
||||
}
|
||||
|
||||
/* execute the trigger (conditions, regex, command) */
|
||||
(void) trigger_callback_execute (trigger, buffer, pointers, extra_vars,
|
||||
vars_updated);
|
||||
(void) trigger_callback_execute (trigger, &ctx);
|
||||
|
||||
hashtable = weechat_hashtable_new (32,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
@@ -926,16 +993,16 @@ trigger_callback_line_cb (const void *pointer, void *data,
|
||||
if (hashtable)
|
||||
{
|
||||
/* copy updated variables into the result "hashtable" */
|
||||
for (ptr_item = weechat_list_get (vars_updated, 0); ptr_item;
|
||||
for (ptr_item = weechat_list_get (ctx.vars_updated, 0); ptr_item;
|
||||
ptr_item = weechat_list_next (ptr_item))
|
||||
{
|
||||
ptr_key = weechat_list_string (ptr_item);
|
||||
if (weechat_hashtable_has_key (extra_vars, ptr_key))
|
||||
if (weechat_hashtable_has_key (ctx.extra_vars, ptr_key))
|
||||
{
|
||||
if (strcmp (ptr_key, "tags") == 0)
|
||||
{
|
||||
/* remove commas at the beginning/end of tags */
|
||||
ptr_value = weechat_hashtable_get (extra_vars, ptr_key);
|
||||
ptr_value = weechat_hashtable_get (ctx.extra_vars, ptr_key);
|
||||
if (ptr_value && ptr_value[0])
|
||||
{
|
||||
str_tags = strdup (
|
||||
@@ -962,7 +1029,7 @@ trigger_callback_line_cb (const void *pointer, void *data,
|
||||
weechat_hashtable_set (
|
||||
hashtable,
|
||||
ptr_key,
|
||||
weechat_hashtable_get (extra_vars, ptr_key));
|
||||
weechat_hashtable_get (ctx.extra_vars, ptr_key));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1001,32 +1068,32 @@ trigger_callback_print_cb (const void *pointer, void *data,
|
||||
TRIGGER_CALLBACK_CB_NEW_EXTRA_VARS;
|
||||
|
||||
/* add data in hashtables used for conditions/replace/command */
|
||||
trigger_callback_set_common_vars (trigger, extra_vars);
|
||||
weechat_hashtable_set (pointers, "buffer", buffer);
|
||||
trigger_callback_set_common_vars (trigger, ctx.extra_vars);
|
||||
weechat_hashtable_set (ctx.pointers, "buffer", buffer);
|
||||
date_tmp = localtime (&date);
|
||||
if (date_tmp)
|
||||
{
|
||||
if (strftime (str_temp, sizeof (str_temp),
|
||||
"%Y-%m-%d %H:%M:%S", date_tmp) == 0)
|
||||
str_temp[0] = '\0';
|
||||
weechat_hashtable_set (extra_vars, "tg_date", str_temp);
|
||||
weechat_hashtable_set (ctx.extra_vars, "tg_date", str_temp);
|
||||
}
|
||||
snprintf (str_temp, sizeof (str_temp), "%d", displayed);
|
||||
weechat_hashtable_set (extra_vars, "tg_displayed", str_temp);
|
||||
weechat_hashtable_set (ctx.extra_vars, "tg_displayed", str_temp);
|
||||
snprintf (str_temp, sizeof (str_temp), "%d", highlight);
|
||||
weechat_hashtable_set (extra_vars, "tg_highlight", str_temp);
|
||||
weechat_hashtable_set (extra_vars, "tg_prefix", prefix);
|
||||
weechat_hashtable_set (ctx.extra_vars, "tg_highlight", str_temp);
|
||||
weechat_hashtable_set (ctx.extra_vars, "tg_prefix", prefix);
|
||||
str_no_color = weechat_string_remove_color (prefix, NULL);
|
||||
if (str_no_color)
|
||||
{
|
||||
weechat_hashtable_set (extra_vars, "tg_prefix_nocolor", str_no_color);
|
||||
weechat_hashtable_set (ctx.extra_vars, "tg_prefix_nocolor", str_no_color);
|
||||
free (str_no_color);
|
||||
}
|
||||
weechat_hashtable_set (extra_vars, "tg_message", message);
|
||||
weechat_hashtable_set (ctx.extra_vars, "tg_message", message);
|
||||
str_no_color = weechat_string_remove_color (message, NULL);
|
||||
if (str_no_color)
|
||||
{
|
||||
weechat_hashtable_set (extra_vars, "tg_message_nocolor", str_no_color);
|
||||
weechat_hashtable_set (ctx.extra_vars, "tg_message_nocolor", str_no_color);
|
||||
free (str_no_color);
|
||||
}
|
||||
|
||||
@@ -1039,16 +1106,16 @@ trigger_callback_print_cb (const void *pointer, void *data,
|
||||
if (str_tags2)
|
||||
{
|
||||
snprintf (str_tags2, length, ",%s,", str_tags);
|
||||
weechat_hashtable_set (extra_vars, "tg_tags", str_tags2);
|
||||
weechat_hashtable_set (ctx.extra_vars, "tg_tags", str_tags2);
|
||||
free (str_tags2);
|
||||
}
|
||||
free (str_tags);
|
||||
}
|
||||
if (!trigger_callback_set_tags (buffer, tags, tags_count, extra_vars))
|
||||
if (!trigger_callback_set_tags (buffer, tags, tags_count, ctx.extra_vars))
|
||||
goto end;
|
||||
|
||||
/* execute the trigger (conditions, regex, command) */
|
||||
if (!trigger_callback_execute (trigger, buffer, pointers, extra_vars, NULL))
|
||||
if (!trigger_callback_execute (trigger, &ctx))
|
||||
trigger_rc = WEECHAT_RC_OK;
|
||||
|
||||
end:
|
||||
@@ -1073,36 +1140,36 @@ trigger_callback_command_cb (const void *pointer, void *data,
|
||||
TRIGGER_CALLBACK_CB_NEW_EXTRA_VARS;
|
||||
|
||||
/* add data in hashtables used for conditions/replace/command */
|
||||
trigger_callback_set_common_vars (trigger, extra_vars);
|
||||
weechat_hashtable_set (pointers, "buffer", buffer);
|
||||
trigger_callback_set_common_vars (trigger, ctx.extra_vars);
|
||||
weechat_hashtable_set (ctx.pointers, "buffer", buffer);
|
||||
snprintf (str_value, sizeof (str_value), "%d", argc);
|
||||
weechat_hashtable_set (extra_vars, "tg_argc", str_value);
|
||||
weechat_hashtable_set (ctx.extra_vars, "tg_argc", str_value);
|
||||
for (i = 0; i < argc; i++)
|
||||
{
|
||||
snprintf (str_name, sizeof (str_name), "tg_argv%d", i);
|
||||
weechat_hashtable_set (extra_vars, str_name, argv[i]);
|
||||
weechat_hashtable_set (ctx.extra_vars, str_name, argv[i]);
|
||||
snprintf (str_name, sizeof (str_name), "tg_argv_eol%d", i);
|
||||
weechat_hashtable_set (extra_vars, str_name, argv_eol[i]);
|
||||
weechat_hashtable_set (ctx.extra_vars, str_name, argv_eol[i]);
|
||||
}
|
||||
shell_argv = weechat_string_split_shell (argv_eol[0], &shell_argc);
|
||||
if (shell_argv)
|
||||
{
|
||||
snprintf (str_value, sizeof (str_value), "%d", shell_argc);
|
||||
weechat_hashtable_set (extra_vars, "tg_shell_argc", str_value);
|
||||
weechat_hashtable_set (ctx.extra_vars, "tg_shell_argc", str_value);
|
||||
for (i = 0; i < shell_argc; i++)
|
||||
{
|
||||
snprintf (str_name, sizeof (str_name), "tg_shell_argv%d", i);
|
||||
weechat_hashtable_set (extra_vars, str_name, shell_argv[i]);
|
||||
weechat_hashtable_set (ctx.extra_vars, str_name, shell_argv[i]);
|
||||
}
|
||||
weechat_string_free_split (shell_argv);
|
||||
}
|
||||
else
|
||||
{
|
||||
weechat_hashtable_set (extra_vars, "tg_shell_argc", "0");
|
||||
weechat_hashtable_set (ctx.extra_vars, "tg_shell_argc", "0");
|
||||
}
|
||||
|
||||
/* execute the trigger (conditions, regex, command) */
|
||||
if (!trigger_callback_execute (trigger, buffer, pointers, extra_vars, NULL))
|
||||
if (!trigger_callback_execute (trigger, &ctx))
|
||||
trigger_rc = WEECHAT_RC_OK;
|
||||
|
||||
end:
|
||||
@@ -1124,12 +1191,12 @@ trigger_callback_command_run_cb (const void *pointer, void *data,
|
||||
TRIGGER_CALLBACK_CB_NEW_EXTRA_VARS;
|
||||
|
||||
/* add data in hashtables used for conditions/replace/command */
|
||||
trigger_callback_set_common_vars (trigger, extra_vars);
|
||||
weechat_hashtable_set (pointers, "buffer", buffer);
|
||||
weechat_hashtable_set (extra_vars, "tg_command", command);
|
||||
trigger_callback_set_common_vars (trigger, ctx.extra_vars);
|
||||
weechat_hashtable_set (ctx.pointers, "buffer", buffer);
|
||||
weechat_hashtable_set (ctx.extra_vars, "tg_command", command);
|
||||
|
||||
/* execute the trigger (conditions, regex, command) */
|
||||
if (!trigger_callback_execute (trigger, buffer, pointers, extra_vars, NULL))
|
||||
if (!trigger_callback_execute (trigger, &ctx))
|
||||
trigger_rc = WEECHAT_RC_OK;
|
||||
|
||||
end:
|
||||
@@ -1167,9 +1234,9 @@ trigger_callback_timer_cb (const void *pointer, void *data,
|
||||
TRIGGER_CALLBACK_CB_NEW_EXTRA_VARS;
|
||||
|
||||
/* add data in hashtable used for conditions/replace/command */
|
||||
trigger_callback_set_common_vars (trigger, extra_vars);
|
||||
trigger_callback_set_common_vars (trigger, ctx.extra_vars);
|
||||
snprintf (str_temp, sizeof (str_temp), "%d", remaining_calls);
|
||||
weechat_hashtable_set (extra_vars, "tg_remaining_calls", str_temp);
|
||||
weechat_hashtable_set (ctx.extra_vars, "tg_remaining_calls", str_temp);
|
||||
date = time (NULL);
|
||||
date_tmp = localtime (&date);
|
||||
if (date_tmp)
|
||||
@@ -1177,11 +1244,11 @@ trigger_callback_timer_cb (const void *pointer, void *data,
|
||||
if (strftime (str_temp, sizeof (str_temp),
|
||||
"%Y-%m-%d %H:%M:%S", date_tmp) == 0)
|
||||
str_temp[0] = '\0';
|
||||
weechat_hashtable_set (extra_vars, "tg_date", str_temp);
|
||||
weechat_hashtable_set (ctx.extra_vars, "tg_date", str_temp);
|
||||
}
|
||||
|
||||
/* execute the trigger (conditions, regex, command) */
|
||||
if (!trigger_callback_execute (trigger, NULL, pointers, extra_vars, NULL))
|
||||
if (!trigger_callback_execute (trigger, &ctx))
|
||||
trigger_rc = WEECHAT_RC_OK;
|
||||
|
||||
end:
|
||||
@@ -1201,12 +1268,12 @@ trigger_callback_config_cb (const void *pointer, void *data,
|
||||
TRIGGER_CALLBACK_CB_NEW_EXTRA_VARS;
|
||||
|
||||
/* add data in hashtable used for conditions/replace/command */
|
||||
trigger_callback_set_common_vars (trigger, extra_vars);
|
||||
weechat_hashtable_set (extra_vars, "tg_option", option);
|
||||
weechat_hashtable_set (extra_vars, "tg_value", value);
|
||||
trigger_callback_set_common_vars (trigger, ctx.extra_vars);
|
||||
weechat_hashtable_set (ctx.extra_vars, "tg_option", option);
|
||||
weechat_hashtable_set (ctx.extra_vars, "tg_value", value);
|
||||
|
||||
/* execute the trigger (conditions, regex, command) */
|
||||
if (!trigger_callback_execute (trigger, NULL, pointers, extra_vars, NULL))
|
||||
if (!trigger_callback_execute (trigger, &ctx))
|
||||
trigger_rc = WEECHAT_RC_OK;
|
||||
|
||||
end:
|
||||
@@ -1236,18 +1303,18 @@ trigger_callback_focus_cb (const void *pointer, void *data,
|
||||
{
|
||||
rc = sscanf (ptr_value + 2, "%lx", &value);
|
||||
if ((rc != EOF) && (rc >= 1))
|
||||
weechat_hashtable_set (pointers, "window", (void *)value);
|
||||
weechat_hashtable_set (ctx.pointers, "window", (void *)value);
|
||||
}
|
||||
ptr_value = weechat_hashtable_get (info, "_buffer");
|
||||
if (ptr_value && ptr_value[0] && (strncmp (ptr_value, "0x", 2) == 0))
|
||||
{
|
||||
rc = sscanf (ptr_value + 2, "%lx", &value);
|
||||
if ((rc != EOF) && (rc >= 1))
|
||||
weechat_hashtable_set (pointers, "buffer", (void *)value);
|
||||
weechat_hashtable_set (ctx.pointers, "buffer", (void *)value);
|
||||
}
|
||||
|
||||
/* execute the trigger (conditions, regex, command) */
|
||||
(void) trigger_callback_execute (trigger, NULL, pointers, info, NULL);
|
||||
(void) trigger_callback_execute (trigger, &ctx);
|
||||
|
||||
end:
|
||||
TRIGGER_CALLBACK_CB_END(info);
|
||||
@@ -1269,17 +1336,16 @@ trigger_callback_info_cb (const void *pointer, void *data,
|
||||
TRIGGER_CALLBACK_CB_NEW_EXTRA_VARS;
|
||||
|
||||
/* add data in hashtable used for conditions/replace/command */
|
||||
trigger_callback_set_common_vars (trigger, extra_vars);
|
||||
weechat_hashtable_set (extra_vars, "tg_info_name", info_name);
|
||||
weechat_hashtable_set (extra_vars, "tg_arguments", arguments);
|
||||
weechat_hashtable_set (extra_vars, "tg_info", "");
|
||||
trigger_callback_set_common_vars (trigger, ctx.extra_vars);
|
||||
weechat_hashtable_set (ctx.extra_vars, "tg_info_name", info_name);
|
||||
weechat_hashtable_set (ctx.extra_vars, "tg_arguments", arguments);
|
||||
weechat_hashtable_set (ctx.extra_vars, "tg_info", "");
|
||||
|
||||
/* execute the trigger (conditions, regex, command) */
|
||||
(void) trigger_callback_execute (trigger, NULL, pointers, extra_vars,
|
||||
NULL);
|
||||
(void) trigger_callback_execute (trigger, &ctx);
|
||||
|
||||
end:
|
||||
ptr_info = weechat_hashtable_get (extra_vars, "tg_info");
|
||||
ptr_info = weechat_hashtable_get (ctx.extra_vars, "tg_info");
|
||||
info = (ptr_info) ? strdup (ptr_info) : NULL;
|
||||
|
||||
TRIGGER_CALLBACK_CB_END(info);
|
||||
@@ -1305,15 +1371,14 @@ trigger_callback_info_hashtable_cb (const void *pointer, void *data,
|
||||
TRIGGER_CALLBACK_CB_NEW_POINTERS;
|
||||
TRIGGER_CALLBACK_CB_NEW_VARS_UPDATED;
|
||||
|
||||
extra_vars = weechat_hashtable_dup (hashtable);
|
||||
ctx.extra_vars = weechat_hashtable_dup (hashtable);
|
||||
|
||||
/* add data in hashtable used for conditions/replace/command */
|
||||
trigger_callback_set_common_vars (trigger, extra_vars);
|
||||
weechat_hashtable_set (extra_vars, "tg_info_name", info_name);
|
||||
trigger_callback_set_common_vars (trigger, ctx.extra_vars);
|
||||
weechat_hashtable_set (ctx.extra_vars, "tg_info_name", info_name);
|
||||
|
||||
/* execute the trigger (conditions, regex, command) */
|
||||
(void) trigger_callback_execute (trigger, NULL, pointers, extra_vars,
|
||||
vars_updated);
|
||||
(void) trigger_callback_execute (trigger, &ctx);
|
||||
|
||||
ret_hashtable = weechat_hashtable_new (32,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
@@ -1322,16 +1387,16 @@ trigger_callback_info_hashtable_cb (const void *pointer, void *data,
|
||||
if (ret_hashtable)
|
||||
{
|
||||
/* copy updated variables into the result "ret_hashtable" */
|
||||
for (ptr_item = weechat_list_get (vars_updated, 0); ptr_item;
|
||||
for (ptr_item = weechat_list_get (ctx.vars_updated, 0); ptr_item;
|
||||
ptr_item = weechat_list_next (ptr_item))
|
||||
{
|
||||
ptr_key = weechat_list_string (ptr_item);
|
||||
if (weechat_hashtable_has_key (extra_vars, ptr_key))
|
||||
if (weechat_hashtable_has_key (ctx.extra_vars, ptr_key))
|
||||
{
|
||||
weechat_hashtable_set (
|
||||
ret_hashtable,
|
||||
ptr_key,
|
||||
weechat_hashtable_get (extra_vars, ptr_key));
|
||||
weechat_hashtable_get (ctx.extra_vars, ptr_key));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,23 +21,36 @@
|
||||
#define WEECHAT_PLUGIN_TRIGGER_CALLBACK_H
|
||||
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
struct t_trigger_context
|
||||
{
|
||||
unsigned long id;
|
||||
struct t_gui_buffer *buffer;
|
||||
struct t_hashtable *pointers;
|
||||
struct t_hashtable *extra_vars;
|
||||
struct t_weelist *vars_updated;
|
||||
struct timeval start_exec;
|
||||
struct timeval start_check_conditions;
|
||||
struct timeval start_replace_regex;
|
||||
struct timeval start_run_command;
|
||||
struct timeval end_exec;
|
||||
};
|
||||
|
||||
#define TRIGGER_CALLBACK_CB_INIT(__rc) \
|
||||
struct t_trigger *trigger; \
|
||||
struct t_hashtable *pointers, *extra_vars; \
|
||||
struct t_weelist *vars_updated; \
|
||||
struct t_trigger_context ctx; \
|
||||
int trigger_rc; \
|
||||
pointers = NULL; \
|
||||
extra_vars = NULL; \
|
||||
vars_updated = NULL; \
|
||||
(void) data; \
|
||||
(void) vars_updated; \
|
||||
(void) trigger_rc; \
|
||||
if (!trigger_enabled) \
|
||||
return __rc; \
|
||||
trigger = (struct t_trigger *)pointer; \
|
||||
if (!trigger || trigger->hook_running) \
|
||||
return __rc; \
|
||||
memset (&ctx, 0, sizeof (ctx)); \
|
||||
if (weechat_trigger_plugin->debug >= 1) \
|
||||
gettimeofday (&(ctx.start_exec), NULL); \
|
||||
trigger->hook_count_cb++; \
|
||||
trigger->hook_running = 1; \
|
||||
trigger_rc = trigger_return_code[ \
|
||||
@@ -45,35 +58,35 @@
|
||||
trigger->options[TRIGGER_OPTION_RETURN_CODE])];
|
||||
|
||||
#define TRIGGER_CALLBACK_CB_NEW_POINTERS \
|
||||
pointers = weechat_hashtable_new ( \
|
||||
ctx.pointers = weechat_hashtable_new ( \
|
||||
32, \
|
||||
WEECHAT_HASHTABLE_STRING, \
|
||||
WEECHAT_HASHTABLE_POINTER, \
|
||||
NULL, NULL); \
|
||||
if (!pointers) \
|
||||
if (!ctx.pointers) \
|
||||
goto end;
|
||||
|
||||
#define TRIGGER_CALLBACK_CB_NEW_EXTRA_VARS \
|
||||
extra_vars = weechat_hashtable_new ( \
|
||||
ctx.extra_vars = weechat_hashtable_new ( \
|
||||
32, \
|
||||
WEECHAT_HASHTABLE_STRING, \
|
||||
WEECHAT_HASHTABLE_STRING, \
|
||||
NULL, NULL); \
|
||||
if (!extra_vars) \
|
||||
if (!ctx.extra_vars) \
|
||||
goto end;
|
||||
|
||||
#define TRIGGER_CALLBACK_CB_NEW_VARS_UPDATED \
|
||||
vars_updated = weechat_list_new (); \
|
||||
if (!vars_updated) \
|
||||
ctx.vars_updated = weechat_list_new (); \
|
||||
if (!ctx.vars_updated) \
|
||||
goto end;
|
||||
|
||||
#define TRIGGER_CALLBACK_CB_END(__rc) \
|
||||
if (pointers) \
|
||||
weechat_hashtable_free (pointers); \
|
||||
if (extra_vars) \
|
||||
weechat_hashtable_free (extra_vars); \
|
||||
if (vars_updated) \
|
||||
weechat_list_free (vars_updated); \
|
||||
if (ctx.pointers) \
|
||||
weechat_hashtable_free (ctx.pointers); \
|
||||
if (ctx.extra_vars) \
|
||||
weechat_hashtable_free (ctx.extra_vars); \
|
||||
if (ctx.vars_updated) \
|
||||
weechat_list_free (ctx.vars_updated); \
|
||||
trigger->hook_running = 0; \
|
||||
switch (weechat_config_integer ( \
|
||||
trigger->options[TRIGGER_OPTION_POST_ACTION])) \
|
||||
|
||||
@@ -43,6 +43,7 @@ struct t_config_option *trigger_config_color_flag_conditions;
|
||||
struct t_config_option *trigger_config_color_flag_regex;
|
||||
struct t_config_option *trigger_config_color_flag_return_code;
|
||||
struct t_config_option *trigger_config_color_flag_post_action;
|
||||
struct t_config_option *trigger_config_color_identifier;
|
||||
struct t_config_option *trigger_config_color_regex;
|
||||
struct t_config_option *trigger_config_color_replace;
|
||||
struct t_config_option *trigger_config_color_trigger;
|
||||
@@ -764,6 +765,12 @@ trigger_config_init ()
|
||||
N_("text color for post action flag (in /trigger list)"),
|
||||
NULL, 0, 0, "lightblue", NULL, 0,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
trigger_config_color_identifier = weechat_config_new_option (
|
||||
trigger_config_file, ptr_section,
|
||||
"identifier", "color",
|
||||
N_("text color for trigger context identifier in monitor buffer"),
|
||||
NULL, 0, 0, "cyan", NULL, 0,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
trigger_config_color_regex = weechat_config_new_option (
|
||||
trigger_config_file, ptr_section,
|
||||
"regex", "color",
|
||||
|
||||
@@ -34,6 +34,7 @@ extern struct t_config_option *trigger_config_color_flag_conditions;
|
||||
extern struct t_config_option *trigger_config_color_flag_regex;
|
||||
extern struct t_config_option *trigger_config_color_flag_return_code;
|
||||
extern struct t_config_option *trigger_config_color_flag_post_action;
|
||||
extern struct t_config_option *trigger_config_color_identifier;
|
||||
extern struct t_config_option *trigger_config_color_regex;
|
||||
extern struct t_config_option *trigger_config_color_replace;
|
||||
extern struct t_config_option *trigger_config_color_trigger;
|
||||
|
||||
Reference in New Issue
Block a user