1
0
mirror of https://github.com/irssi/irssi.git synced 2024-09-01 04:14:16 -04:00

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
This commit is contained in:
Timo Sirainen 2000-06-15 19:34:31 +00:00 committed by cras
parent 09e20e1d78
commit afb6d6fd02

View File

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