mirror of
https://github.com/weechat/weechat.git
synced 2026-06-28 13:56:37 +02:00
api: allow wildcard "*" inside the mask in function string_match
This commit is contained in:
@@ -94,6 +94,6 @@ alias_info_init ()
|
||||
{
|
||||
weechat_hook_infolist ("alias", N_("list of aliases"),
|
||||
N_("alias pointer (optional)"),
|
||||
N_("alias name (can start or end with \"*\" as wildcard) (optional)"),
|
||||
N_("alias name (wildcard \"*\" is allowed) (optional)"),
|
||||
&alias_info_get_infolist_cb, NULL);
|
||||
}
|
||||
|
||||
@@ -991,8 +991,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
|
||||
"is done with target command)\n"
|
||||
" note: you can use %%command to use completion of an "
|
||||
"existing command\n"
|
||||
" alias: name of alias (can start or end with \"*\" for alias "
|
||||
"listing)\n"
|
||||
" alias: name of alias (wildcard \"*\" is allowed)\n"
|
||||
" command: command name with arguments (many commands can be "
|
||||
"separated by semicolons)\n"
|
||||
"\n"
|
||||
|
||||
@@ -166,8 +166,7 @@ irc_command_mode_nicks (struct t_irc_server *server,
|
||||
if (set[0] == '-'
|
||||
&& (mode[0] == 'o' || mode[0] == 'h')
|
||||
&& argv[i][0]
|
||||
&& ((argv[i][0] == '*')
|
||||
|| (argv[i][strlen (argv[i]) - 1] == '*'))
|
||||
&& strchr (argv[i], '*')
|
||||
&& (strcmp (server->nick, ptr_nick->name) == 0))
|
||||
{
|
||||
continue;
|
||||
@@ -5730,8 +5729,7 @@ irc_command_init ()
|
||||
N_("[-current] [-exclude=<channel>[,<channel>...]] <command> "
|
||||
"[<arguments>]"),
|
||||
N_(" -current: execute command for channels of current server only\n"
|
||||
" -exclude: exclude some channels ('*' is allowed at beginning or "
|
||||
"end of channel name, to exclude many channels)\n"
|
||||
" -exclude: exclude some channels (wildcard \"*\" is allowed)\n"
|
||||
" command: command to execute\n"
|
||||
"arguments: arguments for command (special variables $nick, $channel "
|
||||
"and $server are replaced by their value)\n"
|
||||
@@ -5752,8 +5750,7 @@ irc_command_init ()
|
||||
"[<arguments>]"),
|
||||
N_(" -current: execute command for private buffers of current server "
|
||||
"only\n"
|
||||
" -exclude: exclude some nicks ('*' is allowed at beginning or "
|
||||
"end of nick name, to exclude many nicks)\n"
|
||||
" -exclude: exclude some nicks (wildcard \"*\" is allowed)\n"
|
||||
" command: command to execute\n"
|
||||
"arguments: arguments for command (special variables $nick, $channel "
|
||||
"and $server are replaced by their value)\n"
|
||||
@@ -5774,8 +5771,7 @@ irc_command_init ()
|
||||
N_("execute a command on all connected servers"),
|
||||
N_("[-exclude=<server>[,<server>...]] "
|
||||
"<command> [<arguments>]"),
|
||||
N_(" -exclude: exclude some servers ('*' is allowed at beginning or end "
|
||||
"of server name, to exclude many servers)\n"
|
||||
N_(" -exclude: exclude some servers (wildcard \"*\" is allowed)\n"
|
||||
" command: command to execute\n"
|
||||
"arguments: arguments for command (special variables $nick, $channel "
|
||||
"and $server are replaced by their value)\n"
|
||||
@@ -5871,7 +5867,7 @@ irc_command_init ()
|
||||
"dehalfop",
|
||||
N_("remove channel half-operator status from nick(s)"),
|
||||
N_("<nick> [<nick>...]"),
|
||||
N_("nick: nick or mask (can start or end with \"*\" as wildcard)\n"
|
||||
N_("nick: nick or mask (wildcard \"*\" is allowed)\n"
|
||||
" *: remove channel half-operator status from everybody on channel "
|
||||
"except yourself"),
|
||||
"%(nicks)", &irc_command_dehalfop, NULL);
|
||||
@@ -5879,7 +5875,7 @@ irc_command_init ()
|
||||
"deop",
|
||||
N_("remove channel operator status from nick(s)"),
|
||||
N_("<nick> [<nick>...] || * -yes"),
|
||||
N_("nick: nick or mask (can start or end with \"*\" as wildcard)\n"
|
||||
N_("nick: nick or mask (wildcard \"*\" is allowed)\n"
|
||||
" *: remove channel operator status from everybody on channel "
|
||||
"except yourself"),
|
||||
"%(nicks)|%*", &irc_command_deop, NULL);
|
||||
@@ -5887,7 +5883,7 @@ irc_command_init ()
|
||||
"devoice",
|
||||
N_("remove voice from nick(s)"),
|
||||
N_("<nick> [<nick>...] || * -yes"),
|
||||
N_("nick: nick or mask (can start or end with \"*\" as wildcard)\n"
|
||||
N_("nick: nick or mask (wildcard \"*\" is allowed)\n"
|
||||
" *: remove voice from everybody on channel"),
|
||||
"%(nicks)|%*", &irc_command_devoice, NULL);
|
||||
weechat_hook_command (
|
||||
@@ -5911,7 +5907,7 @@ irc_command_init ()
|
||||
"halfop",
|
||||
N_("give channel half-operator status to nick(s)"),
|
||||
N_("<nick> [<nick>...] || * -yes"),
|
||||
N_("nick: nick or mask (can start or end with \"*\" as wildcard)\n"
|
||||
N_("nick: nick or mask (wildcard \"*\" is allowed)\n"
|
||||
" *: give channel half-operator status to everybody on channel"),
|
||||
"%(nicks)", &irc_command_halfop, NULL);
|
||||
weechat_hook_command (
|
||||
@@ -6166,7 +6162,7 @@ irc_command_init ()
|
||||
"op",
|
||||
N_("give channel operator status to nick(s)"),
|
||||
N_("<nick> [<nick>...] || * -yes"),
|
||||
N_("nick: nick or mask (can start or end with \"*\" as wildcard)\n"
|
||||
N_("nick: nick or mask (wildcard \"*\" is allowed)\n"
|
||||
" *: give channel operator status to everybody on channel"),
|
||||
"%(nicks)|%*", &irc_command_op, NULL);
|
||||
weechat_hook_command (
|
||||
@@ -6433,7 +6429,7 @@ irc_command_init ()
|
||||
"voice",
|
||||
N_("give voice to nick(s)"),
|
||||
N_("<nick> [<nick>...]"),
|
||||
N_("nick: nick or mask (can start or end with \"*\" as wildcard)\n"
|
||||
N_("nick: nick or mask (wildcard \"*\" is allowed)\n"
|
||||
" *: give voice to everybody on channel"),
|
||||
"%(nicks)|%*", &irc_command_voice, NULL);
|
||||
weechat_hook_command (
|
||||
|
||||
@@ -2406,9 +2406,8 @@ irc_config_init ()
|
||||
N_("restrict highlights to these tags on irc buffers (to have "
|
||||
"highlight on user messages but not server messages); tags "
|
||||
"must be separated by a comma and \"+\" can be used to make a "
|
||||
"logical \"and\" between tags; tags can start or end with \"*\" "
|
||||
"to match more than one tag; an empty value allows highlight on any "
|
||||
"tag"),
|
||||
"logical \"and\" between tags; wildcard \"*\" is allowed in tags; "
|
||||
"an empty value allows highlight on any tag"),
|
||||
NULL, 0, 0, "irc_privmsg,irc_notice", NULL, 0, NULL, NULL,
|
||||
&irc_config_change_look_highlight_tags_restrict, NULL, NULL, NULL);
|
||||
irc_config_look_item_away_message = weechat_config_new_option (
|
||||
|
||||
@@ -640,7 +640,7 @@ irc_info_init ()
|
||||
weechat_hook_infolist ("irc_server",
|
||||
N_("list of IRC servers"),
|
||||
N_("server pointer (optional)"),
|
||||
N_("server name (can start or end with \"*\" as wildcard) (optional)"),
|
||||
N_("server name (wildcard \"*\" is allowed) (optional)"),
|
||||
&irc_info_get_infolist_cb, NULL);
|
||||
weechat_hook_infolist ("irc_channel",
|
||||
N_("list of channels for an IRC server"),
|
||||
@@ -660,7 +660,7 @@ irc_info_init ()
|
||||
weechat_hook_infolist ("irc_notify",
|
||||
N_("list of notify"),
|
||||
N_("notify pointer (optional)"),
|
||||
N_("server name (can start or end with \"*\" as wildcard) (optional)"),
|
||||
N_("server name (wildcard \"*\" is allowed) (optional)"),
|
||||
&irc_info_get_infolist_cb, NULL);
|
||||
|
||||
/* hdata hooks */
|
||||
|
||||
@@ -1214,11 +1214,11 @@ plugin_api_init ()
|
||||
/* WeeChat core infolist hooks */
|
||||
hook_infolist (NULL, "bar", N_("list of bars"),
|
||||
N_("bar pointer (optional)"),
|
||||
N_("bar name (can start or end with \"*\" as wildcard) (optional)"),
|
||||
N_("bar name (wildcard \"*\" is allowed) (optional)"),
|
||||
&plugin_api_infolist_get_internal, NULL);
|
||||
hook_infolist (NULL, "bar_item", N_("list of bar items"),
|
||||
N_("bar item pointer (optional)"),
|
||||
N_("bar item name (can start or end with \"*\" as wildcard) (optional)"),
|
||||
N_("bar item name (wildcard \"*\" is allowed) (optional)"),
|
||||
&plugin_api_infolist_get_internal, NULL);
|
||||
hook_infolist (NULL, "bar_window", N_("list of bar windows"),
|
||||
N_("bar window pointer (optional)"),
|
||||
@@ -1226,7 +1226,7 @@ plugin_api_init ()
|
||||
&plugin_api_infolist_get_internal, NULL);
|
||||
hook_infolist (NULL, "buffer", N_("list of buffers"),
|
||||
N_("buffer pointer (optional)"),
|
||||
N_("buffer name (can start or end with \"*\" as wildcard) (optional)"),
|
||||
N_("buffer name (wildcard \"*\" is allowed) (optional)"),
|
||||
&plugin_api_infolist_get_internal, NULL);
|
||||
hook_infolist (NULL, "buffer_lines", N_("lines of a buffer"),
|
||||
N_("buffer pointer"),
|
||||
@@ -1234,7 +1234,7 @@ plugin_api_init ()
|
||||
&plugin_api_infolist_get_internal, NULL);
|
||||
hook_infolist (NULL, "filter", N_("list of filters"),
|
||||
NULL,
|
||||
N_("filter name (can start or end with \"*\" as wildcard) (optional)"),
|
||||
N_("filter name (wildcard \"*\" is allowed) (optional)"),
|
||||
&plugin_api_infolist_get_internal, NULL);
|
||||
hook_infolist (NULL, "history", N_("history of commands"),
|
||||
N_("buffer pointer (if not set, return global history) (optional)"),
|
||||
@@ -1243,8 +1243,8 @@ plugin_api_init ()
|
||||
hook_infolist (NULL, "hook", N_("list of hooks"),
|
||||
N_("hook pointer (optional)"),
|
||||
N_("type,arguments (type is command/timer/.., arguments to "
|
||||
"get only some hooks (can start or end with \"*\" as "
|
||||
"wildcard), both are optional)"),
|
||||
"get only some hooks (wildcard \"*\" is allowed), "
|
||||
"both are optional)"),
|
||||
&plugin_api_infolist_get_internal, NULL);
|
||||
hook_infolist (NULL, "hotlist", N_("list of buffers in hotlist"),
|
||||
NULL,
|
||||
@@ -1266,15 +1266,15 @@ plugin_api_init ()
|
||||
&plugin_api_infolist_get_internal, NULL);
|
||||
hook_infolist (NULL, "option", N_("list of options"),
|
||||
NULL,
|
||||
N_("option name (can start or end with \"*\" as wildcard) (optional)"),
|
||||
N_("option name (wildcard \"*\" is allowed) (optional)"),
|
||||
&plugin_api_infolist_get_internal, NULL);
|
||||
hook_infolist (NULL, "plugin", N_("list of plugins"),
|
||||
N_("plugin pointer (optional)"),
|
||||
N_("plugin name (can start or end with \"*\" as wildcard) (optional)"),
|
||||
N_("plugin name (wildcard \"*\" is allowed) (optional)"),
|
||||
&plugin_api_infolist_get_internal, NULL);
|
||||
hook_infolist (NULL, "proxy", N_("list of proxies"),
|
||||
N_("proxy pointer (optional)"),
|
||||
N_("proxy name (can start or end with \"*\" as wildcard) (optional)"),
|
||||
N_("proxy name (wildcard \"*\" is allowed) (optional)"),
|
||||
&plugin_api_infolist_get_internal, NULL);
|
||||
hook_infolist (NULL, "url_options", N_("options for URL"),
|
||||
NULL,
|
||||
|
||||
@@ -193,7 +193,7 @@ plugin_script_init (struct t_weechat_plugin *weechat_plugin,
|
||||
init->callback_hdata, weechat_plugin);
|
||||
weechat_hook_infolist (string, N_("list of scripts"),
|
||||
N_("script pointer (optional)"),
|
||||
N_("script name (can start or end with \"*\" as wildcard) (optional)"),
|
||||
N_("script name (wildcard \"*\" is allowed) (optional)"),
|
||||
init->callback_infolist, NULL);
|
||||
snprintf (string, length, "%s_callback", weechat_plugin->name);
|
||||
weechat_hook_hdata (string, N_("callback of a script"),
|
||||
|
||||
@@ -99,7 +99,8 @@ script_info_init ()
|
||||
weechat_hook_infolist ("script_script",
|
||||
N_("list of scripts"),
|
||||
N_("script pointer (optional)"),
|
||||
N_("script name with extension (can start or end with \"*\" as wildcard) (optional)"),
|
||||
N_("script name with extension "
|
||||
"(wildcard \"*\" is allowed) (optional)"),
|
||||
&script_info_get_infolist_cb, NULL);
|
||||
|
||||
/* hdata hooks */
|
||||
|
||||
@@ -1004,7 +1004,7 @@ trigger_command_init ()
|
||||
" monitor: open the trigger monitor buffer, with optional filter:\n"
|
||||
" filter: filter hooks/triggers to display (a hook must start "
|
||||
"with \"@\", for example \"@signal\"), many filters can be separated "
|
||||
"by commas; each trigger name can start or end with \"*\"\n"
|
||||
"by commas; wildcard \"*\" is allowed in each trigger name\n"
|
||||
"\n"
|
||||
"When a trigger callback is called, following actions are performed, "
|
||||
"in this order:\n"
|
||||
|
||||
Reference in New Issue
Block a user