summaryrefslogtreecommitdiff
path: root/src/irc/core/irc-channels.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/irc/core/irc-channels.c')
-rw-r--r--src/irc/core/irc-channels.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/irc/core/irc-channels.c b/src/irc/core/irc-channels.c
index d6acf6ae..5adf5fb1 100644
--- a/src/irc/core/irc-channels.c
+++ b/src/irc/core/irc-channels.c
@@ -149,12 +149,11 @@ static CHANNEL_REC *irc_channel_find_server(SERVER_REC *server,
if (rec->chat_type != server->chat_type)
continue;
+ /* check both !ABCDEchannel and !channel */
if (g_strcasecmp(channel, rec->name) == 0)
return rec;
- /* check after removing ABCDE from !ABCDEchannel */
- if (*channel == '!' && *rec->name == '!' &&
- g_strcasecmp(channel+1, rec->name+6) == 0)
+ if (g_strcasecmp(channel, rec->visible_name) == 0)
return rec;
}