mirror of
https://github.com/weechat/weechat.git
synced 2026-07-03 08:13:14 +02:00
core: add support of flags in regular expressions and highlight options, add irc options to customize/disable default nick highlight (task #11128)
New functions in C plugin API:
- string_regex_flags
- string_regcomp
New irc options:
- irc.look.highlight_server
- irc.look.highlight_channel
- irc.look.highlight_pv
Regex flags are supported in following options/commands:
- option weechat.look.highlight
- option weechat.look.highlight_regex
- options irc.look.highlight_{server|channel|pv}
- option relay.network.allowed_ips
- core command /filter
- irc command /list
- irc command /ignore
- rmodifier command /rmodifier
This commit is contained in:
@@ -2245,8 +2245,8 @@ irc_command_list (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
ptr_server->cmd_list_regexp = malloc (sizeof (*ptr_server->cmd_list_regexp));
|
||||
if (ptr_server->cmd_list_regexp)
|
||||
{
|
||||
if ((ret = regcomp (ptr_server->cmd_list_regexp, ptr_regex,
|
||||
REG_NOSUB | REG_ICASE | REG_EXTENDED)) != 0)
|
||||
if ((ret = weechat_string_regcomp (ptr_server->cmd_list_regexp, ptr_regex,
|
||||
REG_EXTENDED | REG_ICASE | REG_NOSUB)) != 0)
|
||||
{
|
||||
regerror (ret, ptr_server->cmd_list_regexp,
|
||||
buf, sizeof(buf));
|
||||
@@ -4946,6 +4946,8 @@ irc_command_init ()
|
||||
"is working\n"
|
||||
" channel: channel name where ignore is "
|
||||
"working\n\n"
|
||||
"Note: the regular expression can start with "
|
||||
"\"(?-i)\" to become case sensitive.\n\n"
|
||||
"Examples:\n"
|
||||
" ignore nick \"toto\" everywhere:\n"
|
||||
" /ignore add toto\n"
|
||||
@@ -5029,7 +5031,8 @@ irc_command_init ()
|
||||
N_("channel: channel to list\n"
|
||||
" server: server name\n"
|
||||
" regex: regular expression used to filter "
|
||||
"results\n\n"
|
||||
"results (case insensitive, can start by \"(?-i)\" "
|
||||
"to become case sensitive)\n\n"
|
||||
"Examples:\n"
|
||||
" list all channels on server (can be very slow "
|
||||
"on large networks):\n"
|
||||
|
||||
Reference in New Issue
Block a user