Bots Home
|
Create an App
RoomControlBot
Author:
lotanus
Description
Source Code
Launch Bot
Current Users
Created by:
Lotanus
/* Title: RoomControlBot Author: papatong/lotanus Version: 0.1 (11/04/2016) This will be getting built upon, but for now should block all messages that start with "[LEAK" or "[ LEAK". */ var BannedWordsArray = new Array; var BannedPartNameArray = new Array; var BannedNameArray = new Array; { BannedWordsArray.push("[LEA"); BannedWordsArray.push("[ LEA"); } cb.onMessage(function(msg) { var modBool = msg['is_mod']; var fanBool = msg['in_fanclub']; var modelBool = msg['user'] == cb.room_slug; var tokensBool = msg['has_tokens']; var tippedBool = msg['tipped_recently']; var messageText = msg['m']; var userName = msg['user']; var countWords = BannedWordsArray.length; var countPartName = BannedPartNameArray.length; var countName = BannedNameArray.length; if( modelBool ) { return msg; } else if( modBool ) { return msg; } else if( fanBool ) { return msg; } else { var MuteBool = false; var tempInteger = 0; for( tempInteger = 0; tempInteger < countWords; tempInteger++ ) { if( messageText.search(BannedWordsArray[tempInteger]) != -1 ) { MuteBool = true; } } for( tempInteger = 0; tempInteger < countPartName; tempInteger++ ) { if( userName.search(BannedPartNameArray[tempInteger]) != -1 ) { MuteBool = true; } } for( tempInteger = 0; tempInteger < countName; tempInteger++ ) { if( userName == BannedNameArray[tempInteger] ) { MuteBool = true; } } if( MuteBool ) { msg['X-Spam'] = true; } } return msg; });
© Copyright Chaturbate 2011- 2026. All Rights Reserved.