From 89c218702485c9faea9b6dd8f51e65ceffad3a8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sun, 28 Sep 2014 15:34:42 +0200 Subject: [PATCH] trigger: add "${tg_displayed}" in conditions of default trigger "beep" The command of "beep" trigger is now executed only if the message is displayed (not filtered with /filter). --- ChangeLog.asciidoc | 1 + ReleaseNotes.asciidoc | 11 +++++++++++ src/plugins/trigger/trigger-config.c | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/ChangeLog.asciidoc b/ChangeLog.asciidoc index cd1bff33d..8b7c6c1e9 100644 --- a/ChangeLog.asciidoc +++ b/ChangeLog.asciidoc @@ -26,6 +26,7 @@ http://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes] * irc: display own nick changes in server buffer (closes #188) * irc: disable creation of temporary servers by default with command /connect, new option irc.look.temporary_servers +* trigger: add "${tg_displayed}" in conditions of default trigger "beep" * trigger: add option "restore" in command /trigger === Bugs fixed diff --git a/ReleaseNotes.asciidoc b/ReleaseNotes.asciidoc index f7dab6d1e..26ae79f39 100644 --- a/ReleaseNotes.asciidoc +++ b/ReleaseNotes.asciidoc @@ -46,6 +46,17 @@ instead of milliseconds: * function 'util_timeval_add': the argument 'interval' is now expressed in microseconds. +=== Default "beep" trigger + +The command of "beep" trigger is now executed only if the message is displayed +(not filtered with /filter). + +You can restore the default "beep" trigger with the following command: + +---- +/trigger restore beep +---- + === Default triggers for hiding passwords Triggers used to hide passwords have been fixed for *BSD operating systems. diff --git a/src/plugins/trigger/trigger-config.c b/src/plugins/trigger/trigger-config.c index 2b75e2bea..020050cfd 100644 --- a/src/plugins/trigger/trigger-config.c +++ b/src/plugins/trigger/trigger-config.c @@ -53,7 +53,7 @@ char *trigger_config_default_list[][1 + TRIGGER_NUM_OPTIONS] = { "beep", "on", "print", "", - "${tg_highlight} || ${tg_msg_pv}", + "${tg_displayed) && (${tg_highlight} || ${tg_msg_pv})", "", "/print -beep", "ok" },