mirror of
https://github.com/weechat/weechat.git
synced 2026-06-26 12:56:37 +02:00
api: add support of flags in functions hook_signal_send and hook_hsignal_send
For now the only supported flag is:
- "stop_on_error": stop execution of callbacks immediately after an
error (ie return code of callback is WEECHAT_RC_ERROR) and return this code
(by default execute all callbacks and return the last return code, or return
WEECHAT_RC_EAT immediately if a callback returns this)
Example:
hook_signal_send("[flags:stop_on_error]my_signal", WEECHAT_HOOK_SIGNAL_STRING, "test");
This commit is contained in:
@@ -1558,8 +1558,10 @@ def hook_signal_send(signal: str, type_data: str, signal_data: str) -> int:
|
||||
"""`hook_signal_send in WeeChat plugin API reference <https://weechat.org/doc/weechat/api/#_hook_signal_send>`_
|
||||
::
|
||||
|
||||
# example
|
||||
# examples
|
||||
rc = weechat.hook_signal_send("my_signal", weechat.WEECHAT_HOOK_SIGNAL_STRING, my_string)
|
||||
rc2 = weechat.hook_signal_send("[flags:stop_on_error,ignore_eat]my_signal2",
|
||||
weechat.WEECHAT_HOOK_SIGNAL_STRING, my_string)
|
||||
"""
|
||||
...
|
||||
|
||||
@@ -1582,8 +1584,9 @@ def hook_hsignal_send(signal: str, hashtable: Dict[str, str]) -> int:
|
||||
"""`hook_hsignal_send in WeeChat plugin API reference <https://weechat.org/doc/weechat/api/#_hook_hsignal_send>`_
|
||||
::
|
||||
|
||||
# example
|
||||
# examples
|
||||
rc = weechat.hook_hsignal_send("my_hsignal", {"key": "value"})
|
||||
rc2 = weechat.hook_hsignal_send("[flags:stop_on_error,ignore_eat]my_hsignal2", {"key": "value"})
|
||||
"""
|
||||
...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user