summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2000-06-15 19:34:31 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2000-06-15 19:34:31 +0000
commitafb6d6fd02ae4b45f7a93648a28f9c4a64c0cf71 (patch)
tree9c581cdc71022047aa5f325834f7f583d6646951 /src
parent09e20e1d78c91ce7ba72720ef13a24e1b8bb1bfe (diff)
downloadirssi-afb6d6fd02ae4b45f7a93648a28f9c4a64c0cf71.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/irc/core/channel-events.c8
1 files changed, 8 insertions, 0 deletions
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);