Sébastien Helleu
fae9bdf8f8
trigger: add variables "${tg_shell_argc}" and "${tg_shell_argvN}" in command trigger evaluated strings ( closes #1624 )
2021-04-06 18:37:22 +02:00
Sébastien Helleu
efc7a588d6
core: update copyright dates
2021-01-02 21:34:16 +01:00
Sébastien Helleu
0ff08e54f5
trigger: add variable "tg_argc" in data set by command trigger ( closes #1576 )
2020-10-21 19:10:37 +02:00
Sébastien Helleu
2384dbe193
trigger: add a function to set variables common to all triggers (issue #1567 )
2020-10-10 13:32:36 +02:00
Simmo Saan
8c87b7a1f0
trigger: add tg_trigger_name variable to all triggers ( closes #1567 )
2020-10-10 10:13:42 +03:00
Sébastien Helleu
7412f5815c
trigger: fix recursive calls to triggers using regex ( closes #1546 )
2020-07-31 20:50:33 +02:00
Sébastien Helleu
0aa9f7de64
trigger: add (void) before calls to trigger_callback_execute when the returned value is ignored
2020-05-17 09:48:07 +02:00
Simmo Saan
b14cf0ac3d
trigger: only return trigger's return code when condition evaluates to true
2020-05-17 09:46:10 +02:00
Sébastien Helleu
3505324096
api: use buffer pointer in argument "modifier_data" sent to weechat_print modifier callback ( closes #42 )
2020-05-09 10:08:18 +02:00
Sébastien Helleu
feb6258910
core: update copyright dates
2020-01-04 10:41:26 +01:00
Sébastien Helleu
9178156354
api: add argument "strip_items" in function string_split
2019-06-15 20:47:14 +02:00
Sébastien Helleu
30768d4d24
trigger: add hook "info_hashtable"
2019-04-13 13:53:16 +02:00
Sébastien Helleu
8bc06ea101
trigger: add hook "info"
2019-04-13 08:52:40 +02:00
Sébastien Helleu
2b70d71aa1
core: replace argument "keep_eol" by "flags" in function string_split ( closes #1322 )
2019-03-10 18:29:16 +01:00
Sébastien Helleu
2b0057239b
core: update copyright dates
2019-01-01 15:40:51 +01:00
Sébastien Helleu
4712d0bb06
core: use https for links to GNU GPL license
2018-11-29 23:16:07 +01:00
Sébastien Helleu
8abd05fe3d
core: replace "long unsigned int" by "unsigned long"
2018-10-01 22:21:25 +02:00
Sébastien Helleu
968d7ede29
trigger: add variables "tg_prefix_nocolor" and "tg_message_nocolor" in line trigger
2018-08-17 07:59:20 +02:00
Sébastien Helleu
e7096810c4
trigger: rename variable "tg_tags" to "tags" in line trigger
2018-08-17 07:43:56 +02:00
Sébastien Helleu
9105c3ba1f
trigger: allow creation of temporary variables with the regex
2018-08-16 22:47:47 +02:00
Sébastien Helleu
2f2263afa6
trigger: add missing initialization of variable "tags" in hook line callback
2018-08-15 11:59:26 +02:00
Sébastien Helleu
aff752c50b
trigger: fix memory leak in hook_line trigger callback
2018-08-15 09:33:25 +02:00
Sébastien Helleu
42be1a74a0
api: add function hook_line
2018-08-12 21:45:00 +02:00
Sébastien Helleu
ed4837b2f6
core: update copyright dates
2018-01-05 00:54:18 +01:00
Sébastien Helleu
5aab494dd6
core, plugins: check return code of strftime function
2017-09-23 15:06:28 +02:00
Neui
f962ba1c6c
trigger: if hashmap creation failed, don't use tags
...
If hashmap creation fails (eg. not enough memory), it jumps to the label
"end", where it checks the pointer tags, that hadn't been initialized
before.
The simple fix is to initialize it before creating the hashmap.
2017-06-10 08:24:34 +02:00
Sébastien Helleu
593eee869f
trigger: add "irc_server" and "irc_channel" pointers in data for IRC signal/modifier hooks
2017-06-02 07:46:17 +02:00
Sébastien Helleu
705d86e684
core: update copyright dates
2017-01-01 11:32:04 +01:00
Sébastien Helleu
20c86db0d8
api: remove functions printf_date() and printf_tags()
2016-06-18 08:49:35 +02:00
Sébastien Helleu
cf6aca1619
core: add pointer in some callbacks ( closes #406 )
...
This pointer is the first argument received by callbacks, and the
existing argument "data" is now automatically freed by WeeChat when the
object containing the callback is removed.
With this new pointer, the linked list of callbacks in scripts has been
removed. This will improve speed of scripts (using a lot of hooks),
reduce memory used by scripts and reduce time to unload scripts.
Following functions are affected in the C API:
* exec_on_files
* config_new
* config_new_section
* config_new_option
* hook_command
* hook_command_run
* hook_timer
* hook_fd
* hook_process
* hook_process_hashtable
* hook_connect
* hook_print
* hook_signal
* hook_hsignal
* hook_config
* hook_completion
* hook_modifier
* hook_info
* hook_info_hashtable
* hook_infolist
* hook_hdata
* hook_focus
* unhook_all_plugin
* buffer_new
* bar_item_new
* upgrade_new
* upgrade_read
2016-03-21 18:11:21 +01:00
Sébastien Helleu
3330724574
core: update copyright dates
2016-01-01 11:09:53 +01:00
Sébastien Helleu
bd850398e8
core: add missing comments before functions when the result must be freed after use
2015-07-04 08:24:53 +02:00
Sébastien Helleu
a020c28ea6
core: update copyright dates
2015-01-01 09:23:23 +01:00
Sébastien Helleu
3f5a810254
trigger: evaluate and replace regex groups at same time, new format for regex option in triggers (incompatible with version 1.0) ( closes #224 )
2014-10-26 12:30:13 +01:00
Sébastien Helleu
1abdde6be5
trigger: add variable "tg_tag_host" (from tag "host_xxx" in message)
2014-04-12 13:23:26 +02:00
Sébastien Helleu
3b32d62fa6
trigger: add filter in trigger monitor buffer
...
The filter can be set with /trigger monitor <filter> or by entering data
in the trigger monitor input.
2014-04-01 14:26:02 +02:00
Sebastien Helleu
7afd013665
trigger: fix build of hashtable in hsignal callback when values have type "string"
2014-03-16 08:50:24 +01:00
Sebastien Helleu
cd65198c71
api: add callback in function string_replace_regex
2014-03-13 10:59:58 +01:00
Sebastien Helleu
16c13e94a6
trigger: add variable "tg_notify" (notify level of a message, if different from "none")
2014-03-02 12:35:34 +01:00
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