summaryrefslogtreecommitdiff
path: root/src/fe-common/irc/dcc
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2003-10-01 16:02:43 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2003-10-01 16:02:43 +0000
commit65463924d217501bb07c02e1e760669130329af0 (patch)
treeacfa99d520f34068b3cfd41efeb0f3721a7a959c /src/fe-common/irc/dcc
parent579c1c2efd1e95ab510aeae80ff615791bb03053 (diff)
downloadirssi-65463924d217501bb07c02e1e760669130329af0.zip
Added DCC SERVER support by Mark Trumbull
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3127 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common/irc/dcc')
-rw-r--r--src/fe-common/irc/dcc/Makefile.am3
-rw-r--r--src/fe-common/irc/dcc/fe-dcc.c5
-rw-r--r--src/fe-common/irc/dcc/module-formats.c3
-rw-r--r--src/fe-common/irc/dcc/module-formats.h5
4 files changed, 14 insertions, 2 deletions
diff --git a/src/fe-common/irc/dcc/Makefile.am b/src/fe-common/irc/dcc/Makefile.am
index dbe31f30..84813cfb 100644
--- a/src/fe-common/irc/dcc/Makefile.am
+++ b/src/fe-common/irc/dcc/Makefile.am
@@ -16,7 +16,8 @@ libfe_irc_dcc_a_SOURCES = \
fe-dcc-chat-messages.c \
fe-dcc-get.c \
fe-dcc-send.c \
- module-formats.c
+ module-formats.c \
+ fe-dcc-server.c
noinst_HEADERS = \
module.h \
diff --git a/src/fe-common/irc/dcc/fe-dcc.c b/src/fe-common/irc/dcc/fe-dcc.c
index 8d82c3ba..38ac07a4 100644
--- a/src/fe-common/irc/dcc/fe-dcc.c
+++ b/src/fe-common/irc/dcc/fe-dcc.c
@@ -42,6 +42,9 @@ void fe_dcc_get_deinit(void);
void fe_dcc_send_init(void);
void fe_dcc_send_deinit(void);
+void fe_dcc_server_init(void);
+void fe_dcc_server_deinit(void);
+
char *dcc_get_size_str(uoff_t size)
{
if (size < 1024)
@@ -155,6 +158,7 @@ void fe_irc_dcc_init(void)
fe_dcc_chat_init();
fe_dcc_get_init();
fe_dcc_send_init();
+ fe_dcc_server_init();
signal_add("dcc request", (SIGNAL_FUNC) dcc_request);
signal_add("dcc rejected", (SIGNAL_FUNC) dcc_rejected);
@@ -173,6 +177,7 @@ void fe_irc_dcc_deinit(void)
fe_dcc_chat_deinit();
fe_dcc_get_deinit();
fe_dcc_send_deinit();
+ fe_dcc_server_deinit();
theme_unregister();
diff --git a/src/fe-common/irc/dcc/module-formats.c b/src/fe-common/irc/dcc/module-formats.c
index 13258819..b8eb4a0a 100644
--- a/src/fe-common/irc/dcc/module-formats.c
+++ b/src/fe-common/irc/dcc/module-formats.c
@@ -71,6 +71,9 @@ FORMAT_REC fecommon_irc_dcc_formats[] = {
{ "dcc_list_line_file", "{dcc $0 $1: %|$2 of $3 ($4%%) - $5kB/s - ETA $7 - $6}", 8, { 0, 0, 0, 0, 1, 3, 0, 0 } },
{ "dcc_list_line_queued_send", "{dcc - $0 $2 (queued)}", 3, { 0, 0, 0 } },
{ "dcc_list_footer", "", 0 },
+ { "dcc_list_line_server", "{dcc $0: Port($1) - Send($2) - Chat($3) - Fserve($4)}", 5, { 0, 1, 0, 0, 0 } },
+ { "dcc_server_started", "{dcc DCC SERVER started on port {hilight $0}}", 1, { 1 } },
+ { "dcc_server_closed", "{dcc DCC SERVER on port {hilight $0} closed}", 1, { 1 } },
{ NULL, NULL, 0 }
};
diff --git a/src/fe-common/irc/dcc/module-formats.h b/src/fe-common/irc/dcc/module-formats.h
index b2266816..d1bcc3ba 100644
--- a/src/fe-common/irc/dcc/module-formats.h
+++ b/src/fe-common/irc/dcc/module-formats.h
@@ -48,7 +48,10 @@ enum {
IRCTXT_DCC_LIST_LINE_CHAT,
IRCTXT_DCC_LIST_LINE_FILE,
IRCTXT_DCC_LIST_LINE_QUEUED_SEND,
- IRCTXT_DCC_LIST_FOOTER
+ IRCTXT_DCC_LIST_FOOTER,
+ IRCTXT_DCC_LIST_LINE_SERVER,
+ IRCTXT_DCC_SERVER_STARTED,
+ IRCTXT_DCC_SERVER_CLOSED
};
extern FORMAT_REC fecommon_irc_dcc_formats[];