diff options
author | Timo Sirainen <cras@irssi.org> | 2002-02-04 21:20:05 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2002-02-04 21:20:05 +0000 |
commit | d1ade13a71c3771da956b7f0d0cde67ec2e0858c (patch) | |
tree | dee4fcc27b660ac55ea3b567384762b77949a30d /src | |
parent | 7bdd3beb8ea059fa731697497a67783af4211f66 (diff) | |
download | irssi-d1ade13a71c3771da956b7f0d0cde67ec2e0858c.zip |
Broke DCC CHAT queries.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2391 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src')
-rw-r--r-- | src/fe-common/irc/dcc/fe-dcc-chat.c | 32 | ||||
-rw-r--r-- | src/irc/dcc/dcc-chat.c | 21 |
2 files changed, 27 insertions, 26 deletions
diff --git a/src/fe-common/irc/dcc/fe-dcc-chat.c b/src/fe-common/irc/dcc/fe-dcc-chat.c index e57056e0..61bce279 100644 --- a/src/fe-common/irc/dcc/fe-dcc-chat.c +++ b/src/fe-common/irc/dcc/fe-dcc-chat.c @@ -229,29 +229,29 @@ static void sig_dcc_list_print(CHAT_DCC_REC *dcc) static void cmd_msg(const char *data) { CHAT_DCC_REC *dcc; + GHashTable *optlist; char *text, *target; void *free_arg; g_return_if_fail(data != NULL); - if (*data != '=') { - /* handle only DCC messages */ - return; - } - - if (!cmd_get_params(data, &free_arg, 2 | PARAM_FLAG_GETREST, - &target, &text)) + if (!cmd_get_params(data, &free_arg, 2 | PARAM_FLAG_OPTIONS | + PARAM_FLAG_GETREST, "msg", + &optlist, &target, &text)) return; - dcc = dcc_chat_find_id(target+1); - if (dcc == NULL || dcc->sendbuf == NULL) { - printformat(NULL, NULL, MSGLEVEL_CLIENTERROR, - IRCTXT_DCC_CHAT_NOT_FOUND, target+1); - } else { - if (query_find(NULL, target) == NULL) - completion_last_message_add(target); - - signal_emit("message dcc own", 2, dcc, text); + if (*target == '=') { + /* handle only DCC messages */ + dcc = dcc_chat_find_id(target+1); + if (dcc == NULL || dcc->sendbuf == NULL) { + printformat(NULL, NULL, MSGLEVEL_CLIENTERROR, + IRCTXT_DCC_CHAT_NOT_FOUND, target+1); + } else { + if (query_find(NULL, target) == NULL) + completion_last_message_add(target); + + signal_emit("message dcc own", 2, dcc, text); + } } cmd_params_free(free_arg); diff --git a/src/irc/dcc/dcc-chat.c b/src/irc/dcc/dcc-chat.c index 370d8ac5..c6e9f9b8 100644 --- a/src/irc/dcc/dcc-chat.c +++ b/src/irc/dcc/dcc-chat.c @@ -176,26 +176,27 @@ CHAT_DCC_REC *item_get_dcc(WI_ITEM_REC *item) static void cmd_msg(const char *data) { CHAT_DCC_REC *dcc; + GHashTable *optlist; char *text, *target; void *free_arg; g_return_if_fail(data != NULL); - if (*data != '=') { - /* handle only DCC messages */ + if (!cmd_get_params(data, &free_arg, 2 | PARAM_FLAG_OPTIONS | + PARAM_FLAG_GETREST, "msg", + &optlist, &target, &text)) return; - } - if (!cmd_get_params(data, &free_arg, 2 | PARAM_FLAG_GETREST, - &target, &text)) - return; + if (*target == '=') { + /* handle only DCC messages */ + dcc = dcc_chat_find_id(target+1); + if (dcc != NULL && dcc->sendbuf != NULL) + dcc_chat_send(dcc, text); - dcc = dcc_chat_find_id(target+1); - if (dcc != NULL && dcc->sendbuf != NULL) - dcc_chat_send(dcc, text); + signal_stop(); + } cmd_params_free(free_arg); - signal_stop(); } static void cmd_me(const char *data, SERVER_REC *server, QUERY_REC *item) |