Tuesday, October 18, 2005

thaana for xchat


was in IRC tonight; and thought i'd have some fun with perl. so here is a little perl script for xchat which you can use to type in thaana. you need to have a thaana unicode font installed. then after you load this perl script. type /thaana swlWmc. might be useful.

---------------------- xcthaana.pl-------------------------------------------------

#!/usr/bin/perl -w

## thaana for x-chat
## v1.0 by darkm00n

IRC::register("thaana", "1.0", "", "");
IRC::print("[thaana Loaded]");
IRC::add_command_handler("thaana", "thaana");


sub thaana
{
$in=shift;
$out="";
for ( $i=0; $i <= length($in); $i++){
$_=substr($in,$i,1);
#convert thaana
if ("A" eq $_ ) { $_ = "\x{07A2}"; };
if ("B" eq $_ ) { $_ = "\x{079E}"; };
if ("C" eq $_ ) { $_ = "\x{0797}"; };
if ("D" eq $_ ) { $_ = "\x{0791}"; };
if ("E" eq $_ ) { $_ = "\x{07AD}"; };
if ("F" eq $_ ) { $_ = "\x{079F}"; };
if ("G" eq $_ ) { $_ = "\x{07A3}"; };
if ("H" eq $_ ) { $_ = "\x{0799}"; };
if ("I" eq $_ ) { $_ = "\x{07A9}"; };
if ("J" eq $_ ) { $_ = "\x{079B}"; };
if ("K" eq $_ ) { $_ = "\x{079A}"; };
if ("L" eq $_ ) { $_ = "\x{0785}"; };
if ("M" eq $_ ) { $_ = "\x{0789}"; };
if ("N" eq $_ ) { $_ = "\x{078F}"; };
if ("O" eq $_ ) { $_ = "\x{07AF}"; };
if ("P" eq $_ ) { $_ = "\x{0795}"; };
if ("Q" eq $_ ) { $_ = "\x{07A4}"; };
if ("R" eq $_ ) { $_ = "\x{079C}"; };
if ("S" eq $_ ) { $_ = "\x{0781}"; };
if ("T" eq $_ ) { $_ = "\x{0793}"; };
if ("U" eq $_ ) { $_ = "\x{07AB}"; };
if ("V" eq $_ ) { $_ = "\x{07A5}"; };
if ("W" eq $_ ) { $_ = "\x{07A7}"; };
if ("X" eq $_ ) { $_ = "\x{0798}"; };
if ("Y" eq $_ ) { $_ = "\x{07A0}"; };
if ("Z" eq $_ ) { $_ = "\x{07A1}"; };
if ("a" eq $_ ) { $_ = "\x{0787}"; };
if ("b" eq $_ ) { $_ = "\x{0784}"; };
if ("c" eq $_ ) { $_ = "\x{07B0}"; };
if ("d" eq $_ ) { $_ = "\x{078B}"; };
if ("e" eq $_ ) { $_ = "\x{07AC}"; };
if ("f" eq $_ ) { $_ = "\x{078A}"; };
if ("g" eq $_ ) { $_ = "\x{078E}"; };
if ("h" eq $_ ) { $_ = "\x{0780}"; };
if ("i" eq $_ ) { $_ = "\x{07A8}"; };
if ("j" eq $_ ) { $_ = "\x{0796}"; };
if ("k" eq $_ ) { $_ = "\x{0786}"; };
if ("l" eq $_ ) { $_ = "\x{078D}"; };
if ("m" eq $_ ) { $_ = "\x{0789}"; };
if ("n" eq $_ ) { $_ = "\x{0782}"; };
if ("o" eq $_ ) { $_ = "\x{07AE}"; };
if ("p" eq $_ ) { $_ = "\x{0795}"; };
if ("q" eq $_ ) { $_ = "\x{07A4}"; };
if ("r" eq $_ ) { $_ = "\x{0783}"; };
if ("s" eq $_ ) { $_ = "\x{0790}"; };
if ("t" eq $_ ) { $_ = "\x{078C}"; };
if ("u" eq $_ ) { $_ = "\x{07AA}"; };
if ("v" eq $_ ) { $_ = "\x{0788}"; };
if ("w" eq $_ ) { $_ = "\x{07A6}"; };
if ("x" eq $_ ) { $_ = "\x{079D}"; };
if ("y" eq $_ ) { $_ = "\x{0794}"; };
if ("z" eq $_ ) { $_ = "\x{0792}"; };
$out=$out.$_;
}
IRC::command($out);
return 1;
}

2 comments:

EyThiMeeThi said...

cool work :D

eXposure said...

Good work indeed keep up yr work pal