1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-25 20:36:38 +02:00
Commit Graph

63 Commits

Author SHA1 Message Date
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
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