From 1d834b39b3e1ea7a327c786c869025478d65b96e Mon Sep 17 00:00:00 2001 From: Valentin Batz Date: Sat, 16 Oct 2004 00:08:21 +0000 Subject: [PATCH] Fixed /join -invite -window bug if there is no invite git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3320 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/fe-common/core/fe-channels.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/fe-common/core/fe-channels.c b/src/fe-common/core/fe-channels.c index 78ffa2b1..5b531c2e 100644 --- a/src/fe-common/core/fe-channels.c +++ b/src/fe-common/core/fe-channels.c @@ -110,7 +110,7 @@ static void sig_channel_joined(CHANNEL_REC *channel) fe_channels_nicklist(channel, CHANNEL_NICKLIST_FLAG_ALL); } -static void cmd_wjoin_pre(const char *data) +static void cmd_wjoin_pre(const char *data, SERVER_REC *server) { GHashTable *optlist; char *nick; @@ -121,6 +121,12 @@ static void cmd_wjoin_pre(const char *data) "join", &optlist, &nick)) return; + /* kludge for /join -invite -window if there is no invite */ + if (g_hash_table_lookup(optlist, "invite") && + server != NULL && server->last_invite == NULL) { + cmd_params_free(free_arg); + return; + } if (g_hash_table_lookup(optlist, "window") != NULL) { signal_add("channel created", (SIGNAL_FUNC) signal_channel_created_curwin);