 
#!/usr/bin/perl
#use strict;

#To install this script, just copy it to ~/.xchat2
#To load it, type "/load ~/.xchat2/jscream1.pl" (withoud the "")
#but it will be started when you start xchat :-)

#To use it, type /jscream1 <text>
IRC::register ("jscream1 script", "1.0", "", ""); 
IRC::add_command_handler('jscream1', jscream1screamcmd);
sub jscream1screamcmd{
my($pl);
$_[0]=~s/D/d/gi;
$_[0]=~s/E/ê/gi;
$_[0]=~s/A/å/gi;
$_[0]=~s/I/¡/gi;
$_[0]=~s/O/ö/gi;
$_[0]=~s/U/û/gi;
$_[0]=~s/b/b/gi;
$_[0]=~s/c/ç/gi;
$_[0]=~s/f/f/gi;
$_[0]=~s/g/g/gi;
$_[0]=~s/h/h/gi;
$_[0]=~s/j/j/gi;
$_[0]=~s/k/k/gi;
$_[0]=~s/l/l/gi;
$_[0]=~s/m/m/gi;
$_[0]=~s/n/ñ/gi;
$_[0]=~s/p/Þ/gi;
$_[0]=~s/q/q/gi;
$_[0]=~s/r/r/gi;
$_[0]=~s/s/s/gi;
$_[0]=~s/t/t/gi;
$_[0]=~s/v/v/gi;
$_[0]=~s/w/w/gi;
$_[0]=~s/x/x/gi;
$_[0]=~s/y/ý/gi;
$_[0]=~s/z/z/gi;
my($teller)=3;
my($tijd)=chr(2);
my($pl);
$_[0]=~s/\A[ \t]*//;
$_[0]=~s/[ \t]*\Z//;
my(@a)=split('' , $_[0]);
for (@a){
if ($_ eq ' '){
$tijd.=' ';
}else{
$teller+=$pl;
if ($teller > 12){
$teller=11;
$pl=-1;
}
if ($teller < 4){
$teller=5;
$pl=1;
}
$tijd.=chr(3) . $teller . $_;
}
}
IRC::command($tijd);
return 1;
}