diff options
author | LemonBoy <thatlemon@gmail.com> | 2016-03-21 15:23:12 +0100 |
---|---|---|
committer | LemonBoy <thatlemon@gmail.com> | 2016-03-22 16:00:00 +0100 |
commit | 8b54366d9525d94ae4b1d0d6914b22b7bf73112e (patch) | |
tree | 5e7521080758dc73a0071d10743f7b27141e8906 /src/irc/dcc/dcc-get.c | |
parent | 83bee9c6b73d01b749e3c8a56e0683569e6a1ae2 (diff) | |
download | irssi-8b54366d9525d94ae4b1d0d6914b22b7bf73112e.zip |
Support quoted filenames in some /DCC commands
Diffstat (limited to 'src/irc/dcc/dcc-get.c')
-rw-r--r-- | src/irc/dcc/dcc-get.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/irc/dcc/dcc-get.c b/src/irc/dcc/dcc-get.c index a8b1c967..ac281683 100644 --- a/src/irc/dcc/dcc-get.c +++ b/src/irc/dcc/dcc-get.c @@ -526,14 +526,14 @@ void cmd_dcc_receive(const char *data, DCC_GET_FUNC accept_func, { GET_DCC_REC *dcc; GSList *tmp, *next; - char *nick, *fname; + char *nick, *arg, *fname; void *free_arg; int found; g_return_if_fail(data != NULL); - if (!cmd_get_params(data, &free_arg, 2 | PARAM_FLAG_GETREST, - &nick, &fname)) + if (!cmd_get_params(data, &free_arg, 2 | PARAM_FLAG_GETREST | + PARAM_FLAG_STRIP_TRAILING_WS, &nick, &arg)) return; if (*nick == '\0') { @@ -548,6 +548,8 @@ void cmd_dcc_receive(const char *data, DCC_GET_FUNC accept_func, return; } + fname = cmd_get_quoted_param(&arg); + found = FALSE; for (tmp = dcc_conns; tmp != NULL; tmp = next) { GET_DCC_REC *dcc = tmp->data; |