1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-26 12:56:37 +02:00
Commit Graph

94 Commits

Author SHA1 Message Date
Sebastien Helleu ddf3e9043b trigger: do not create the trigger with /trigger add if the regex is invalid 2014-03-02 08:32:05 +01:00
Sebastien Helleu 8f0294f8d0 trigger: fix typo in /help trigger 2014-03-01 19:00:54 +01:00
Sebastien Helleu 7a1798a7fb trigger: fix typo in /help trigger 2014-03-01 17:42:28 +01:00
Sebastien Helleu 44b8447ff0 trigger: make optional the alignment on second and max calls (in hook timer) 2014-03-01 17:25:48 +01:00
Sebastien Helleu 13b0a88f21 trigger: allow empty return code in command /trigger {add|addoff|addreplace} 2014-02-28 11:48:59 +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 c3c1a63ea8 trigger: use command "/print -beep" in default trigger "beep" 2014-02-22 12:02:02 +01:00
Sebastien Helleu 639fbbff79 trigger: fix wrong info in /help trigger.trigger.xxx.regex 2014-02-21 17:59:33 +01:00
Sebastien Helleu 3847318497 core: update translations 2014-02-21 16:32:34 +01:00
Sebastien Helleu d6e7c9fda6 trigger: return WEECHAT_RC_ERROR in command /trigger if arguments are wrong/missing 2014-02-21 14:48:23 +01:00
Sebastien Helleu b400be0486 trigger: add option "addreplace" in command /trigger (used by /trigger recreate)
Now the command "/trigger recreate" does not delete the trigger any more.
Instead the option "addreplace" is used in input, so the existing trigger
is overwritten if the command is sent.
2014-02-20 11:20:23 +01:00
Sebastien Helleu 86b0c99029 trigger: add option "addoff" in command /trigger (add a trigger in disabled state) 2014-02-16 18:57:43 +01:00
Sebastien Helleu 56f74ae768 trigger: remove triggers in /help trigger that are already default triggers 2014-02-15 11:25:19 +01:00
Sebastien Helleu 4028e5c200 trigger: update help of options trigger.trigger.xxx.{arguments|command} 2014-02-15 11:18:39 +01:00
Sebastien Helleu 151a0c0190 trigger: update description of command /trigger 2014-02-14 19:42:12 +01:00
Sebastien Helleu b32193bee5 trigger: remove the return code with /trigger input/output/recreate for modifier and focus hooks 2014-02-14 19:17:27 +01:00
Sebastien Helleu 4fc2db8df4 trigger: fix return code of focus callback 2014-02-14 19:07:31 +01:00
Sebastien Helleu fe33f7d019 trigger: allow restart of trigger only if trigger is enabled 2014-02-14 18:41:15 +01:00
Sebastien Helleu 8e63a9a52f trigger: add option trigger.look.enabled (can be changed with /trigger enable|disable|toggle) 2014-02-14 18:35:29 +01:00
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 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