mirror of
https://github.com/moparisthebest/hexchat
synced 2024-11-26 11:12:19 -05:00
parent
145ceba124
commit
0146a38faa
@ -266,11 +266,20 @@ match_channel (const char *word, int *start, int *end)
|
|||||||
{
|
{
|
||||||
const server *serv = current_sess->server;
|
const server *serv = current_sess->server;
|
||||||
const char *chan_prefixes = serv ? serv->chantypes : CHANPRE;
|
const char *chan_prefixes = serv ? serv->chantypes : CHANPRE;
|
||||||
|
const char *nick_prefixes = serv ? serv->nick_prefixes : NICKPRE;
|
||||||
|
|
||||||
if (!regex_match (re_channel (), word, start, end))
|
if (!regex_match (re_channel (), word, start, end))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
return strchr (chan_prefixes, word[*start]) != NULL;
|
/* Check for +#channel (for example whois output) */
|
||||||
|
if (strchr (nick_prefixes, word[*start]) != NULL
|
||||||
|
&& strchr (chan_prefixes, word[*start + 1]) != NULL)
|
||||||
|
return TRUE;
|
||||||
|
/* Or just #channel */
|
||||||
|
else if (strchr (chan_prefixes, word[*start]) != NULL)
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
Loading…
Reference in New Issue
Block a user