mirror of
https://github.com/weechat/weechat.git
synced 2026-06-28 05:46:38 +02:00
irc: fix ignore on a host without nick
This commit is contained in:
@@ -49,6 +49,7 @@ http://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes]
|
||||
* aspell: fix detection of nicks with non-alphanumeric chars
|
||||
* guile: disable guile gmp allocator (fix crash on unload of relay plugin)
|
||||
(bug #40628)
|
||||
* irc: fix ignore on a host without nick
|
||||
* irc: use color code 0x1F (`ctrl-_`) for underlined text in input line (same
|
||||
code as messages) (bug #40756)
|
||||
* irc: use color code 0x16 (`ctrl-V`) for reverse video in messages
|
||||
|
||||
@@ -177,6 +177,7 @@ irc_ignore_check (struct t_irc_server *server, const char *channel,
|
||||
{
|
||||
struct t_irc_ignore *ptr_ignore;
|
||||
int server_match, channel_match;
|
||||
char *pos;
|
||||
|
||||
if (!server)
|
||||
return 0;
|
||||
@@ -223,8 +224,20 @@ irc_ignore_check (struct t_irc_server *server, const char *channel,
|
||||
{
|
||||
if (nick && (regexec (ptr_ignore->regex_mask, nick, 0, NULL, 0) == 0))
|
||||
return 1;
|
||||
if (host && (regexec (ptr_ignore->regex_mask, host, 0, NULL, 0) == 0))
|
||||
return 1;
|
||||
if (host)
|
||||
{
|
||||
if (regexec (ptr_ignore->regex_mask, host, 0, NULL, 0) == 0)
|
||||
return 1;
|
||||
if (!strchr (ptr_ignore->mask, '!'))
|
||||
{
|
||||
pos = strchr (host, '!');
|
||||
if (pos && (regexec (ptr_ignore->regex_mask, pos + 1,
|
||||
0, NULL, 0) == 0))
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user