Apps Home
|
Create an App
Mute2
Author:
spaceball3
Description
Source Code
Launch App
Current Users
Created by:
Spaceball3
var MAX_REASONS = 9; var MAX_CHECKS = 11; var EnterMsg = ''; mutereasons = [ {regexp: /(?=.*\b(f?ck|finger|ass|show|zoom|open|see|touch|spread)\b)(?=.*\b(bobs?|vagina|nipples?|breasts?|asshole|cock|penis|vagina|face)\b)/i, notice: 'demands', index: 0}, {regexp: /:\b/, notice: 'graphics', index: 1}, {regexp: /(.)\1{5}/, notice: 'sticky keys', index: 2}, {regexp: /((?=.*pm)|(?=.*c2c)|(?=.*cam?2?cam)|(?=.*private)|(?=.*pvt)|(?=.*prvt))/i, notice: 'PM requests', index: 3}, {regexp: /((swipegirls)|(freecambook)|(skype)|(freetoken)|(kik)|(mypage)|(leaked)|(mybio)|(mycam)|(myprofile)|(mypr0file)|(myroom)|(tokengenerator)|(streamingnaked)|(erotimo)|(amecam)|(1.?f)|(bestwork)|(premiumcheat)|(ellagocam)|(visitthis)|(fucktubate)|(goodotgl)|(nigger)|(aly.sky)|(ultra bot))/i, notice: 'spam', index: 4}, {regexp: /((?=.*turn off )|(?=.*slut)|(?=.*whore)|(?=.*ugly)|(?=.*fat)|(?=.*pee)|(?=.*poo)|(?=.*peeing)|(?=.*fist)|(?=.*muted))/i, notice: 'rudeness', index: 5}, {regexp: /((?=.*bb)|(?=.*baby)|(?=.*babby)|(?=.*daddy))/i, notice: 'bb or baby', index: 6}, {regexp: /((?=.*f.?e.?e.?t)|(?=.*f33t?)|(?=.*foot)|(?=.*soles?)|(?=.*toes?))/i, notice: 'feet', index: 7}, {regexp: /[^\x00-\x7F]+/, notice: 'non-english', index: 8}, {regexp: /\b[A-Z]{2,}\b/, notice: 'all caps', index: 9}, {regexp: /(please|plz|pls|pleas).?.?$/i, notice: 'demands', index: 0}, {regexp: /((^mast.?rbate.?.?$)|(^squirt.?.?$)|(^gray.?.?$)|(^cum.?.?$)|(^twerk.?.?$)|(^control.?.?$)|(^rudeness?.?.?$)|(^caps.?.?$)|(^anal.?.?$)|(^zoom.?.?$)|(^show.?.?$)|(^grey?.?.?$)|(?=.*stand up.?.?)|(?=.*face.?.?)|(?=.*watch my cam.?.?)|(?=.*watch me.?.?))/i, notice: 'demands', index: 0}, ] cb.settings_choices = [ {name: 'msgonentry', type: 'choice', choice1: 'yes', choice2: 'no', defaultValue: 'yes', label: "Display warning to on entry - set to no for busy rooms"}, {name: 'mutehide', type: 'choice', choice1: 'mute', choice2: 'hide', defaultValue: 'mute', label: "Mute (replaces message) or hide (no notifications)"}, {name: 're0', type: 'choice', choice1: 'yes', choice2: 'no', defaultValue: 'yes', label: "Mute demands ?"}, {name: 're1', type: 'choice', choice1: 'yes', choice2: 'no', defaultValue: 'yes', label: "Mute graphics?"}, {name: 're2', type: 'choice', choice1: 'yes', choice2: 'no', defaultValue: 'yes', label: "Mute sticky keys (3+ repeating characters eg. mmmm)?"}, {name: 're3', type: 'choice', choice1: 'yes', choice2: 'no', defaultValue: 'yes', label: "Mute demand words (pm,c2c,private,pvt,prvt)?"}, {name: 're4', type: 'choice', choice1: 'yes', choice2: 'no', defaultValue: 'yes', label: "Mute spam words (streamingnaked,18f cam,18female,erotimo,amecam,goo)?"}, {name: 're5', type: 'choice', choice1: 'yes', choice2: 'no', defaultValue: 'yes', label: "Mute rude words "}, {name: 're6', type: 'choice', choice1: 'yes', choice2: 'no', defaultValue: 'yes', label: "Mute baby words "}, {name: 're7', type: 'choice', choice1: 'yes', choice2: 'no', defaultValue: 'yes', label: "Mute feet words "}, {name: 're8', type: 'choice', choice1: 'yes', choice2: 'no', defaultValue: 'yes', label: "Mute non-english characters (cyrillic,arabic,chinese,accented)?"}, {name: 're9', type: 'choice', choice1: 'yes', choice2: 'no', defaultValue: 'yes', label: "Mute all caps?"}, ]; cb.onEnter(function(user) { var i; if (cb.settings['msgonentry'] == 'yes') { if ((user['has_tokens']) && (user['is_mod']) && (user['in_fanclub']) && (user['user'] != cb['room_slug'])) { cb.chatNotice('Welcome ' + user['user'] + '! No Demands bot is running',user['user'],'',cb.settings['#0000ff'],'bold'); cb.chatNotice(EnterMsg,user['user'],'',cb.settings['msgcolor'],'bold'); cb.chatNotice(':you will be muted and you risk being silenced for violating these rules',user['user'],'',cb.settings['#ff3200'],'bold'); } } }); function onEnterMsg(){ var EnterMsg=''; for (i=0; i<= MAX_REASONS; i++) { if (cb.settings['re' + i] == 'yes'){ EnterMsg += 'No ' + mutereasons[i].notice + ', '; } } return EnterMsg; } function checkmsg(msg) { var i, tmpmsg, reason, mutemsg; mutemsg = false; if ((!is_broadcaster(msg))) { for (i=0; i<= MAX_CHECKS; i++) { if (i==4) { tmpmsg = tmpmsg.replace(/\s+/g, ''); } else { tmpmsg = msg['m']; } if ((tmpmsg.search(mutereasons[i].regexp) != -1) && (cb.settings['re' + mutereasons[i].index] == 'yes')){ mutemsg = true; reason = mutereasons[i].notice; } } if (mutemsg == true) { msg['m'] = "*** Muted for " + reason + " ***"; if (cb.settings['mutehide'] == 'hide') { msg['X-Spam'] = true; cb.chatNotice(' :you asshole msg was hidden from chat',msg['user'],'font: 32px ','#ff3200','bold'); } } } } function is_broadcaster(msg) { return (msg['user'] == cb.room_slug); } function init() { if (cb.settings['sendrules'] == 'yes') { EnterMsg = onEnterMsg(); } } cb.onMessage(function (msg) { checkmsg(msg); return msg; }); cb.onEnter(function(user) { cb.sendNotice(' :welcome to my room, ' + user['user'] + '. :followclick :thanks2', user['user'],'font:32px','#0000ff','bold'); }); init();
© Copyright Chaturbate 2011- 2025. All Rights Reserved.