]> jfr.im git - irc/hexchat/hexchat.git/commitdiff
Properly support notices to prefix'd users on a channel
authorDerp Derpingston <redacted>
Sun, 11 May 2014 13:29:38 +0000 (06:29 -0700)
committerTingPing <redacted>
Mon, 12 May 2014 08:55:45 +0000 (04:55 -0400)
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

src/common/inbound.c

index 401e956297006e1fbe78e8ebf5bb56028093460e..b80553b3e593dbd8673c4f1840e40e3bfb3807fb 100644 (file)
@@ -948,19 +948,8 @@ inbound_notice (server *serv, char *to, char *nick, char *msg, char *ip, int id,
        if (is_channel (serv, ptr))
                sess = find_channel (serv, ptr);
 
-       if (!sess && ptr[0] == '@')
-       {
-               ptr++;
-               sess = find_channel (serv, ptr);
-       }
-
-       if (!sess && ptr[0] == '%')
-       {
-               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);