From: dms Date: Fri, 29 Sep 2000 15:03:46 +0000 (+0000) Subject: DCC fixed X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=6d9a05ce28913991d5e1865fca8d01d2759d0f0e;p=infobot.git DCC fixed git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk@144 c11ca15a-4712-0410-83d8-924469b57eb5 --- diff --git a/blootbot/src/IRC/IrcHooks.pl b/blootbot/src/IRC/IrcHooks.pl index 52d2c60..deff4f3 100644 --- a/blootbot/src/IRC/IrcHooks.pl +++ b/blootbot/src/IRC/IrcHooks.pl @@ -150,10 +150,23 @@ sub on_dcc { # pity Net::IRC doesn't store nuh. Here's a hack :) $self->whois($nick); - if ($type eq 'SEND') { + if ($type eq 'SEND') { # GET for us. # incoming DCC SEND. we're receiving a file. - $self->new_get($event, \*FH); + my $get = ($event->args)[2]; + open(DCCGET,">$get"); + + $self->new_get($nick, + ($event->args)[2], + ($event->args)[3], + ($event->args)[4], + ($event->args)[5], + \*DCCGET + ); + } elsif ($type eq 'GET') { # SEND for us? + &DEBUG("starting get."); + $self->new_send($event->args); } elsif ($type eq 'CHAT') { + &DEBUG("starting chat."); $self->new_chat($event); } else { &status("${b_green}DCC $type$ob unknown ..."); @@ -203,6 +216,11 @@ sub on_dcc_open { } else { $self->privmsg($sock,"Welcome to blootbot DCC CHAT interface, $userHandle."); } + } elsif ($type eq 'SEND') { + &DEBUG("Starting DCC receive."); + foreach ($event->args) { + &DEBUG(" => '$_'."); + } } else { &status("${b_green}DCC $type$ob unknown ..."); }