diff options
author | Patrick Davison <snapwilliam@gmail.com> | 2013-06-03 17:32:34 -0700 |
---|---|---|
committer | Patrick Davison <snapwilliam@gmail.com> | 2013-06-03 17:32:34 -0700 |
commit | 776a34fc35c7891e4c6961861aadedefd2f656f6 (patch) | |
tree | 091ac907a070b1c0d4ee5f6402d38a6a5eb2a691 /includes | |
parent | 538c6f28e50b92b77ef9ce7a6a49641327eeed1a (diff) | |
parent | 27a2b9c138b67ff585a64f1b1aff1423176b58f8 (diff) | |
download | pathery-776a34fc35c7891e4c6961861aadedefd2f656f6.tar.xz |
Merge branch 'HEAD' of ssh://git@git.raylu.net/pathery
Diffstat (limited to 'includes')
-rw-r--r-- | includes/chats.php | 44 |
1 files changed, 43 insertions, 1 deletions
diff --git a/includes/chats.php b/includes/chats.php index 6991a48..7db4c58 100644 --- a/includes/chats.php +++ b/includes/chats.php @@ -91,5 +91,47 @@ function getChat($startID = 0) { return $array;
}
-
+function filterStringForBadLanguage($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 |