diff options
author | Timo Sirainen <cras@irssi.org> | 2002-05-26 17:39:35 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2002-05-26 17:39:35 +0000 |
commit | 137aaeb4997295128a66d1ced6ff71bf12919e57 (patch) | |
tree | bb2a0ee88f31af70de33d008e4f30db841f22666 /src/irc/dcc | |
parent | eddc3d90c6f1defcdaec9311f22aaebe56ff0ada (diff) | |
download | irssi-137aaeb4997295128a66d1ced6ff71bf12919e57.zip |
"/MSG *" works now properly with dcc chat queries.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2826 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/irc/dcc')
-rw-r--r-- | src/irc/dcc/dcc-chat.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/src/irc/dcc/dcc-chat.c b/src/irc/dcc/dcc-chat.c index 93aaaf55..d7ae68df 100644 --- a/src/irc/dcc/dcc-chat.c +++ b/src/irc/dcc/dcc-chat.c @@ -173,7 +173,7 @@ CHAT_DCC_REC *item_get_dcc(WI_ITEM_REC *item) } /* Send text to DCC chat */ -static void cmd_msg(const char *data) +static void cmd_msg(const char *data, SERVER_REC *server, WI_ITEM_REC *item) { CHAT_DCC_REC *dcc; GHashTable *optlist; @@ -187,26 +187,31 @@ static void cmd_msg(const char *data) &optlist, &target, &text)) return; - if (*target == '=') { - /* handle only DCC messages */ + /* handle only DCC messages */ + if (strcmp(target, "*") == 0) + dcc = item_get_dcc(item); + else if (*target == '=') dcc = dcc_chat_find_id(target+1); - if (dcc != NULL && dcc->sendbuf != NULL) - dcc_chat_send(dcc, text); + else + dcc = NULL; + + if (dcc != NULL && dcc->sendbuf != NULL) + dcc_chat_send(dcc, text); + if (dcc != NULL || *target == '=') signal_stop(); - } cmd_params_free(free_arg); } -static void cmd_me(const char *data, SERVER_REC *server, QUERY_REC *item) +static void cmd_me(const char *data, SERVER_REC *server, WI_ITEM_REC *item) { CHAT_DCC_REC *dcc; char *str; g_return_if_fail(data != NULL); - dcc = item_get_dcc((WI_ITEM_REC *) item); + dcc = item_get_dcc(item); if (dcc == NULL) return; str = g_strconcat("ACTION ", data, NULL); |