summaryrefslogtreecommitdiff
path: root/src/fe-common/irc/dcc/fe-dcc-chat.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fe-common/irc/dcc/fe-dcc-chat.c')
-rw-r--r--src/fe-common/irc/dcc/fe-dcc-chat.c32
1 files changed, 16 insertions, 16 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);