diff options
| author | ulim <a.sporto+bee@gmail.com> | 2007-12-03 15:28:45 +0100 | 
|---|---|---|
| committer | ulim <a.sporto+bee@gmail.com> | 2007-12-03 15:28:45 +0100 | 
| commit | 2ff20765990c756533957e8da9c7c29dd3102e79 (patch) | |
| tree | 8d19ceb1490866feee355ba9a098d7e4be6eea53 /irc.c | |
| parent | 2c2df7dd91930345a9b22a8bb61327d1dcc7e3d5 (diff) | |
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
Diffstat (limited to 'irc.c')
| -rw-r--r-- | irc.c | 16 | 
1 files changed, 15 insertions, 1 deletions
| @@ -27,6 +27,10 @@  #include "bitlbee.h"  #include "crypting.h"  #include "ipc.h" +#include "dcc.h" + +#include <regex.h> +#include <netinet/in.h>  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 );  		}  	} | 
