mirror of
https://github.com/weechat/weechat.git
synced 2026-07-02 15:53:12 +02:00
api: allow wildcard "*" inside the mask in function string_match
This commit is contained in:
@@ -5593,8 +5593,7 @@ command_set_display_option_lists (char **argv, int arg_start, int arg_end,
|
||||
{
|
||||
gui_chat_printf (NULL,
|
||||
_("%sOption \"%s\" not found (tip: you can use "
|
||||
"\"*\" at beginning and/or end of option to "
|
||||
"see a sublist)"),
|
||||
"wildcard \"*\" in option to see a sublist)"),
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
|
||||
argv[i]);
|
||||
}
|
||||
@@ -7070,12 +7069,12 @@ command_init ()
|
||||
"freenode.#weechat\")\n"
|
||||
" - \"*\" means all buffers\n"
|
||||
" - a name starting with '!' is excluded\n"
|
||||
" - name can start or end with '*' to match many buffers\n"
|
||||
" - wildcard \"*\" is allowed\n"
|
||||
" tags: comma separated list of tags, for example \"irc_join,"
|
||||
"irc_part,irc_quit\"\n"
|
||||
" - logical \"and\": use \"+\" between tags (for example: "
|
||||
"\"nick_toto+irc_action\")\n"
|
||||
" - tags can start or end with '*'\n"
|
||||
" - wildcard \"*\" is allowed\n"
|
||||
" regex: POSIX extended regular expression to search in line\n"
|
||||
" - use '\\t' to separate prefix from message, special chars "
|
||||
"like '|' must be escaped: '\\|'\n"
|
||||
@@ -7271,7 +7270,7 @@ command_init ()
|
||||
" bar(xxx): bar \"xxx\"\n"
|
||||
" item(*): any bar item\n"
|
||||
" item(xxx): bar item \"xxx\"\n"
|
||||
"The key can start or end with '*' to match many mouse events.\n"
|
||||
"Wildcard \"*\" is allowed in key to match many mouse events.\n"
|
||||
"A special value for command with format \"hsignal:name\" can be "
|
||||
"used for context mouse, this will send the hsignal \"name\" with "
|
||||
"the focus hashtable as argument.\n"
|
||||
@@ -7591,8 +7590,7 @@ command_init ()
|
||||
NULL, "set",
|
||||
N_("set config options"),
|
||||
N_("[<option> [<value>]] || diff [<option> [<option>...]]"),
|
||||
N_("option: name of an option (can start or end with '*' to list many "
|
||||
"options)\n"
|
||||
N_("option: name of an option (wildcard \"*\" is allowed)\n"
|
||||
" value: new value for option\n"
|
||||
" diff: display only changed options\n"
|
||||
"\n"
|
||||
@@ -7621,8 +7619,8 @@ command_init ()
|
||||
NULL, "unset",
|
||||
N_("unset/reset config options"),
|
||||
N_("<option>"),
|
||||
N_("option: name of an option (may begin or end with \"*\" to "
|
||||
"mass-reset options, use carefully!)\n"
|
||||
N_("option: name of an option (wildcard \"*\" is allowed to mass-reset "
|
||||
"options, use carefully!)\n"
|
||||
"\n"
|
||||
"According to option, it's reset (for standard options) or removed "
|
||||
"(for optional settings, like server values).\n"
|
||||
|
||||
@@ -2289,11 +2289,11 @@ config_weechat_init_options ()
|
||||
weechat_config_file, ptr_section,
|
||||
"highlight_tags", "string",
|
||||
N_("comma separated list of tags to highlight; case insensitive "
|
||||
"comparison; each tag can start or end with \"*\" to match more "
|
||||
"than one tag; many tags can be separated by \"+\" to make a "
|
||||
"logical \"and\" between tags; examples: \"nick_flashcode\" for "
|
||||
"messages from nick \"FlashCode\", \"irc_notice+nick_toto*\" for "
|
||||
"notices from a nick starting with \"toto\""),
|
||||
"comparison; wildcard \"*\" is allowed in each tag; many tags can "
|
||||
"be separated by \"+\" to make a logical \"and\" between tags; "
|
||||
"examples: \"nick_flashcode\" for messages from nick \"FlashCode\", "
|
||||
"\"irc_notice+nick_toto*\" for notices from a nick starting with "
|
||||
"\"toto\""),
|
||||
NULL, 0, 0, "", NULL, 0, NULL, NULL, &config_change_highlight_tags, NULL, NULL, NULL);
|
||||
config_look_hotlist_add_conditions = config_file_new_option (
|
||||
weechat_config_file, ptr_section,
|
||||
@@ -3324,8 +3324,8 @@ config_weechat_init_options ()
|
||||
N_("comma separated list of plugins to load automatically "
|
||||
"at startup, \"*\" means all plugins found, a name beginning with "
|
||||
"\"!\" is a negative value to prevent a plugin from being loaded, "
|
||||
"names can start or end with \"*\" to match several plugins "
|
||||
"(examples: \"*\" or \"*,!lua,!tcl\")"),
|
||||
"wildcard \"*\" is allowed in names (examples: \"*\" or "
|
||||
"\"*,!lua,!tcl\")"),
|
||||
NULL, 0, 0, "*", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
config_plugin_debug = config_file_new_option (
|
||||
weechat_config_file, ptr_section,
|
||||
|
||||
+83
-68
@@ -363,7 +363,8 @@ string_strcasestr (const char *string, const char *search)
|
||||
/*
|
||||
* Checks if a string matches a mask.
|
||||
*
|
||||
* Mask can begin or end with "*", no other "*" are allowed inside mask.
|
||||
* The mask can contain wildcards ("*"), each wildcard matches 0 or more chars
|
||||
* in the string.
|
||||
*
|
||||
* Returns:
|
||||
* 1: string matches mask
|
||||
@@ -373,78 +374,92 @@ string_strcasestr (const char *string, const char *search)
|
||||
int
|
||||
string_match (const char *string, const char *mask, int case_sensitive)
|
||||
{
|
||||
char last, *mask2;
|
||||
int len_string, len_mask, rc;
|
||||
const char *ptr_string, *ptr_mask, *pos_word, *pos_end;
|
||||
char *word;
|
||||
int wildcard, length_word;
|
||||
|
||||
if (!mask || !mask[0])
|
||||
if (!string || !mask || !mask[0])
|
||||
return 0;
|
||||
|
||||
/* if mask is "*", then any string matches */
|
||||
if (strcmp (mask, "*") == 0)
|
||||
ptr_string = string;
|
||||
ptr_mask = mask;
|
||||
|
||||
while (ptr_mask[0])
|
||||
{
|
||||
wildcard = 0;
|
||||
|
||||
/* if we are on a wildcard, set the wildcard flag and skip it */
|
||||
if (ptr_mask[0] == '*')
|
||||
{
|
||||
wildcard = 1;
|
||||
ptr_mask++;
|
||||
while (ptr_mask[0] == '*')
|
||||
{
|
||||
ptr_mask++;
|
||||
}
|
||||
if (!ptr_mask[0])
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* no match if some mask without string */
|
||||
if (!string[0])
|
||||
return 0;
|
||||
|
||||
/* search the next wildcard (after the word) */
|
||||
pos_end = strchr (ptr_mask, '*');
|
||||
|
||||
/* extract the word before the wildcard (or the end of mask) */
|
||||
if (pos_end)
|
||||
{
|
||||
length_word = pos_end - ptr_mask;
|
||||
}
|
||||
else
|
||||
{
|
||||
length_word = strlen (ptr_mask);
|
||||
pos_end = ptr_mask + length_word;
|
||||
}
|
||||
word = string_strndup (ptr_mask, length_word);
|
||||
if (!word)
|
||||
return 0;
|
||||
|
||||
/* check if the word is matching */
|
||||
if (wildcard)
|
||||
{
|
||||
/* search the word anywhere in the string (from current position) */
|
||||
pos_word = (case_sensitive) ?
|
||||
strstr (ptr_string, word) : string_strcasestr (ptr_string, word);
|
||||
if (!pos_word)
|
||||
{
|
||||
free (word);
|
||||
return 0;
|
||||
}
|
||||
ptr_string = pos_word + length_word;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* check if word is at beginning of string */
|
||||
if ((case_sensitive
|
||||
&& (strncmp (ptr_string, word, length_word) != 0))
|
||||
|| (!case_sensitive
|
||||
&& (string_strncasecmp (ptr_string, word,
|
||||
utf8_strlen (word)) != 0)))
|
||||
{
|
||||
free (word);
|
||||
return 0;
|
||||
}
|
||||
ptr_string += length_word;
|
||||
}
|
||||
|
||||
free (word);
|
||||
|
||||
ptr_mask = pos_end;
|
||||
}
|
||||
|
||||
/* match if no more string/mask */
|
||||
if (!ptr_string[0] && !ptr_mask[0])
|
||||
return 1;
|
||||
|
||||
len_string = strlen (string);
|
||||
len_mask = strlen (mask);
|
||||
|
||||
last = mask[len_mask - 1];
|
||||
|
||||
/* mask begins with "*" */
|
||||
if ((mask[0] == '*') && (last != '*'))
|
||||
{
|
||||
/* not enough chars in string to match */
|
||||
if (len_string < len_mask - 1)
|
||||
return 0;
|
||||
/* check if end of string matches */
|
||||
if ((case_sensitive && (strcmp (string + len_string - (len_mask - 1),
|
||||
mask + 1) == 0))
|
||||
|| (!case_sensitive && (string_strcasecmp (string + len_string - (len_mask - 1),
|
||||
mask + 1) == 0)))
|
||||
return 1;
|
||||
/* no match */
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* mask ends with "*" */
|
||||
if ((mask[0] != '*') && (last == '*'))
|
||||
{
|
||||
/* not enough chars in string to match */
|
||||
if (len_string < len_mask - 1)
|
||||
return 0;
|
||||
/* check if beginning of string matches */
|
||||
if ((case_sensitive && (strncmp (string, mask, len_mask - 1) == 0))
|
||||
|| (!case_sensitive && (string_strncasecmp (string,
|
||||
mask,
|
||||
len_mask - 1) == 0)))
|
||||
return 1;
|
||||
/* no match */
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* mask begins and ends with "*" */
|
||||
if ((mask[0] == '*') && (last == '*'))
|
||||
{
|
||||
/* not enough chars in string to match */
|
||||
if (len_string < len_mask - 2)
|
||||
return 0;
|
||||
/* keep only relevant chars in mask for searching string */
|
||||
mask2 = string_strndup (mask + 1, len_mask - 2);
|
||||
if (!mask2)
|
||||
return 0;
|
||||
/* search string */
|
||||
rc = ((case_sensitive && strstr (string, mask2))
|
||||
|| (!case_sensitive && string_strcasestr (string, mask2))) ?
|
||||
1 : 0;
|
||||
/* free and return */
|
||||
free (mask2);
|
||||
return rc;
|
||||
}
|
||||
|
||||
/* no "*" at all, compare strings */
|
||||
if ((case_sensitive && (strcmp (string, mask) == 0))
|
||||
|| (!case_sensitive && (string_strcasecmp (string, mask) == 0)))
|
||||
return 1;
|
||||
|
||||
/* no match */
|
||||
/* no match in other cases */
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -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