I've got a small script written in Perl that I'm trying to convert into a mIRC script. I'm having a bit of a hard time and I'm wondering if anyone out there who can script in both Perl and mIRC can help me out. The code is:

sub decode {
my $text = $_[0];
my $key = 'secretkey';
my $response = '';
my($i, $j, $num, $result);
my($text_len) = length($text);
my($key_len) = length($key);
for ($i = $text_len - 1; $i >= 0; --$i) {
$num = ord(chop($text));
if ($num == 127) { $num = 58 }
$num -= 33;
for ($j = $i; $j < $key_len; $j += $text_len) {
$num -= ord(substr($key, $j, 1)) + $key_len;
}
$num = $num % 95 + 33;
$result .= pack("c", $num);
}
return($result);
}

Is it possible to rewrite this in the mIRC scripting language? Or even make a DLL from it? If not, thanks for your time.

Last edited by dylan; 13/06/03 10:39 PM.

-- dylan