diff options
author | Timo Sirainen <cras@irssi.org> | 2001-01-18 02:30:59 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2001-01-18 02:30:59 +0000 |
commit | ce6e5a12f92f5375da6bcf499be666210856dbf3 (patch) | |
tree | 172f342986f4f86aaf1ccf7f99331c642ef617f5 /src/fe-common | |
parent | babf7c77ac9344c8b12ca2ce87096e7ed079b687 (diff) | |
download | irssi-ce6e5a12f92f5375da6bcf499be666210856dbf3.zip |
DCC cleanups - half rewrite. New features: file names with spaces work
properly, you can have multiple dcc chats with same people (or more
useful, same nick in different ircnets), /DCC CHAT|GET|RESUME with no
arguments accepts the last request, notifies if dcc request was sent to
channel, warns about connecting to lowports, /SET dcc_autoget_lowports
specifies if autogetting should work with lowports, complains of
invalid dcc ctcps instead of ignoring. And fixed /SET dcc_autorename
OFF which didn't work before.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1135 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common')
-rw-r--r-- | src/fe-common/irc/dcc/fe-dcc.c | 180 | ||||
-rw-r--r-- | src/fe-common/irc/dcc/module-formats.c | 4 | ||||
-rw-r--r-- | src/fe-common/irc/dcc/module-formats.h | 4 |
3 files changed, 128 insertions, 60 deletions
diff --git a/src/fe-common/irc/dcc/fe-dcc.c b/src/fe-common/irc/dcc/fe-dcc.c index ffe7f6ed..acb322c8 100644 --- a/src/fe-common/irc/dcc/fe-dcc.c +++ b/src/fe-common/irc/dcc/fe-dcc.c @@ -29,7 +29,7 @@ #include "channels.h" #include "irc-queries.h" -#include "irc/dcc/dcc.h" +#include "irc/dcc/dcc-chat.h" #include "completion.h" #include "themes.h" @@ -49,20 +49,23 @@ static void dcc_connected(DCC_REC *dcc) switch (dcc->type) { case DCC_TYPE_CHAT: - sender = g_strconcat("=", dcc->nick, NULL); - printformat(dcc->server, NULL, MSGLEVEL_DCC, IRCTXT_DCC_CHAT_CONNECTED, - dcc->nick, dcc->addrstr, dcc->port); + sender = g_strconcat("=", dcc->chat_id, NULL); + printformat(dcc->server, NULL, MSGLEVEL_DCC, + IRCTXT_DCC_CHAT_CONNECTED, + dcc->chat_id, dcc->addrstr, dcc->port); if (autocreate_dccquery && query_find(NULL, sender) == NULL) irc_query_create(dcc->server == NULL ? NULL : dcc->server->tag, sender, TRUE); g_free(sender); break; case DCC_TYPE_SEND: - printformat(dcc->server, NULL, MSGLEVEL_DCC, IRCTXT_DCC_SEND_CONNECTED, + printformat(dcc->server, NULL, MSGLEVEL_DCC, + IRCTXT_DCC_SEND_CONNECTED, dcc->arg, dcc->nick, dcc->addrstr, dcc->port); break; case DCC_TYPE_GET: - printformat(dcc->server, NULL, MSGLEVEL_DCC, IRCTXT_DCC_GET_CONNECTED, + printformat(dcc->server, NULL, MSGLEVEL_DCC, + IRCTXT_DCC_GET_CONNECTED, dcc->arg, dcc->nick, dcc->addrstr, dcc->port); break; } @@ -85,33 +88,40 @@ static void dcc_closed(DCC_REC *dcc) g_return_if_fail(dcc != NULL); secs = dcc->starttime == 0 ? -1 : time(NULL)-dcc->starttime; - kbs = (double) (dcc->transfd-dcc->skipped) / (secs == 0 ? 1 : secs) / 1024.0; + kbs = (double) (dcc->transfd-dcc->skipped) / + (secs == 0 ? 1 : secs) / 1024.0; switch (dcc->type) { case DCC_TYPE_CHAT: - sender = g_strconcat("=", dcc->nick, NULL); + sender = g_strconcat("=", dcc->chat_id, NULL); printformat(dcc->server, NULL, MSGLEVEL_DCC, - IRCTXT_DCC_CHAT_DISCONNECTED, dcc->nick); + IRCTXT_DCC_CHAT_DISCONNECTED, dcc->chat_id); g_free(sender); break; case DCC_TYPE_SEND: if (secs == -1) { /* aborted */ - printformat(dcc->server, NULL, MSGLEVEL_DCC, IRCTXT_DCC_SEND_ABORTED, + printformat(dcc->server, NULL, MSGLEVEL_DCC, + IRCTXT_DCC_SEND_ABORTED, dcc->arg, dcc->nick); } else { - printformat(dcc->server, NULL, MSGLEVEL_DCC, IRCTXT_DCC_SEND_COMPLETE, - dcc->arg, dcc->transfd/1024, dcc->nick, (long) secs, kbs); + printformat(dcc->server, NULL, MSGLEVEL_DCC, + IRCTXT_DCC_SEND_COMPLETE, + dcc->arg, dcc->transfd/1024, dcc->nick, + (long) secs, kbs); } break; case DCC_TYPE_GET: if (secs == -1) { /* aborted */ - printformat(dcc->server, NULL, MSGLEVEL_DCC, IRCTXT_DCC_GET_ABORTED, + printformat(dcc->server, NULL, MSGLEVEL_DCC, + IRCTXT_DCC_GET_ABORTED, dcc->arg, dcc->nick); } else { - printformat(dcc->server, NULL, MSGLEVEL_DCC, IRCTXT_DCC_GET_COMPLETE, - dcc->arg, dcc->transfd/1024, dcc->nick, (long) secs, kbs); + printformat(dcc->server, NULL, MSGLEVEL_DCC, + IRCTXT_DCC_GET_COMPLETE, + dcc->arg, dcc->transfd/1024, dcc->nick, + (long) secs, kbs); } break; } @@ -124,9 +134,9 @@ static void dcc_chat_action(const char *msg, DCC_REC *dcc) g_return_if_fail(dcc != NULL); g_return_if_fail(msg != NULL); - sender = g_strconcat("=", dcc->nick, NULL); + sender = g_strconcat("=", dcc->chat_id, NULL); printformat(NULL, sender, MSGLEVEL_DCCMSGS, - IRCTXT_ACTION_DCC, dcc->nick, msg); + IRCTXT_ACTION_DCC, dcc->chat_id, msg); g_free(sender); } @@ -137,8 +147,9 @@ static void dcc_chat_ctcp(const char *msg, DCC_REC *dcc) g_return_if_fail(dcc != NULL); g_return_if_fail(msg != NULL); - sender = g_strconcat("=", dcc->nick, NULL); - printformat(NULL, sender, MSGLEVEL_DCC, IRCTXT_DCC_CTCP, dcc->nick, msg); + sender = g_strconcat("=", dcc->chat_id, NULL); + printformat(NULL, sender, MSGLEVEL_DCC, + IRCTXT_DCC_CTCP, dcc->chat_id, msg); g_free(sender); } @@ -150,7 +161,7 @@ static void dcc_chat_msg(DCC_REC *dcc, const char *msg) g_return_if_fail(dcc != NULL); g_return_if_fail(msg != NULL); - sender = g_strconcat("=", dcc->nick, NULL); + sender = g_strconcat("=", dcc->chat_id, NULL); query = query_find(NULL, sender); if (settings_get_bool("emphasis")) @@ -160,7 +171,7 @@ static void dcc_chat_msg(DCC_REC *dcc, const char *msg) printformat(NULL, sender, MSGLEVEL_DCCMSGS, query != NULL ? IRCTXT_DCC_MSG_QUERY : - IRCTXT_DCC_MSG, dcc->nick, msg); + IRCTXT_DCC_MSG, dcc->chat_id, msg); g_free_not_null(freemsg); g_free(sender); } @@ -171,14 +182,26 @@ static void dcc_request(DCC_REC *dcc) switch (dcc->type) { case DCC_TYPE_CHAT: - printformat(dcc->server, NULL, MSGLEVEL_DCC, IRCTXT_DCC_CHAT, - dcc->nick, dcc->addrstr, dcc->port); + printformat(dcc->server, NULL, MSGLEVEL_DCC, + ischannel(*dcc->target) ? IRCTXT_DCC_CHAT_CHANNEL : + IRCTXT_DCC_CHAT, dcc->chat_id, dcc->addrstr, + dcc->port, dcc->target); break; case DCC_TYPE_GET: - printformat(dcc->server, NULL, MSGLEVEL_DCC, IRCTXT_DCC_SEND, - dcc->nick, dcc->addrstr, dcc->port, dcc->arg, dcc->size); + printformat(dcc->server, NULL, MSGLEVEL_DCC, + ischannel(*dcc->target) ? IRCTXT_DCC_SEND_CHANNEL : + IRCTXT_DCC_SEND, dcc->nick, dcc->addrstr, + dcc->port, dcc->arg, dcc->size, dcc->target); break; } + + if (dcc->port < 1024) { + char *service = net_getservbyport(dcc->port); + + printformat(dcc->server, NULL, MSGLEVEL_DCC, + IRCTXT_DCC_LOWPORT, dcc->port, + service != NULL ? service : "unknown"); + } } static void dcc_error_connect(DCC_REC *dcc) @@ -201,7 +224,8 @@ static void dcc_error_file_not_found(const char *nick, const char *fname) g_return_if_fail(nick != NULL); g_return_if_fail(fname != NULL); - printformat(NULL, NULL, MSGLEVEL_DCC, IRCTXT_DCC_SEND_FILE_NOT_FOUND, fname); + printformat(NULL, NULL, MSGLEVEL_DCC, + IRCTXT_DCC_SEND_FILE_NOT_FOUND, fname); } static void dcc_error_get_not_found(const char *nick) @@ -216,7 +240,8 @@ static void dcc_error_send_exists(const char *nick, const char *fname) g_return_if_fail(nick != NULL); g_return_if_fail(fname != NULL); - printformat(NULL, NULL, MSGLEVEL_DCC, IRCTXT_DCC_SEND_EXISTS, fname, nick); + printformat(NULL, NULL, MSGLEVEL_DCC, + IRCTXT_DCC_SEND_EXISTS, fname, nick); } static void dcc_error_unknown_type(const char *type) @@ -226,7 +251,8 @@ static void dcc_error_unknown_type(const char *type) printformat(NULL, NULL, MSGLEVEL_DCC, IRCTXT_DCC_UNKNOWN_TYPE, type); } -static void dcc_error_close_not_found(const char *type, const char *nick, const char *fname) +static void dcc_error_close_not_found(const char *type, const char *nick, + const char *fname) { g_return_if_fail(type != NULL); g_return_if_fail(nick != NULL); @@ -235,40 +261,60 @@ static void dcc_error_close_not_found(const char *type, const char *nick, const if (fname == '\0') fname = "(ANY)"; switch (dcc_str2type(type)) { case DCC_TYPE_CHAT: - printformat(NULL, NULL, MSGLEVEL_DCC, IRCTXT_DCC_CHAT_NOT_FOUND, nick); + printformat(NULL, NULL, MSGLEVEL_DCC, + IRCTXT_DCC_CHAT_NOT_FOUND, nick); break; case DCC_TYPE_SEND: - printformat(NULL, NULL, MSGLEVEL_DCC, IRCTXT_DCC_SEND_NOT_FOUND, nick, fname); + printformat(NULL, NULL, MSGLEVEL_DCC, + IRCTXT_DCC_SEND_NOT_FOUND, nick, fname); break; case DCC_TYPE_GET: - printformat(NULL, NULL, MSGLEVEL_DCC, IRCTXT_DCC_GET_NOT_FOUND, nick, fname); + printformat(NULL, NULL, MSGLEVEL_DCC, + IRCTXT_DCC_GET_NOT_FOUND, nick, fname); break; } } -static void dcc_unknown_ctcp(const char *data, const char *sender) +static void dcc_error_ctcp(const char *type, const char *data, + const char *nick, const char *addr, + const char *target) +{ + printformat(NULL, NULL, MSGLEVEL_DCC, + IRCTXT_DCC_INVALID_CTCP, type, nick, addr, target); +} + +static void dcc_unknown_ctcp(IRC_SERVER_REC *server, const char *data, + const char *nick, const char *addr, + const char *target, DCC_REC *chat) { char *type, *args; void *free_arg; g_return_if_fail(data != NULL); - if (!cmd_get_params(data, &free_arg, 2 | PARAM_FLAG_GETREST, &type, &args)) + if (!cmd_get_params(data, &free_arg, 2 | PARAM_FLAG_GETREST, + &type, &args)) return; - printformat(NULL, NULL, MSGLEVEL_DCC, IRCTXT_DCC_UNKNOWN_CTCP, type, sender, args); + + printformat(NULL, NULL, MSGLEVEL_DCC, IRCTXT_DCC_UNKNOWN_CTCP, + type, nick, args); cmd_params_free(free_arg); } -static void dcc_unknown_reply(const char *data, const char *sender) +static void dcc_unknown_reply(IRC_SERVER_REC *server, const char *data, + const char *nick) { char *type, *args; void *free_arg; g_return_if_fail(data != NULL); - if (!cmd_get_params(data, &free_arg, 2 | PARAM_FLAG_GETREST, &type, &args)) + if (!cmd_get_params(data, &free_arg, 2 | PARAM_FLAG_GETREST, + &type, &args)) return; - printformat(NULL, NULL, MSGLEVEL_DCC, IRCTXT_DCC_UNKNOWN_REPLY, type, sender, args); + + printformat(NULL, NULL, MSGLEVEL_DCC, IRCTXT_DCC_UNKNOWN_REPLY, + type, nick, args); cmd_params_free(free_arg); } @@ -280,7 +326,7 @@ static void sig_dcc_destroyed(DCC_REC *dcc) if (dcc->type != DCC_TYPE_CHAT) return; - nick = g_strconcat("=", dcc->nick, NULL); + nick = g_strconcat("=", dcc->chat_id, NULL); query = query_find(NULL, nick); g_free(nick); @@ -298,7 +344,7 @@ static void sig_query_destroyed(QUERY_REC *query) if (*query->name != '=') return; - dcc = dcc_find_item(DCC_TYPE_CHAT, query->name+1, NULL); + dcc = dcc_chat_find_id(query->name+1); if (dcc != NULL && !dcc->destroyed) { /* DCC query window closed, close the dcc chat too. */ signal_emit("dcc closed", 1, dcc); @@ -319,10 +365,11 @@ static void cmd_msg(const char *data) return; } - if (!cmd_get_params(data, &free_arg, 2 | PARAM_FLAG_GETREST, &target, &text)) + if (!cmd_get_params(data, &free_arg, 2 | PARAM_FLAG_GETREST, + &target, &text)) return; - dcc = dcc_find_item(DCC_TYPE_CHAT, target+1, NULL); + 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); @@ -361,11 +408,13 @@ static void cmd_action(const char *data, SERVER_REC *server, WI_ITEM_REC *item) return; } - if (!cmd_get_params(data, &free_arg, 2 | PARAM_FLAG_GETREST, &target, &text)) + if (!cmd_get_params(data, &free_arg, 2 | PARAM_FLAG_GETREST, + &target, &text)) return; - if (*target == '\0' || *text == '\0') cmd_param_error(CMDERR_NOT_ENOUGH_PARAMS); + if (*target == '\0' || *text == '\0') + cmd_param_error(CMDERR_NOT_ENOUGH_PARAMS); - dcc = dcc_find_item(DCC_TYPE_CHAT, target+1, NULL); + 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); @@ -383,11 +432,14 @@ static void cmd_ctcp(const char *data, SERVER_REC *server) void *free_arg; g_return_if_fail(data != NULL); - if (server == NULL || !server->connected) cmd_return_error(CMDERR_NOT_CONNECTED); + if (server == NULL || !server->connected) + cmd_return_error(CMDERR_NOT_CONNECTED); - if (!cmd_get_params(data, &free_arg, 3 | PARAM_FLAG_GETREST, &target, &ctcpcmd, &ctcpdata)) + if (!cmd_get_params(data, &free_arg, 3 | PARAM_FLAG_GETREST, + &target, &ctcpcmd, &ctcpdata)) return; - if (*target == '\0' || *ctcpcmd == '\0') cmd_param_error(CMDERR_NOT_ENOUGH_PARAMS); + if (*target == '\0' || *ctcpcmd == '\0') + cmd_param_error(CMDERR_NOT_ENOUGH_PARAMS); if (*target != '=') { /* handle only DCC CTCPs */ @@ -395,7 +447,7 @@ static void cmd_ctcp(const char *data, SERVER_REC *server) return; } - dcc = dcc_find_item(DCC_TYPE_CHAT, target+1, NULL); + 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); @@ -422,13 +474,18 @@ static void cmd_dcc_list(const char *data) going = time(NULL) - dcc->starttime; if (going == 0) going = 1; /* no division by zeros :) */ - if (dcc->type == DCC_TYPE_CHAT) - printformat(NULL, NULL, MSGLEVEL_DCC, IRCTXT_DCC_LIST_LINE_CHAT, dcc->nick, dcc_type2str(dcc->type)); - else - printformat(NULL, NULL, MSGLEVEL_DCC, IRCTXT_DCC_LIST_LINE_FILE, - dcc->nick, dcc_type2str(dcc->type), dcc->transfd/1024, dcc->size/1024, - dcc->size == 0 ? 0 : (int)((double)dcc->transfd/(double)dcc->size*100.0), - (double) (dcc->transfd-dcc->skipped)/going/1024, dcc->arg); + if (dcc->type == DCC_TYPE_CHAT) { + printformat(NULL, NULL, MSGLEVEL_DCC, + IRCTXT_DCC_LIST_LINE_CHAT, + dcc->chat_id, dcc_type2str(dcc->type)); + } else { + printformat(NULL, NULL, MSGLEVEL_DCC, + IRCTXT_DCC_LIST_LINE_FILE, + dcc->nick, dcc_type2str(dcc->type), + dcc->transfd/1024, dcc->size/1024, + dcc->size == 0 ? 0 : (int)((double)dcc->transfd/(double)dcc->size*100.0), + (double) (dcc->transfd-dcc->skipped)/going/1024, dcc->arg); + } } printformat(NULL, NULL, MSGLEVEL_DCC, IRCTXT_DCC_LIST_FOOTER); } @@ -442,7 +499,8 @@ static void cmd_dcc(const char *data) } static void sig_dcc_send_complete(GList **list, WINDOW_REC *window, - const char *word, const char *line, int *want_space) + const char *word, const char *line, + int *want_space) { g_return_if_fail(list != NULL); g_return_if_fail(word != NULL); @@ -483,8 +541,9 @@ void fe_irc_dcc_init(void) signal_add("dcc error send exists", (SIGNAL_FUNC) dcc_error_send_exists); signal_add("dcc error unknown type", (SIGNAL_FUNC) dcc_error_unknown_type); signal_add("dcc error close not found", (SIGNAL_FUNC) dcc_error_close_not_found); - signal_add("dcc unknown ctcp", (SIGNAL_FUNC) dcc_unknown_ctcp); - signal_add("dcc unknown reply", (SIGNAL_FUNC) dcc_unknown_reply); + signal_add("dcc error ctcp", (SIGNAL_FUNC) dcc_error_ctcp); + signal_add("default ctcp msg dcc", (SIGNAL_FUNC) dcc_unknown_ctcp); + signal_add("default ctcp reply dcc", (SIGNAL_FUNC) dcc_unknown_reply); signal_add("dcc destroyed", (SIGNAL_FUNC) sig_dcc_destroyed); signal_add("query destroyed", (SIGNAL_FUNC) sig_query_destroyed); signal_add("complete command dcc send", (SIGNAL_FUNC) sig_dcc_send_complete); @@ -518,8 +577,9 @@ void fe_irc_dcc_deinit(void) signal_remove("dcc error send exists", (SIGNAL_FUNC) dcc_error_send_exists); signal_remove("dcc error unknown type", (SIGNAL_FUNC) dcc_error_unknown_type); signal_remove("dcc error close not found", (SIGNAL_FUNC) dcc_error_close_not_found); - signal_remove("dcc unknown ctcp", (SIGNAL_FUNC) dcc_unknown_ctcp); - signal_remove("dcc unknown reply", (SIGNAL_FUNC) dcc_unknown_reply); + signal_remove("dcc error ctcp", (SIGNAL_FUNC) dcc_error_ctcp); + signal_remove("default ctcp msg dcc", (SIGNAL_FUNC) dcc_unknown_ctcp); + signal_remove("default ctcp reply dcc", (SIGNAL_FUNC) dcc_unknown_reply); signal_remove("dcc destroyed", (SIGNAL_FUNC) sig_dcc_destroyed); signal_remove("query destroyed", (SIGNAL_FUNC) sig_query_destroyed); signal_remove("complete command dcc send", (SIGNAL_FUNC) sig_dcc_send_complete); diff --git a/src/fe-common/irc/dcc/module-formats.c b/src/fe-common/irc/dcc/module-formats.c index e1e32930..57ddda63 100644 --- a/src/fe-common/irc/dcc/module-formats.c +++ b/src/fe-common/irc/dcc/module-formats.c @@ -36,10 +36,12 @@ FORMAT_REC fecommon_irc_dcc_formats[] = { { "dcc_msg_query", "{privmsgnick $0}$1", 2, { 0, 0 } }, { "dcc_ctcp", "{dcc >>> DCC CTCP received from {hilight $0}: $1}", 2, { 0, 0 } }, { "dcc_chat", "{dcc DCC CHAT from {nick $0} [$1 port $2]}", 3, { 0, 0, 1 } }, + { "dcc_chat_channel", "{dcc DCC CHAT from {nick $0} [$1 port $2] requested in channel {channel $3}}", 4, { 0, 0, 1, 0 } }, { "dcc_chat_not_found", "{dcc No DCC CHAT connection open to {nick $0}}", 1, { 0 } }, { "dcc_chat_connected", "{dcc DCC CHAT connection with {nick $0} [$1 port $2] established}", 3, { 0, 0, 1 } }, { "dcc_chat_disconnected", "{dcc DCC lost chat to {nick $0}}", 1, { 0 } }, { "dcc_send", "{dcc DCC SEND from {nick $0} [$1 port $2]: $3 [$4 bytes]}", 5, { 0, 0, 1, 0, 2 } }, + { "dcc_send_channel", "{dcc DCC SEND from {nick $0} [$1 port $2]: $3 [$4 bytes] requested in channel {channel $5}}", 6, { 0, 0, 1, 0, 2, 0 } }, { "dcc_send_exists", "{dcc DCC already sending file {dccfile $0} for {nick $1}}", 2, { 0, 0 } }, { "dcc_send_not_found", "{dcc DCC not sending file {dccfile $1} to {nick $0}}", 2, { 0, 0 } }, { "dcc_send_file_not_found", "{dcc DCC file not found: {dccfile $0}}", 1, { 0 } }, @@ -53,10 +55,12 @@ FORMAT_REC fecommon_irc_dcc_formats[] = { { "dcc_unknown_ctcp", "{dcc DCC unknown ctcp {hilight $0} from {nick $1} [$2]}", 3, { 0, 0, 0 } }, { "dcc_unknown_reply", "{dcc DCC unknown reply {hilight $0} from {nick $1} [$2]}", 3, { 0, 0, 0 } }, { "dcc_unknown_type", "{dcc DCC unknown type {hilight $0}}", 1, { 0 } }, + { "dcc_invalid_ctcp", "{dcc DCC received CTCP {hilight $0} with invalid parameters from {nick $1}}", 4, { 0, 0, 0, 0 } }, { "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_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 }, { "dcc_list_line_chat", "{dcc $0 $1}", 2, { 0, 0 } }, { "dcc_list_line_file", "{dcc $0 $1: $2k of $3k ($4%%) - $5kB/s - $6}", 7, { 0, 0, 2, 2, 1, 3, 0 } }, diff --git a/src/fe-common/irc/dcc/module-formats.h b/src/fe-common/irc/dcc/module-formats.h index f1a89e62..3cbb89da 100644 --- a/src/fe-common/irc/dcc/module-formats.h +++ b/src/fe-common/irc/dcc/module-formats.h @@ -14,10 +14,12 @@ enum { IRCTXT_DCC_MSG_QUERY, IRCTXT_DCC_CTCP, IRCTXT_DCC_CHAT, + IRCTXT_DCC_CHAT_CHANNEL, IRCTXT_DCC_CHAT_NOT_FOUND, IRCTXT_DCC_CHAT_CONNECTED, IRCTXT_DCC_CHAT_DISCONNECTED, IRCTXT_DCC_SEND, + IRCTXT_DCC_SEND_CHANNEL, IRCTXT_DCC_SEND_EXISTS, IRCTXT_DCC_SEND_NOT_FOUND, IRCTXT_DCC_SEND_FILE_NOT_FOUND, @@ -31,10 +33,12 @@ enum { IRCTXT_DCC_UNKNOWN_CTCP, IRCTXT_DCC_UNKNOWN_REPLY, IRCTXT_DCC_UNKNOWN_TYPE, + IRCTXT_DCC_INVALID_CTCP, IRCTXT_DCC_CONNECT_ERROR, IRCTXT_DCC_CANT_CREATE, IRCTXT_DCC_REJECTED, IRCTXT_DCC_CLOSE, + IRCTXT_DCC_LOWPORT, IRCTXT_DCC_LIST_HEADER, IRCTXT_DCC_LIST_LINE_CHAT, IRCTXT_DCC_LIST_LINE_FILE, |