Sebastien Helleu
980326c685
trigger: fix potential uninitialized pointer in signal hook callback
2014-02-22 20:23:08 +01:00
Sebastien Helleu
c3775888bd
trigger: fix crash when a signal is received with type "int" and NULL pointer in signal_data
2014-02-22 17:10:35 +01:00
Sebastien Helleu
4fc2db8df4
trigger: fix return code of focus callback
2014-02-14 19:07:31 +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
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
9b3d2eeec7
trigger: add hook config
2014-02-10 13:08:40 +01:00
Sebastien Helleu
8b17981d1f
trigger: set variables in hashtable using message tags
2014-02-09 19:20:53 +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
717d89a1f7
trigger: split trigger command on creation, not when executing the callback
2014-02-09 12:55:41 +01:00
Sebastien Helleu
66158f41f2
trigger: add hook command_run
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
a703fc8c17
trigger: add timer
2014-02-09 12:55:40 +01:00
Sebastien Helleu
8368fc8b1e
trigger: execute callback even if regex/command are not set in the trigger
2014-02-09 12:55:40 +01:00
Sebastien Helleu
e0de501a0a
trigger: add hsignal
2014-02-09 12:55:40 +01:00
Sebastien Helleu
be8e32dd1b
trigger: add support of variable in regex option
...
Examples with new format:
/regex/text/
/regex/text/var
/regex1/text1/ /regex2/text2/
/regex1/text1/var /regex2/text2/var
2014-02-09 12:55:40 +01:00
Sebastien Helleu
c9b1444b8f
trigger: fix regex result in a hook print
2014-02-09 12:55:40 +01:00
Sebastien Helleu
356ac05e07
trigger: display regex changes in monitor buffer
2014-02-09 12:55:40 +01:00
Sebastien Helleu
30942f7f62
trigger: add trigger plugin
2014-02-09 12:55:40 +01:00