aboutsummaryrefslogtreecommitdiffstats
path: root/irc.c
diff options
context:
space:
mode:
authorulim <a.sporto+bee@gmail.com>2007-12-04 01:53:04 +0100
committerulim <a.sporto+bee@gmail.com>2007-12-04 01:53:04 +0100
commitfa30fa598d2e77c998f9156d0f31ccf99b0c781f (patch)
treef238de491573827510c55e29cf80e2fda7ccc793 /irc.c
parent2c2df7dd91930345a9b22a8bb61327d1dcc7e3d5 (diff)
parentdce390357114e30a424106c99e49cef1e682e1af (diff)
Jabber file transfer now also with sending! You can't use a proxy yet when
sending, that's my next task. You can use proxies when receiving though! I also changed the buffering strategy. Previously receiving continued till some buffer limit was reached, now only one message is received and receiving stops till it is delivered. This keeps the buffering space per file transfer to a minimum(currently 4k). Makes sense when used on a public server. For public servers a throughput maximum would also be interesting...
Diffstat (limited to 'irc.c')
-rw-r--r--irc.c16
1 files changed, 15 insertions, 1 deletions
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 <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 );
}
}