1
0
mirror of https://github.com/irssi/irssi.git synced 2025-02-02 15:08:01 -05:00

Use servertag from the active DCC chat when not connected anymore to the IRC server that started it. This fixes a crash with handling the DCC queue. Reported by Aurelien Delaitre (SATE 2009)

git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5122 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Wouter Coekaerts 2010-02-27 18:52:41 +00:00 committed by coekie
parent 3eea03ccb8
commit 4b751d9df6

View File

@ -183,10 +183,12 @@ static void cmd_dcc_send(const char *data, IRC_SERVER_REC *server,
(chat->mirc_ctcp || g_strcasecmp(nick, chat->nick) != 0))
chat = NULL;
if (!IS_IRC_SERVER(server) || !server->connected)
servertag = NULL;
else
if (IS_IRC_SERVER(server) && server->connected)
servertag = server->tag;
else if (chat != NULL)
servertag = chat->servertag;
else
servertag = NULL;
if (servertag == NULL && chat == NULL)
cmd_param_error(CMDERR_NOT_CONNECTED);