summaryrefslogtreecommitdiff
path: root/src/plugins/irc/irc-command.c
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2012-01-22 13:48:42 +0100
committerSebastien Helleu <flashcode@flashtux.org>2012-01-22 13:48:42 +0100
commit5f6df8021b73c1da27161d238cd35180cce29727 (patch)
treedcb79e7db0ee27e94c8b433c68a5e2b2781a7c9f /src/plugins/irc/irc-command.c
parent51491469e5c6311ccd9dd10830f62fd436af754f (diff)
downloadweechat-5f6df8021b73c1da27161d238cd35180cce29727.zip
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
Diffstat (limited to 'src/plugins/irc/irc-command.c')
-rw-r--r--src/plugins/irc/irc-command.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/plugins/irc/irc-command.c b/src/plugins/irc/irc-command.c
index 5d052b454..fcf103cdd 100644
--- a/src/plugins/irc/irc-command.c
+++ b/src/plugins/irc/irc-command.c
@@ -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"