diff options
Diffstat (limited to 'ajax')
-rw-r--r-- | ajax/chat.ajax.php | 46 |
1 files changed, 1 insertions, 45 deletions
diff --git a/ajax/chat.ajax.php b/ajax/chat.ajax.php index 2561619..02a11c6 100644 --- a/ajax/chat.ajax.php +++ b/ajax/chat.ajax.php @@ -70,7 +70,7 @@ if (isset($_REQUEST['messages'])) { $messages = $_REQUEST['messages'];
$messages = explode("|:|", $messages);
foreach ($messages as $message) {
- $message = chatFilter($message);
+ $message = filterStringForBadLanguage($message);
if ($message[0] == "/") {
$arguements = explode(" ", substr($message, 1));
$command = $arguements[0];
@@ -142,48 +142,4 @@ function prepareChatData($data) { }
return $data;
}
-
-function chatFilter($chat) {
- //cuss words
- $chat = str_ireplace("fuck you", "i am moron", $chat);
- $chat = preg_replace("/[f]+\s*[uv]+\s*[h]*\s*[c\(k]+\s*(([i]*\s*[n]*\s*[g])|([e]*\s*[r]*))*/i", "dumb ", $chat); //fucker / fucking
- $chat = preg_replace("/[^a-z]fag(g?[oi]t)?/i", " prince", $chat); //faggot
- $chat = preg_replace("/^fag(g?[oi]t)?/i", "prince", $chat); //faggot (beginning of line)
- $chat = preg_replace("/^suck\s*my.*(cock|dick|penis)/i", "join me in a riveting game of checkers", $chat); //suck my dick
-
- $chat = str_ireplace("damn", "dumb", $chat);
- $chat = str_ireplace("bull shit", "cow doodoo of the male variety", $chat);
- $chat = str_ireplace("shit", "poo", $chat);
- $chat = str_ireplace("sucks ass", "is dumb", $chat);
- $chat = str_ireplace("suck ass", "are dumb", $chat);
- $chat = str_ireplace("damnit", "do'h", $chat);
- $chat = str_ireplace("sonuvabitch", "fiddlesticks", $chat);
-
- $chat = str_ireplace("a bitch", "an engaging conversationalist", $chat);
- $chat = str_ireplace("bitch", "engaging conversationalist", $chat);
- $chat = str_ireplace("an asshole", "a pleasant person to be around", $chat);
- $chat = str_ireplace("asshole", "pleasant person to be around", $chat);
-
- $chat = str_ireplace("cock", "elbow", $chat);
- $chat = str_ireplace("dick", "elbow", $chat);
- $chat = str_ireplace("penis", "elbow", $chat);
- $chat = str_ireplace("vagina", "femur bone", $chat);
- $chat = str_ireplace("cunt", "femur bone", $chat);
-
- //$chat = str_ireplace("hell", "the supermarket", $chat);
- $chat = str_ireplace("whore", "entrepreneur", $chat);
- $chat = str_ireplace("stfu", "be still my beating heart", $chat);
- $chat = str_ireplace("omfg", "omg", $chat);
- $chat = str_ireplace("4chan", "NEWT GINGRICH", $chat);
- $chat = str_ireplace("nigger", "classy gentleman", $chat);
- $chat = str_ireplace("pedophile", "Optimus Prime", $chat);
- $chat = str_ireplace(" rape", " shake hands with", $chat);
-
- //Easter Eggs
- $chat = str_ireplace("i just pwned Snap", "Snap just totally pwned me ^^", $chat);
- $chat = str_ireplace("i just pwned Blue", "Blue just epicly pwned me the with chat filter", $chat);
- $chat = str_ireplace("language filter", "highly educated team of monkeys employed to filter bad language", $chat);
- $chat = str_ireplace("chat filter", "highly educated team of monkeys employed to filter bad language", $chat);
- return $chat;
-}
?>
\ No newline at end of file |