Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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() {
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