1
0
mirror of https://github.com/moparisthebest/hexchat synced 2024-11-26 03:02:17 -05:00

Properly support notices to prefix'd users on a channel

Instead of hardcoding this behavior for @, +, and %, fetch the list of
mode prefixes from the server's state and look for one of those instead.

Closes #977
This commit is contained in:
Derp Derpingston 2014-05-11 06:29:38 -07:00 committed by TingPing
parent 17671ec694
commit 7435572282

View File

@ -948,19 +948,8 @@ inbound_notice (server *serv, char *to, char *nick, char *msg, char *ip, int id,
if (is_channel (serv, ptr)) if (is_channel (serv, ptr))
sess = find_channel (serv, ptr); sess = find_channel (serv, ptr);
if (!sess && ptr[0] == '@') /* /notice [mode-prefix]#channel should end up in that channel */
{ if (!sess && strchr(serv->nick_prefixes, ptr[0]) != NULL)
ptr++;
sess = find_channel (serv, ptr);
}
if (!sess && ptr[0] == '%')
{
ptr++;
sess = find_channel (serv, ptr);
}
if (!sess && ptr[0] == '+')
{ {
ptr++; ptr++;
sess = find_channel (serv, ptr); sess = find_channel (serv, ptr);