From afb6d6fd02ae4b45f7a93648a28f9c4a64c0cf71 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Thu, 15 Jun 2000 19:34:31 +0000 Subject: If join to !channel wasn't successfull (banned, etc.), Irssi didn't remove the channel's window item. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@352 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/irc/core/channel-events.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/irc') diff --git a/src/irc/core/channel-events.c b/src/irc/core/channel-events.c index 02af3c0f..42361aa1 100644 --- a/src/irc/core/channel-events.c +++ b/src/irc/core/channel-events.c @@ -38,6 +38,14 @@ static void event_cannot_join(const char *data, IRC_SERVER_REC *server) channel++; /* server didn't understand !channels */ chanrec = channel_find(server, channel); + if (chanrec == NULL && channel[0] == '!') { + /* it probably replied with the full !channel name, + find the channel with the short name.. */ + channel = g_strdup_printf("!%s", channel+6); + chanrec = channel_find(server, channel); + g_free(channel); + } + if (chanrec != NULL && !chanrec->names_got) { chanrec->left = TRUE; channel_destroy(chanrec); -- cgit v1.2.3