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

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

#To use it, type /darkk <text>
IRC::register ("AOLscript", "1.0", "", ""); 
IRC::add_command_handler('aol', aolcmd);
sub aolcmd{
    $_[0]=~s/too/2/gi;
    $_[0]=~s/to/2/gi;
    $_[0]=~s/be/B/gi;
    $_[0]=~s/ie/ei/gi;
    $_[0]=~s/ am/M/gi;
    $_[0]=~s/the /DA /gi;
    $_[0]=~s/they're/their/gi;
    $_[0]=~s/your/YO/gi;
    $_[0]=~s/you/U/gi;
    $_[0]=~s/fore/4/gii;
    $_[0]=~s/ss/\$\$/gii;
    $_[0]=~s/see/C/gii;
    $_[0]=~s/ are / R /gi;
    $_[0]=~s/(\w)is /$1iZ /gi;
    $_[0]=~s/! /!!WTF /g;
    $_[0]=~s/o/0/g;
    $_[0]=~s/[,"']//gi;
    while ($_[0] =~ /e/) {
        $num = int(rand 5);
        if ($num == 0 || $num == 1) {
            $_[0]=~s/e/3/i;
        } elsif ($num == 2) {
            $_[0]=~s/e/A/i;
        } else {
            $_[0]=~s/e/E/i;
        }
    }
    $_[0]=~s/[!\?]/!1!! !/gi;
    $_[0]=~s/\./!!1!/i;
    $num = int(rand 5);
    if ($num == 0 || $num == 1) {
        $_[0]=~s/$/ LOL OMG/i;
    } elsif ($num == 2) {
        $_[0]=~s/$/ ROFLMOA/i;
    } else {
        $_[0]=~s/$/ WTH!? LOL!/i;
    }
    $_[0]=~s/\. /WTF!!!/i;
    $_[0]=~s/([az]){2}/$1/ig;
    $_[0]=~tr/a-z/A-Z/;
    IRC::command($_[0]);

    return 1;
}
