irssi dcc stats on channel
<p>I made my first irssi perl script, but it doesn't work.  I don't understand why not.</p>

<p>When I type <code>!dccstat</code> on the channel, my home PC just responds with all DCC connections, like when I type <code>/dcc stat</code> on irssi.</p>

<pre><code>use Irssi;

use vars qw($VERSION %IRSSI);

$VERSION = "1.0";
%IRSSI = (
Test
);

sub event_privmsg {
my ($server, $data, $nick, $mask) =@_;
my ($target, $text) = $data =~ /^(\S*)\s:(.*)/;
        return if ( $text !~ /^!dccstat$/i );
if ($text =~ /^!dccstat$/ ) {
        my $dcc = dccs();
        $server-&gt;command ( "msg $target $dcc" )
    }
}

Irssi::signal_add('event privmsg', 'event_privmsg');
</code></pre>