#!/usr/bin/perl package Ldw; # by singin use cybot; register_command("ldw",sub { my ($bot,$chan,$nick,$host, @commands) = @_; $bot->message ($chan, ldw(join(" ",@commands))); },"another filter for sentences"); @prefixes = ("blah", "ugh", "bah", "shit", "yah", "ooh", "dude", "ack", "oi"); @suffixes = ("or sum shit", "wtf?", "u crazy mofos", "nyah!", "mmmm", "n shit", ":]", "8)"); @joiners = (" ", ".. ", " .. "); sub ldw { $_ = shift; y/[A-Z]/[a-z]/; s/\. *$//; replace_nospace("\\. ", "... ", " .. "); replace_nospace(",", " ..", " ", ","); replace("with", "wif", "wiv"); replace("something", "sumtin", "sumfin"); replace("computer", "pootah"); replace("man", "mofo", "dude", "m0f0"); replace("bitch", "bizn0tch", "biatch", "bitch"); replace("rules", "r00lz", "rules"); replace("ass", "azz"); replace("fuck", "fuk", "fuck"); replace("you", "u", "you"); replace("jesus", "geesus"); replace("god", "gawd"); replace("the", "the", "da"); replace("netscape", "nutrape"); replace("another", "anutah", "another"); replace("pizza", "pizzah"); replace("some", "sum"); replace("shit", "sheeit"); replace("big", "m0f0 azz", "big"); replace("warez", "juarez"); replace("enough", "enuff"); replace("yes", "yah"); replace("yeah", "yah"); replace("want to", "wanna"); replace("what the fuck", "wtf"); replace("porn", "pr0n"); replace("don't", "donnut"); replace("dont", "donnut"); replace("except", "xcept"); replace("because", "coz", "cuz"); replace("stupid", "stoopid", "st00pid"); replace("american", "yank"); replace("cause", "coz"); replace("anyone", "any1"); replace("are", "r", "are"); replace("you're", "ur"); replace("your", "ur"); replace("sucks", "sux"); replace("DocWilco", "veeeeelko"); replace("microsoft", "microsloth"); replace("nuts", "nutz"); replace("windows", "winblows"); replace("unbelievable", "unfucking believeable"); replace("that's it", "dassit"); replace("thats it", "dassit"); replace("that's right", "dasright"); replace("thats right", "dasright"); replace("bill gates", "billy da fuckin goat"); if(rand(10) < 3) { $_ = rand_array(@joiners) . $_; $_ = rand_array(@prefixes) . $_; } if(rand(10) < 2) { $_ .= " "; $_ .= rand_array(@suffixes); } return $_; } sub replace { my($term, @alternates) = @_; $newterm = rand_array(@alternates); s/(\b)$term(\b)/$1$newterm$3/g; } sub replace_nospace { my($term, @alternates) = @_; $newterm = rand_array(@alternates); s/$term/$newterm/g; } sub rand_array { my(@alternates) = @_; my($size) = $#alternates; my($index) = int(rand($size + 1)); return($alternates[$index]); } 1;