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
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);