diff options
author | Timo Sirainen <cras@irssi.org> | 2001-05-11 12:55:18 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2001-05-11 12:55:18 +0000 |
commit | f3f8eb620a4c47da0479b2fc7c8e1e1ed386d5c8 (patch) | |
tree | 0295ad9ce763d5ed7732a40fc8da7dbe72b99279 /src/fe-common/irc/dcc | |
parent | cb2868557491ce3d1d61d6d55811a80a387efe4f (diff) | |
download | irssi-f3f8eb620a4c47da0479b2fc7c8e1e1ed386d5c8.zip |
added "dcc request send" signal - irssi now prints "DCC CHAT/SEND request
sent to nick".
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1472 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common/irc/dcc')
-rw-r--r-- | src/fe-common/irc/dcc/fe-dcc.c | 10 | ||||
-rw-r--r-- | src/fe-common/irc/dcc/module-formats.c | 1 | ||||
-rw-r--r-- | src/fe-common/irc/dcc/module-formats.h | 1 |
3 files changed, 12 insertions, 0 deletions
diff --git a/src/fe-common/irc/dcc/fe-dcc.c b/src/fe-common/irc/dcc/fe-dcc.c index 1526b1b4..2989e3ab 100644 --- a/src/fe-common/irc/dcc/fe-dcc.c +++ b/src/fe-common/irc/dcc/fe-dcc.c @@ -66,6 +66,14 @@ static void dcc_rejected(DCC_REC *dcc) dcc_type2str(dcc->type), dcc->nick, dcc->arg); } +static void dcc_request_send(DCC_REC *dcc) +{ + g_return_if_fail(dcc != NULL); + + printformat(dcc->server, NULL, MSGLEVEL_DCC, IRCTXT_DCC_REQUEST_SEND, + dcc_type2str(dcc->type), dcc->nick, dcc->arg); +} + static void dcc_error_connect(DCC_REC *dcc) { g_return_if_fail(dcc != NULL); @@ -124,6 +132,7 @@ void fe_irc_dcc_init(void) signal_add("dcc request", (SIGNAL_FUNC) dcc_request); signal_add("dcc rejected", (SIGNAL_FUNC) dcc_rejected); + signal_add("dcc request send", (SIGNAL_FUNC) dcc_request_send); signal_add("dcc error connect", (SIGNAL_FUNC) dcc_error_connect); signal_add("dcc error unknown type", (SIGNAL_FUNC) dcc_error_unknown_type); command_bind("dcc", NULL, (SIGNAL_FUNC) cmd_dcc); @@ -142,6 +151,7 @@ void fe_irc_dcc_deinit(void) signal_remove("dcc request", (SIGNAL_FUNC) dcc_request); signal_remove("dcc rejected", (SIGNAL_FUNC) dcc_rejected); + signal_remove("dcc request send", (SIGNAL_FUNC) dcc_request_send); signal_remove("dcc error connect", (SIGNAL_FUNC) dcc_error_connect); signal_remove("dcc error unknown type", (SIGNAL_FUNC) dcc_error_unknown_type); command_unbind("dcc", (SIGNAL_FUNC) cmd_dcc); diff --git a/src/fe-common/irc/dcc/module-formats.c b/src/fe-common/irc/dcc/module-formats.c index 2c6c7bd3..8f1aea81 100644 --- a/src/fe-common/irc/dcc/module-formats.c +++ b/src/fe-common/irc/dcc/module-formats.c @@ -60,6 +60,7 @@ FORMAT_REC fecommon_irc_dcc_formats[] = { { "dcc_connect_error", "{dcc DCC can't connect to {hilight $0} port {hilight $1}}", 2, { 0, 1 } }, { "dcc_cant_create", "{dcc DCC can't create file {dccfile $0}}", 1, { 0 } }, { "dcc_rejected", "{dcc DCC $0 was rejected by {nick $1} [{hilight $2}]}", 3, { 0, 0, 0 } }, + { "dcc_request_send", "{dcc DCC $0 request sent to {nick $1}: $2", 3, { 0, 0, 0 } }, { "dcc_close", "{dcc DCC $0 close for {nick $1} [{hilight $2}]}", 3, { 0, 0, 0 } }, { "dcc_lowport", "{dcc Warning: Port sent with DCC request is a lowport ({hilight $0, $1}) - this isn't normal. It is possible the address/port is faked (or maybe someone is just trying to bypass firewall)}", 2, { 1, 0 } }, { "dcc_list_header", "{dcc DCC connections}", 0 }, diff --git a/src/fe-common/irc/dcc/module-formats.h b/src/fe-common/irc/dcc/module-formats.h index ad7c867a..bc783a04 100644 --- a/src/fe-common/irc/dcc/module-formats.h +++ b/src/fe-common/irc/dcc/module-formats.h @@ -38,6 +38,7 @@ enum { IRCTXT_DCC_CONNECT_ERROR, IRCTXT_DCC_CANT_CREATE, IRCTXT_DCC_REJECTED, + IRCTXT_DCC_REQUEST_SEND, IRCTXT_DCC_CLOSE, IRCTXT_DCC_LOWPORT, IRCTXT_DCC_LIST_HEADER, |