Sebastien Helleu
f52770137f
trigger: add option "recreate" in command /trigger
...
The "recreate" option is the same as "input" but the trigger is first
deleted. So this lets you recreate the same trigger and edit some things
if needed.
2014-02-14 15:15:21 +01:00
Sebastien Helleu
c25bd9c26b
trigger: add option "copy" in command /trigger
2014-02-14 14:21:24 +01:00
Sebastien Helleu
93038a3634
trigger: add options "input" and "output" in command /trigger
2014-02-14 12:37:34 +01:00
Sebastien Helleu
b530aa5f5a
trigger: add strings without colors in hashtable for modifier "weechat_print" and hook print
...
For modifier "weechat_print", variables added:
- tg_string_nocolor (same as tg_string, without colors)
- tg_prefix_nocolor (same as tg_prefix, without colors)
- tg_message_nocolor (same as tg_message, without colors)
For hook print, variables added:
- tg_prefix_nocolor (same as tg_prefix, without colors)
- tg_message_nocolor (same as tg_message, without colors)
2014-02-13 19:31:48 +01:00
Sebastien Helleu
7356d1889a
trigger: add "tg_prefix" and "tg_message" in hashtable for modifier "weechat_print"
2014-02-13 18:53:13 +01:00
Sebastien Helleu
0ac6ebe532
trigger: escape chars in regex replacement (when trigger is created)
2014-02-13 18:44:43 +01:00
Sebastien Helleu
c06cfb25ce
api: add function string_convert_escaped_chars
2014-02-13 18:39:55 +01:00
Sebastien Helleu
a9550dbf8f
trigger: display arguments of triggers on monitor buffer
2014-02-13 18:33:11 +01:00
Sebastien Helleu
a7dbaf8162
trigger: evaluate regex replacement on execution of trigger (and not when creating the trigger)
2014-02-13 18:20:00 +01:00
Sebastien Helleu
d74259303f
trigger: fix call of IRC message parser on non-IRC messages in modifier callback
2014-02-13 17:37:22 +01:00
Sebastien Helleu
e36c49995b
trigger: add "server" in hashtable after parsing of IRC message
2014-02-13 15:04:54 +01:00
Sebastien Helleu
65b40ab5cc
trigger: parse IRC messages received in signal/modifier hook callbacks
...
The parsed message is added into hashtable "extra_vars".
For example, signal "freenode,irc_in_PRIVMSG" received with the message
"hello world!" on channel #weechat gives in the hashtable:
extra_vars:
tags: ""
host: "tester!user@host.com "
tg_signal: "freenode,irc_in_PRIVMSG"
channel: "#weechat"
tg_signal_data: ":tester!user@host.com PRIVMSG #weechat :hello world!"
arguments: "#weechat :hello world!"
nick: "tester"
command: "PRIVMSG"
message_without_tags: ":tester!user@host.com PRIVMSG #weechat :hello world!"
2014-02-13 13:38:10 +01:00
Sebastien Helleu
c103bc6584
trigger: refactor some code in hook callbacks using macros
2014-02-13 12:52:06 +01:00
Sebastien Helleu
132b09bde9
trigger: add hook focus
2014-02-13 12:06:46 +01:00
Sebastien Helleu
00402b87c2
trigger: add hook command
2014-02-13 11:33:16 +01:00
Sebastien Helleu
bc3eaa8d62
trigger: add extra colors in trigger monitor buffer
2014-02-13 11:24:03 +01:00
Sebastien Helleu
8ffba2ad9e
trigger: add the name of buffer on trigger monitor when executing a command
2014-02-13 11:21:30 +01:00
Sebastien Helleu
4f0be6edb3
trigger: add option "show" in command /trigger
2014-02-10 22:25:25 +01:00
Sebastien Helleu
93d3375440
trigger: add option trigger.look.monitor_strip_colors
2014-02-10 13:28:45 +01:00
Sebastien Helleu
9b3d2eeec7
trigger: add hook config
2014-02-10 13:08:40 +01:00
Sebastien Helleu
614f34adbc
trigger: add missing hook "command_run" in /help trigger
2014-02-10 13:01:20 +01:00
Sebastien Helleu
32facbe783
trigger: update actions performed in the trigger (in /help trigger)
2014-02-10 09:48:33 +01:00
Sebastien Helleu
d877510825
trigger: add condition "${tg_tag_nick}" in trigger example "effects" (/help trigger)
2014-02-09 19:22:42 +01:00
Sebastien Helleu
8b17981d1f
trigger: set variables in hashtable using message tags
2014-02-09 19:20:53 +01:00
Sebastien Helleu
471a2b1da1
trigger: add examples of triggers using "signal_sigwinch" in /help trigger
2014-02-09 17:17:20 +01:00
Sebastien Helleu
75e1c5320e
trigger: add options trigger.color.flag_{command|conditions|regex|return_code}
2014-02-09 17:01:36 +01:00
Sebastien Helleu
6ab17dfec1
trigger: add default triggers
2014-02-09 16:17:11 +01:00
Sebastien Helleu
7c0d9fe850
core: improve the string_replace_regex function (add reference char, change syntax for match refs)
...
The reference char is now an argument for the function.
The references are now $0 .. $99 and $+ was added (last match, with
highest number).
The syntax to replace a match with one char is now: $.cN or $.c+
(for example: "$.*3").
2014-02-09 15:14:07 +01:00
Sebastien Helleu
f666a356d7
trigger: add missing init of buffer pointer in modifier callback
2014-02-09 12:55:41 +01:00
Sebastien Helleu
7b496197ef
trigger: fix crash in callback if one regex is NULL (invalid)
2014-02-09 12:55:41 +01:00
Sebastien Helleu
f04eb4ae23
trigger: add buffer pointer in modifier callback
2014-02-09 12:55:41 +01:00
Sebastien Helleu
d9bd1986ad
trigger: refactor some code in hook callbacks (debug, conditions, regex, command)
2014-02-09 12:55:41 +01:00
Sebastien Helleu
53921acc38
trigger: fix evaluated command in callback
2014-02-09 12:55:41 +01:00
Sebastien Helleu
09c75714f9
trigger: add option "listfull" in command /trigger
2014-02-09 12:55:41 +01:00
Sebastien Helleu
717d89a1f7
trigger: split trigger command on creation, not when executing the callback
2014-02-09 12:55:41 +01:00
Sebastien Helleu
4a9c9a0b07
trigger: add options trigger.color.trigger{_disabled}
2014-02-09 12:55:41 +01:00
Sebastien Helleu
adf547a47c
trigger: add option "addinput" in command /trigger
2014-02-09 12:55:41 +01:00
Sebastien Helleu
77e49a99e6
trigger: add missing value in trigger_hook_default_regex
2014-02-09 12:55:41 +01:00
Sebastien Helleu
9dab03fab2
trigger: do not sort completions for hook type (use order defined in trigger.h)
2014-02-09 12:55:41 +01:00
Sebastien Helleu
b712eebece
trigger: add callback for changes on hook option (trigger.trigger.xxx.hook)
2014-02-09 12:55:41 +01:00
Sebastien Helleu
f8ffe9d590
trigger: reorder internal trigger vars
2014-02-09 12:55:41 +01:00
Sebastien Helleu
a03653273c
core: replace "regex_t *" by "void *" in string functions (fix ruby compilation error with autotools)
2014-02-09 12:55:40 +01:00
Sebastien Helleu
66158f41f2
trigger: add hook command_run
2014-02-09 12:55:40 +01:00
Sebastien Helleu
639ac51593
trigger: use case insensitive comparison when searching for a trigger name
2014-02-09 12:55:40 +01:00
Sebastien Helleu
63a3837d14
trigger: add option "restart" in command /trigger
2014-02-09 12:55:40 +01:00
Sebastien Helleu
a09e46f456
trigger: remove the timer hook pointer during the last timer call
2014-02-09 12:55:40 +01:00
Sebastien Helleu
1496c8a25c
trigger: add completion for all arguments of command /trigger add
2014-02-09 12:55:40 +01:00
Sebastien Helleu
e372b8c8cb
trigger: sort triggers by name
2014-02-09 12:55:40 +01:00
Sebastien Helleu
bb48af29b6
trigger: split arguments like shell in "/trigger add", to create a whole trigger with one command
2014-02-09 12:55:40 +01:00
Sebastien Helleu
b5bfeb7b8d
api: add function string_split_shell
2014-02-09 12:55:40 +01:00