sub on_dcc {        my ($self, $event) = @_;        my $type = ($event->args)[0];                          if($type =~ /(SEND)\s(.*)\s(\d+)\s(\d+)\s(\d+)/) {             $kind = $1;             $name = $2;             $size = $5;         }         elsif($type =~ /(CHAT)\schat\s(\d+)\s(\d+)/) {             $kind = $1;         }                 if ($kind eq 'SEND') {             $o_file = ">" . $name;             open(TEST, $o_file)                  or do { warn "[!!] can not create incoming/" . $o_file . "\n";                    next;            };             $self->new_get($event, \*TEST);             print "[OK] saving incoming DCC SEND to incoming/" . $name . "\n";        }         elsif($kind eq 'CHAT') {             $self->new_chat($event);        }         else {             print STDERR ("[!!] unknown DCC type: " . $kind . "\n");        }     }