diff options
| author | Wilmer van der Gaast <wilmer@gaast.net> | 2010-03-21 16:06:31 +0000 | 
|---|---|---|
| committer | Wilmer van der Gaast <wilmer@gaast.net> | 2010-03-21 16:06:31 +0000 | 
| commit | 767a148faa35c18cdf4da77b5919a2f6e2df868a (patch) | |
| tree | 43f981453468759d31d7b215d84d750dbe4876ac /irc.c | |
| parent | 545d7c058d0604dd6acfa37c68e9867e72f25c2e (diff) | |
| parent | a81d679654e36055ce9913cd7541885b41380947 (diff) | |
Merging in file transfer support. Most important points from my review
are fixed now, time to let it settle in and get people to try it.
Diffstat (limited to 'irc.c')
| -rw-r--r-- | irc.c | 13 | 
1 files changed, 12 insertions, 1 deletions
| @@ -28,6 +28,7 @@  #include "sock.h"  #include "crypting.h"  #include "ipc.h" +#include "dcc.h"  static gboolean irc_userping( gpointer _irc, int fd, b_input_condition cond ); @@ -1106,9 +1107,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 );  		}  	} | 
