From 2ff20765990c756533957e8da9c7c29dd3102e79 Mon Sep 17 00:00:00 2001 From: ulim Date: Mon, 3 Dec 2007 15:28:45 +0100 Subject: Intermediate commit. Sending seems to work. TODOs: * move from out_of_data to is_writable, eliminate buffers * implement "transfers reject [id]" * documentation in commands.xml * implement throughput and cummulative throughput boundaries * feature discovery before sending * implement sending over a proxy (proxy discovery, socks5 client handshake for sending, activate message) * integrate toxik-mek-ft --- irc.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'irc.c') diff --git a/irc.c b/irc.c index 5531addb..96f75073 100644 --- a/irc.c +++ b/irc.c @@ -27,6 +27,10 @@ #include "bitlbee.h" #include "crypting.h" #include "ipc.h" +#include "dcc.h" + +#include +#include static gboolean irc_userping( gpointer _irc, int fd, b_input_condition cond ); @@ -980,9 +984,19 @@ int irc_send( irc_t *irc, char *nick, char *s, int flags ) } return( 1 ); } + else if( g_strncasecmp( s + 1, "DCC", 3 ) == 0 ) + { + if( u && u->ic && u->ic->acc->prpl->transfer_request ) + { + file_transfer_t *ft = dcc_request( u->ic, s + 5 ); + if ( ft ) + u->ic->acc->prpl->transfer_request( u->ic, ft, u->handle ); + } + return( 1 ); + } else { - irc_usermsg( irc, "Non-ACTION CTCP's aren't supported" ); + irc_usermsg( irc, "Supported CTCPs are ACTION, VERSION, PING, TYPING, DCC" ); return( 0 ); } } -- cgit v1.2.3 From 4358b10c11410a27af9458c92067549cafbc4c0b Mon Sep 17 00:00:00 2001 From: ulim Date: Sun, 4 May 2008 15:32:15 +0200 Subject: ulibc support, fixes "Invalid SOCKS5 Connect message" problem --- irc.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'irc.c') diff --git a/irc.c b/irc.c index e8b08e71..c61e289b 100644 --- a/irc.c +++ b/irc.c @@ -29,9 +29,6 @@ #include "ipc.h" #include "dcc.h" -#include -#include - static gboolean irc_userping( gpointer _irc, int fd, b_input_condition cond ); GSList *irc_connection_list = NULL; -- cgit v1.2.3