Created
March 3, 2012 00:05
-
-
Save theturtle32/1962680 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package | |
{ | |
import com.worlize.api.WorlizeAPI; | |
import com.worlize.api.event.ChatEvent; | |
import flash.display.Sprite; | |
public class EmbedClientTest extends Sprite | |
{ | |
private var api:WorlizeAPI; | |
public function EmbedClientTest() { | |
WorlizeAPI.init(loaderInfo); | |
api = WorlizeAPI.getInstance(); | |
api.thisRoom.addEventListener(ChatEvent.OUTGOING_CHAT, filterLanguage); | |
} | |
private function filterLanguage(event:ChatEvent):void { | |
event.text = event.text.replace(/(fuck|shit|cunt|damn)/gi, '****'); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment