summaryrefslogtreecommitdiff
path: root/src/fe-common/irc/dcc
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2002-02-04 04:27:45 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2002-02-04 04:27:45 +0000
commitcf8323634699c3dc9db670f2570179951152b6b3 (patch)
tree82e60b9fa41c4d8558f6f0983fbaf829e61a5027 /src/fe-common/irc/dcc
parent82b0c081e24aead76699167753c657f6fe983252 (diff)
downloadirssi-cf8323634699c3dc9db670f2570179951152b6b3.zip
printtext(): you can now specify server target with tag name instead of
record. This is useful with DCC chats when you know the initial server tag but the server might be already disconnected. So what this means is that you now get ~/irclogs/ircnet/=nick.log instead of ~/irclogs/=nick.log :) git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2388 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common/irc/dcc')
-rw-r--r--src/fe-common/irc/dcc/fe-dcc-chat-messages.c58
1 files changed, 39 insertions, 19 deletions
diff --git a/src/fe-common/irc/dcc/fe-dcc-chat-messages.c b/src/fe-common/irc/dcc/fe-dcc-chat-messages.c
index 6d480393..d30d6359 100644
--- a/src/fe-common/irc/dcc/fe-dcc-chat-messages.c
+++ b/src/fe-common/irc/dcc/fe-dcc-chat-messages.c
@@ -30,80 +30,100 @@
static void sig_message_dcc_own(CHAT_DCC_REC *dcc, const char *msg)
{
+ TEXT_DEST_REC dest;
QUERY_REC *query;
char *tag;
tag = g_strconcat("=", dcc->id, NULL);
query = query_find(NULL, tag);
- printformat(NULL, tag, MSGLEVEL_DCCMSGS | MSGLEVEL_NOHILIGHT,
- query != NULL ? IRCTXT_OWN_DCC_QUERY :
- IRCTXT_OWN_DCC, dcc->mynick, dcc->id, msg);
+ format_create_dest_tag(&dest, dcc->server, dcc->servertag, tag,
+ MSGLEVEL_DCCMSGS | MSGLEVEL_NOHILIGHT, NULL);
+
+ printformat_dest(&dest, query != NULL ? IRCTXT_OWN_DCC_QUERY :
+ IRCTXT_OWN_DCC, dcc->mynick, dcc->id, msg);
g_free(tag);
}
static void sig_message_dcc_own_action(CHAT_DCC_REC *dcc, const char *msg)
{
+ TEXT_DEST_REC dest;
QUERY_REC *query;
char *tag;
tag = g_strconcat("=", dcc->id, NULL);
query = query_find(NULL, tag);
- printformat(NULL, tag, MSGLEVEL_DCCMSGS | MSGLEVEL_NOHILIGHT,
- query != NULL ? IRCTXT_OWN_DCC_ACTION_QUERY :
- IRCTXT_OWN_DCC_ACTION, dcc->mynick, dcc->id, msg);
+ format_create_dest_tag(&dest, dcc->server, dcc->servertag, tag,
+ MSGLEVEL_DCCMSGS | MSGLEVEL_ACTIONS |
+ MSGLEVEL_NOHILIGHT, NULL);
+
+ printformat_dest(&dest, query != NULL ? IRCTXT_OWN_DCC_ACTION_QUERY :
+ IRCTXT_OWN_DCC_ACTION, dcc->mynick, dcc->id, msg);
g_free(tag);
}
static void sig_message_dcc_own_ctcp(CHAT_DCC_REC *dcc, const char *cmd,
const char *data)
{
+ TEXT_DEST_REC dest;
char *tag;
tag = g_strconcat("=", dcc->id, NULL);
- printformat(NULL, tag, MSGLEVEL_DCC, IRCTXT_OWN_DCC_CTCP,
- dcc->id, cmd, data);
+ format_create_dest_tag(&dest, dcc->server, dcc->servertag, tag,
+ MSGLEVEL_DCC | MSGLEVEL_CTCPS, NULL);
+
+ printformat_dest(&dest, IRCTXT_OWN_DCC_CTCP, dcc->id, cmd, data);
g_free(tag);
}
static void sig_message_dcc(CHAT_DCC_REC *dcc, const char *msg)
{
+ TEXT_DEST_REC dest;
QUERY_REC *query;
char *tag;
tag = g_strconcat("=", dcc->id, NULL);
-
query = query_find(NULL, tag);
- printformat(NULL, tag, MSGLEVEL_DCCMSGS,
- query != NULL ? IRCTXT_DCC_MSG_QUERY : IRCTXT_DCC_MSG,
- dcc->id, msg);
+
+ format_create_dest_tag(&dest, dcc->server, dcc->servertag, tag,
+ MSGLEVEL_DCCMSGS, NULL);
+
+ printformat_dest(&dest, query != NULL ? IRCTXT_DCC_MSG_QUERY :
+ IRCTXT_DCC_MSG, dcc->id, msg);
g_free(tag);
}
static void sig_message_dcc_action(CHAT_DCC_REC *dcc, const char *msg)
{
+ TEXT_DEST_REC dest;
QUERY_REC *query;
char *tag;
tag = g_strconcat("=", dcc->id, NULL);
-
query = query_find(NULL, tag);
- printformat(NULL, tag, MSGLEVEL_DCCMSGS | MSGLEVEL_ACTIONS,
- query != NULL ? IRCTXT_ACTION_DCC_QUERY :
- IRCTXT_ACTION_DCC, dcc->id, msg);
- g_free(tag);
+
+ format_create_dest_tag(&dest, dcc->server, dcc->servertag, tag,
+ MSGLEVEL_DCCMSGS | MSGLEVEL_ACTIONS, NULL);
+
+ printformat_dest(&dest, query != NULL ? IRCTXT_ACTION_DCC_QUERY :
+ IRCTXT_ACTION_DCC, dcc->id, msg);
+ g_free(tag);
}
static void sig_message_dcc_ctcp(CHAT_DCC_REC *dcc, const char *cmd,
const char *data)
{
+ TEXT_DEST_REC dest;
char *tag;
tag = g_strconcat("=", dcc->id, NULL);
- printformat(NULL, tag, MSGLEVEL_DCC, IRCTXT_DCC_CTCP,
- dcc->id, cmd, data);
+
+ format_create_dest_tag(&dest, dcc->server, dcc->servertag, tag,
+ MSGLEVEL_DCC | MSGLEVEL_CTCPS, NULL);
+
+ printformat_dest(&dest, IRCTXT_DCC_CTCP, dcc->id, cmd, data);
g_free(tag);
}