Bots Home
|
Create an App
sdg
Author:
ho_222
Description
Source Code
Launch Bot
Current Users
Created by:
Ho_222
var phas = "keystring=17h7h4nsnkfjng743"; /*/////////////////////////////////// -------Big Brother Bot----- Designed by PhasmaEx Contact at paperclipmonkey@gmail.com, or on twitter @phasmaex ****************DO NOT COPY OR REDISTRIBUTE WITHOUT PRIOR PERMISSION********************** ****************/var ver = "1.0.6"/*********************** Any questions comments concerns, please send me a message and I will address them as soon as I can! Thanks again for using my Apps & Bots! ~Phas *//////////////////////////////////// // Define globals object, which holds most all the information in the app. var globals = new Object(); globals.muted = new Array(); globals.whitelist = new Array(); globals.warnings = new Object(); globals.filters = new Array(); globals.notifications = new Array(); globals.notificationIndex = 0; globals.gid1 = ""; globals.gid2 = ""; globals.usegid = true; globals.tipemotes = new Array(); //globals.gentip_timeout; globals.gentips_stack = new Array(); globals.tipleaderboard = new Object(); globals.kingtipper = null; globals.allowgraphics = new Array(); globals.mutegraphics = new Array(); globals.timer = new Object(); globals.timer.obj = null; globals.timer.tleft = 0; //define CB settings cb.settings_choices = [ {name: 'gender', type:'choice', choice1:'Female',choice2:'Male',choice3:'Couple/Group',choice4:'Don\'t Use',label:'Gender/Identifier (Choose your gender or which you identify as. This will be used for gender specific messages, or wording like \'him\', \'her\', \'them\', etc. throughout the messages sent by Big Brother. Choose "Don\'t Use" to not have gender specific wording and emotes.',defaultValue:'Don\'t Use'}, {name: 'sensitivity', type:'choice', choice1:'No Filter',choice2:'Greys',choice3:'Light Blue',choice4:'Dark Blue',choice5:'Light Purple',choice6:'Dark Purple',label:'Sensitivity (will filter that color and under, \'No Filter\' turns filters off)',defaultValue:'Greys'}, {name: 'strikes', type:'choice', choice1:'1',choice2:'2',choice3:'3',choice4:'4',choice5:'5',label:'Number Of Offenses Before Silenced',defaultValue:'3'}, {name: 'filter_spam', type:'choice', choice1:'Yes',choice2:'No',label:'Filter Spam? (if filters are on, will filter spam messages like \'Leaked Token Generator\')',defaultValue:'Yes'}, {name: 'filter_demands', type:'choice', choice1:'Yes',choice2:'No',label:'Filter Demands? (if filters are on, will filter demands like \'show boobs\', \'zoom pussy\', or pleads like \'pls use dildo\', etc.)',defaultValue:'Yes'}, {name: 'filter_rudeness', type:'choice', choice1:'Yes',choice2:'No',label:'Filter Rudeness? (if filters are on, will filter rudeness like \'you fat ugly whore\', \'you bitch\', \'pee on cam?\', etc.)',defaultValue:'Yes'}, {name: 'filter_camrequests', type:'choice', choice1:'Yes',choice2:'No',label:'Filter Cam Requests? (if filters are on, will filter \'c2c\', \'i\'m on cam\', \'check out my cam\')',defaultValue:'Yes'}, {name: 'filter_nonenglish', type:'choice', choice1:'Yes',choice2:'No',label:'Filter Non-English? (if filters are on, will filter non-english lettering)',defaultValue:'Yes'}, {name: 'filter_stickykeys', type:'choice', choice1:'Yes',choice2:'No',label:'Filter Sticky Keys? (a string of more than 4 of the same letter in a row)',defaultValue:'Yes'}, {name: 'filter_graphics', type:'choice', choice1:'Yes - By Sensitivity',choice2:'Yes - Only Tippers',choice3:'No',label:'Filter Graphics? (By Sensitivity will not allow graphics from the set sensitivity level and below, Only Tippers will allow graphics only from users who have tipped, fan club members, and mods)',defaultValue:'Yes'}, {name: 'use_WelcomeMessage', type:'choice', choice1:'Yes',choice2:'No',label:'Use Welcome Message?',defaultValue:'Yes'}, {name: 'str_WelcomeMessage', type:'str', minLength:1,maxLength:800,label:"Welcome Message (will start with \'Welcome <user> to <broadcaster>\'s room!\', leave blank to use just that)",defaultValue:'Thanks for stopping by today to check out my room! Please make sure to follow my room rules, as Big Brother is watching!',required: false}, {name: 'use_RoomRules', type:'choice', choice1:'Yes',choice2:'No',label:'Use Room Rules Message?',defaultValue:'Yes'}, {name: 'str_RoomRules', type:'str', minLength:1,maxLength:800,label:"Room Rules Message (List any rules, emotes are allowed, if enabled will show on entry, and when broadcaster or mod runs /roomrules command))",defaultValue:'No demands or directing, no c2c, English only please! Requests should be made in a tip note, and be respectful to me and other members in my room. Big brother is watching and will silence you if you break my rules!',required: false}, {name: 'use_Message1', type:'choice', choice1:'Yes',choice2:'No',label:'Use Notification Message 1?',defaultValue:'No'}, {name: 'str_Message1', type:'str', minLength:1,maxLength:800,label:"Message 1 Text (emotes are allowed)",defaultValue:'',required: false}, {name: 'use_Message2', type:'choice', choice1:'Yes',choice2:'No',label:'Use Notification Message 2?',defaultValue:'No'}, {name: 'str_Message2', type:'str', minLength:1,maxLength:800,label:"Message 2 Text (emotes are allowed)",defaultValue:'',required: false}, {name: 'use_Message3', type:'choice', choice1:'Yes',choice2:'No',label:'Use Notification Message 3?',defaultValue:'No'}, {name: 'str_Message3', type:'str', minLength:1,maxLength:800,label:"Message 3 Text (emotes are allowed)",defaultValue:'',required: false}, {name: 'use_Message4', type:'choice', choice1:'Yes',choice2:'No',label:'Use Notification Message 4?',defaultValue:'No'}, {name: 'str_Message4', type:'str', minLength:1,maxLength:800,label:"Message 4 Text (emotes are allowed)",defaultValue:'',required: false}, {name: 'use_Message5', type:'choice', choice1:'Yes',choice2:'No',label:'Use Notification Message 5?',defaultValue:'No'}, {name: 'str_Message5', type:'str', minLength:1,maxLength:800,label:"Message 5 Text (emotes are allowed)",defaultValue:'',required: false}, {name: 'delay_messages', type:'int',minValue:2,maxValue:10,defaultValue:4,label:"Notification Delay In Minutes (range 2-10, recommend 3-4. This is the time between notifications, will cylce through enabled messages 1-4 above one at a time with this delay between messages)"}, {name: 'use_TipMenu', type:'choice', choice1:'Yes',choice2:'No',label:'Use Tip Menu?',defaultValue:'No'}, {name: 'str_TipMenu', type:'str', minLength:1,maxLength:800,label:"Tip Menu (emotes are allowed, use\'\\n\' for a line break. If enabled, will display periodically using the delay specified below, or when a user runs the /tipmenu command)",defaultValue:'',required: false}, {name: 'delay_TipMenu', type:'int',minValue:2,maxValue:15,defaultValue:4,label:"Tip Menu Delay In Minutes (range 2-15, recommend 3-4. This is the time between notifications)"}, {name: 'use_Leaderboard', type:'choice', choice1:'Yes',choice2:'No',label:'Use Tip Leaderboard with King Tipper?',defaultValue:'No'}, {name: 'use_genTips', type:'choice', choice1:'Yes',choice2:'No',label:'Use Tip Generation Messages? (if enabled, Big Brother will periodically send messages to try and drive users to tip or participate in the game/app that is running.)',defaultValue:'Yes'}, {name: 'use_thankTips', type:'choice', choice1:'Yes',choice2:'No',label:'Thank Users That Tip? (if enabled, Big Brother thank users that tip as least the threshold below, and if Tip Generation above is also enabled, will word messages to try and keep users tipping.)',defaultValue:'Yes'}, {name: 'thresh_thankTips', type:'int',minValue:1,maxValue:50,defaultValue:10,label:"Tip Threshold For Thanking Users (range 1-50, recommend 10. If thank tips is enabled above, will thank any user that tips more than this amount.)"}, {name: 'use_followVote', type:'choice', choice1:'Yes',choice2:'No',label:'Follow/Vote messages? (if enabled, Big Brother will periodically send \'Don\'t for get to follow\' and \'Don\'t forget to thumbs up\' messages.)',defaultValue:'Yes'}, {name: 'str_followTwitter', type:'str', minLength:1,maxLength:250,label:"Twitter Handle (if Follow/Vote is enabled above, will also include \'follow on twitter\' message. Only type your twitter handle, without the @. Leave blank to not use.",defaultValue:'',required: false} ]; // Define Exteral Functions function appTimeout(func, msec){cb['setTimeout'](func, msec < 1000 ? 1000 : msec);}var setTimeout=function setTimeout(func, delay){if (!(this instanceof setTimeout)){return new setTimeout(func, delay);}var that=this; function timeout(){if (that.cancelled){return;}func();}appTimeout(timeout, delay);}; var clearTimeout=function clearTimeout(timeout){timeout.cancelled=true;};var setInterval=function setInterval(func, delay){if (!(this instanceof setInterval)){return new setInterval(func, delay);}var target=(new Date().valueOf()) + delay; var that=this; function tick(){if (that.stopped){return;}target +=delay; func(); appTimeout(tick, target - (new Date().valueOf()));}appTimeout(tick, delay);};var clearInterval=function clearInterval(interval){interval.stopped=true;}; // define Timeout usage function encodeStr(e){e=e.toUpperCase().replace(/^\s+|\s+$/g,"");for(var r,o="",n=e.length-1;n>=0;n--)r=e.charCodeAt(n),o+=r>=65&&90>=r?key.charAt(r-65+26*Math.floor(2*Math.random())):String.fromCharCode(r);return encodeURIComponent(o)}function decodeStr(e){e=decodeURIComponent(e);for(var r,o="",n=e.length-1;n>=0;n--)r=e.charAt(n),o+=r>="a"&&"z">=r||r>="A"&&"Z">=r?String.fromCharCode(65+key.indexOf(r)%26):r;return o}var key="SXGWLZPDOKFIVUHJYTQBNMACERxswgzldpkoifuvjhtybqmncare"; function initApp() { try { switch (cb.settings.gender) { case "Female": globals.gid1='her';globals.gid2='her';break; case "Male": globals.gid1='him';globals.gid2='his';break; case "Couple/Group": globals.gid1='them';globals.gid2='their';break; case "Don\'t Use": globals.usegid=false;break; } //set notification list if (cb.settings.use_Message1=="Yes") { globals.notifications[globals.notifications.length] = cb.settings.str_Message1; }; if (cb.settings.use_Message2=="Yes") { globals.notifications[globals.notifications.length] = cb.settings.str_Message2; }; if (cb.settings.use_Message3=="Yes") { globals.notifications[globals.notifications.length] = cb.settings.str_Message3; }; if (cb.settings.use_Message4=="Yes") { globals.notifications[globals.notifications.length] = cb.settings.str_Message4; }; if (cb.settings.use_Message5=="Yes") { globals.notifications[globals.notifications.length] = cb.settings.str_Message5; }; //if there are enabled notifications, start the notifier if (globals.notifications.length>0) { setTimeout(runNotices, cb.settings.delay_messages*60000); } //if tip menu is enabled, start it if (cb.settings.use_TipMenu=="Yes") { setTimeout(runTipMenu, cb.settings.delay_TipMenu*60000); } if (cb.settings.use_followVote=="Yes") { setTimeout(runFollow, 15*60000); } if (cb.settings.use_Leaderboard=="Yes") { setTimeout(runLeader, 5*60000); } //create filters based on what's enabled if (cb.settings.filter_spam=="Yes") { globals.filters[globals.filters.length] = ["Spam",/((swipegirls)|(freecambook)|(leake?d?)|(mybio)|(myprofile)|(kikcams)|(webcam23)|(alva\.lanus)|(Aly\.Sky)|(token ?generator)|(streamingnaked)|(erotimo)|(amecam)|(1.?f)|(bestwork)|(premiumcheat)|(ellagocam)|(EllaGo)|(snapmilfs)|(kikmilfs)|(skypemilfs)|(sex\-chats)|(visitthis)|(fucktubate)|(goo\.gl)|(goodotgl)|(\.com)|(c0m)|(dotcom)|(p\.r\.e\.m\.i\.u\.m\.c\.h\.e\.a\.t)|(\[free\])|(\[get\])|(\(dot\) ?com)|(unlimited tokens)|(free tokens)|(500k free)|(500k tokens)|(tokens ?4 ?free)|(token ?giveaway)|((see|check|in) my bio))/i]; }; if (cb.settings.filter_demands=="Yes") { globals.filters[globals.filters.length] = ["Demands",/(?=.*\b(fu?ck|fi?nge?r|su?ck|fla?sh|sho?w|zoom|ope?n|see|touch|spre?a?d|li?ck)\b)(?=.*\b(bo?dy|ass|a\$\$|pu?y?ssy?|boo?bs?|boobies?|tits?|vaginal?s?|vag|nipples?|breasts?|asshole|co?ck|penis|fa?ce|juices?)\b)/i]; globals.filters[globals.filters.length] = ["Demands",/((^mast.?rbate.?.?$)|(^squirt.?.?$)|(^kiss.?.?$)|(^cum.?.?$)|(^twerk.?.?$)|(^ass.?.?$)|(^bo?obs?.?.?$)|(^pu?y?ssy.?.?$)|(^dogg?y.?.?$)|(^anal.?.?$)|(^zoom.?.?$)|(^show.?.?$)|(^tits?.?.?$)|(?=.*stand up.?.?)|(?=.*face.?.?)|(?=.*watch my cam.?.?)|(?=.*watch me.?.?))/i]; globals.filters[globals.filters.length] = ["Demands",/(please|plese|plz|pls|pleas).?.?$/i]; }; if (cb.settings.filter_rudeness=="Yes") { globals.filters[globals.filters.length] = ["Rudeness",/((?=.*bitch)|(?=.*slut)|(?=.*cunt)|(?=.*whore?)|(?=.*ugly)|(?=.*fat)|(?=.*pee)|(?=.*poop?)|(?=.*peeing)|(?=.*fist)|(?=.*fart)|(?=.*shat)|(?=.*scat)|(?=.*skat))/i]; }; if (cb.settings.filter_camrequests=="Yes") { globals.filters[globals.filters.length] = ["C2C Requests",/((?=.*c2c)|(?=.*cam to cam)|(?=.*cam 2 cam)|(?=.*cam2cam)|(?=.*c to c)|(?=.*c 2 c)|(?=.*on cam)|(?=.*my cam)|(?=.*ska?ype))/i]; } if (cb.settings.filter_nonenglish=="Yes") { globals.filters[globals.filters.length] = ["Non-English",/[^\x00-\x7F]+/i]; } if (cb.settings.filter_stickykeys=="Yes") { globals.filters[globals.filters.length] = ["Sticky Keys",/(.)\1{4}/]; } if ((ver==undefined)|(ver==null)) {throw decodeStr("yLpBjyX%20dOs%20b'xuQSDJ%20TjZ%20dUkDwTSLQ%20rX%20qHX%20fSUkdkyH%20LpB%20gUOZ%20J%3A%20!THdOn%20pBkc%20qO%20QqGzBHyJ%20gUS%20%2CLgjw%20QkDB%20lj%20yzvPObLg%20LpB%20QO%20aLSuQSpJ%20!UHkbyzM%20fSUkPOTH%20qHU"); } //populate emote array if (globals.usegid) { //add gender specific switch (cb.settings.gender) { case "Female": globals.tipemotes.push(":domagic",":tipifyoulike",":tipher","Keep the tips going! If you like what you see, make sure to let her know with your tip!",":cat-roll-her",":sendlove"); break; case "Male": globals.tipemotes.push(":domagic2",":tiphim","Keep the tips going! If you like what you see, make sure to let him know with your tip!",":cat-roll-him"); break; case "Couple/Group": globals.tipemotes.push("Keep the tips going! If you like what you see, make sure to let them know with your tip!",":cat-roll-then"); break; } } //add non-gender specific globals.tipemotes.push(":notips23",":modellove",":tipguyz",":tipguys",":tipsshow001",":newtippers"); if ((phas==undefined)|(phas==null)) {throw decodeStr("yLpBjyX%20dOs%20b'xuQSDJ%20TjZ%20dUkDwTSLQ%20rX%20qHX%20fSUkdkyH%20LpB%20gUOZ%20J%3A%20!THdOn%20pBkc%20qO%20QqGzBHyJ%20gUS%20%2CLgjw%20QkDB%20lj%20yzvPObLg%20LpB%20QO%20aLSuQSpJ%20!UHkbyzM%20fSUkPOTH%20qHU"); } if (cb.settings.use_genTips=="Yes") { //set initial timeout to 15min var i = globals.gentips_stack.length; globals.gentips_stack[i] = "active"; setTimeout(function(){gentipsmessage(i)}, 15*60000); } cb.sendNotice("Big Brother Says: I am now running! Big Brother is watching out for you! ;)\nQuick note to those using this bot: I\'m always looking for feedback/suggestions! I want to make this better for you guys who run it! Leave a comment on the bot page, or send me a message on twitter or snapchat @phasmaex, or email at paperclipmonkey@gmail.com. You can also use the tag #bigbrother and I will try to stop in while you\'re online! Thanks again for using my apps and bots! You guys rock!", cb.room_slug, "#FFFFFF", "#FF0505", "bold"); } catch (err) { cb.sendNotice("Sorry I\'ve Encountered An Error! "+decodeStr("yLpBjyX%20dOs%20b'xuQSDJ%20TjZ%20dUkDwTSLQ%20rX%20qHX%20fSUkdkyH%20LpB%20gUOZ%20J%3A%20!THdOn%20pBkc%20qO%20QqGzBHyJ%20gUS%20%2CLgjw%20QkDB%20lj%20yzvPObLg%20LpB%20QO%20aLSuQSpJ%20!UHkbyzM%20fSUkPOTH%20qHU"), cb.room_slug, "#FFFFFF", "#FF0505", "bold"); } } function sendNotification(type,user,arg1) { var msg = ""; var msgcol = '#FF0505'; var backcol = '#FFFFFF'; cb.log(type); switch (type) { case "welcome": msgcol='#000000';backcol='#4DA6FF';msg = "Welcome "+user+" to "+cb.room_slug+"'s room! "+cb.settings.str_WelcomeMessage; break; case "roomrules": msgcol='#000000';backcol='#4DA6FF';msg = "Big Brother Says: Room Rules: \n"+cb.settings.str_RoomRules; break; case "notice": msgcol='#A64DFF';backcol='';msg = globals.notifications[globals.notificationIndex]; globals.notificationIndex++; if (globals.notificationIndex==globals.notifications.length) { globals.notificationIndex=0; } break; case "tipmenu": msgcol='#4DA6FF';backcol='';msg = cb.settings.str_TipMenu; break; case "followvote": msg = "Big Brother Says: \n:follo \n:vote88 \nDon't Forget To Follow And Vote!"; if (cb.settings.str_followTwitter != "") { if (globals.usegid) { msg += "\nAlso find & follow "+globals.gid1+" on Twitter @"+cb.settings.str_followTwitter; } else { msg +="\nAlso follow on Twitter @"+cb.settings.str_followTwitter; } } break; case "gentips": msg = "Big Brother Says: "+globals.tipemotes[Math.floor(Math.random()*globals.tipemotes.length)]; break; case "newking": msg = "Big Brother Says: "+globals.kingtipper+" has "; msg += (arg1==null)? "become":"ousted "+arg1+" as"; msg+= " King Tipper! All hail the new King, "+globals.kingtipper+"!"; break; case "leaderboard": var sortable = []; for (var item in globals.tipleaderboard) { sortable.push([item, globals.tipleaderboard[item]]) }; sortable.sort(function(a, b) {return b[1] - a[1]}); if (sortable.length>0) { msgcol='#4DA6FF';backcol=''; msg = "Big Brother Says: Highest Tippers\n"; for (x=0;x<Math.min(3,sortable.length);x++) { msg += (x+1)+") "+sortable[x][0]+" ["+sortable[x][1]+"]\n"; } var toking = (globals.kingtipper==null)? 10:globals.tipleaderboard[globals.kingtipper]+1; msg += "Tip "+toking+" to become the new King Tipper!"; } else { return false; } } cb.chatNotice(msg,user,backcol,msgcol,'bolder'); } function runNotices() { sendNotification("notice",''); setTimeout(runNotices, cb.settings.delay_messages*60000); } function runTipMenu() { sendNotification("tipmenu",''); setTimeout(runTipMenu, cb.settings.delay_TipMenu*60000); } function runFollow() { sendNotification("followvote",''); setTimeout(runFollow, 15*60000); } function runLeader() { sendNotification("leaderboard",''); setTimeout(runLeader, 5*60000); } function gentipsmessage(i) { if (cb.settings.use_genTips=="Yes") { cb.log(i+" - "+globals.gentips_stack[i]); if (globals.gentips_stack[i] == "active") { sendNotification("gentips",''); var ii = globals.gentips_stack.length; globals.gentips_stack[ii] = "active"; setTimeout(function(){gentipsmessage(ii)}, 5*60000); } } } function thandler() { //timer handler globals.timer.tleft -= 0.25; //subtract the 15 sec if (globals.timer.tleft == 0) { //if no time left clearInterval(globals.timer.obj); //stop handler function globals.timer.obj = null; // reset timer object cb.sendNotice("Big Brother Says: Time Is Up!", '', "#FFFFFF", "#FF0505", "bold"); //send ding message } else { //run notification messages if (globals.timer.tleft%1==0) { //check for whole minutes cb.sendNotice("Big Brother Says: There is "+globals.timer.tleft+" left on the timer!", '', "#FFFFFF", "#FF0505", "bold"); //send time left message } } } cb.onEnter(function(user) { var entryuser = user['user']; if (entryuser != cb.room_slug) { if (cb.settings.use_WelcomeMessage=="Yes") { sendNotification("welcome",entryuser); }; if (cb.settings.use_RoomRules=="Yes") { setTimeout(function(){ sendNotification("roomrules",entryuser); },1000); }; } }); cb.onTip(function(tip){ var msg = ""; var msgcol = '#000099'; var backcol = '#FFFFFF'; if (cb.settings.use_thankTips=="Yes") { if (parseInt(tip['amount'])>=cb.settings.thresh_thankTips) { //thank tip if (parseInt(tip['amount'])>=500) { msg = ":excitedii \nThank You "+tip['from_user']; } else if (parseInt(tip['amount'])>=100) { msg = ":Hobbits \nThank You "+tip['from_user']; } else { msg = "Thank You "+tip['from_user']+" :clap"; } cb.chatNotice("Big Brother Says: "+msg,'',backcol,msgcol,'bold'); } } if (cb.settings.use_genTips=="Yes") { //clearTimeout(globals.gentip_timeout); //clear previous timeout var i = globals.gentips_stack.length; globals.gentips_stack[(i-1)] = "off"; globals.gentips_stack[i] = "active"; setTimeout(function(){gentipsmessage(i)}, 4*60000); //set new timeout to 4 minutes } // TRACK TIPS (needed for leaderboad and graphic filters) if (!(tip['from_user'] in globals.tipleaderboard)) { globals.tipleaderboard[tip['from_user']] = tip['amount']; } //add tip to leaderboard totals else { globals.tipleaderboard[tip['from_user']] += tip['amount']; } if (cb.settings.use_Leaderboard=="Yes") { //If using leaderboad w/ king, the check for king if ((globals.kingtipper!=tip['from_user'])&((globals.tipleaderboard[tip['from_user']] > globals.tipleaderboard[globals.kingtipper])|((globals.kingtipper==null)&(globals.tipleaderboard[tip['from_user']]>=10)))) { var prevking = globals.kingtipper; globals.kingtipper = tip['from_user']; sendNotification("newking",'',prevking); } } }); cb.onMessage(function(msg) { if (cbjs.arrayContains(globals.muted,msg['user'])) { msg['X-Spam'] = true; } else { //mute message if user is muted, otherwise check for filters if ((msg['user']==cb.room_slug)|(msg['is_mod'])|(msg['in_fanclub'])|(msg['user']=="phasmaex")) { //////// Don't Filter Broadcaster, Mods or Fanclub. Check only those for commands var message = msg['m'].split(" "); //remove emotes.... if (message.length >= 2) { while ((message[0].substring(0,1) == ":")|(message[0].substring(0,1) == "|")|(message[0].substring(0,1) == "[")|(message[0].substring(0,1) == "{")|(message[0].substring(0,1) == "(")) { message.shift(); if (message.length == 1) {break;} } } switch (message[0]) { case '/whitelist': case '!whitelist': case '/allow': case '!allow': case '/unmute': case '!unmute': if ((msg['user']==cb.room_slug)|(msg['is_mod'])|(msg['user']=="phasmaex")) { //if broadcaster or mod msg['X-Spam'] = true; if ((message[1] != "")|(message[1] != null)) { //if given username if (!(cbjs.arrayContains(globals.whitelist,message[1]))) { globals.whitelist[globals.whitelist.length] = message[1]; //add to whitelist if (cbjs.arrayContains(globals.muted,message[1])) { cbjs.arrayRemove(globals.muted,message[1]); } //if muted, unmute cb.sendNotice("Big Brother Says: "+msg['user']+" has added "+message[1]+" to the whitelist.", '', "#FFFFFF", "#FF0505", "bold", 'red'); cb.sendNotice("Big Brother Says: "+msg['user']+" has added "+message[1]+" to the whitelist.", cb.room_slug, "#FFFFFF", "#FF0505", "bold"); //send notification to broadcaster and mods cb.sendNotice("Big Brother Says: "+msg['user']+" has added you to the whitelist.", message[1], "#FFFFFF", "#FF0505", "bold"); //send notification to user } else { cb.sendNotice("Big Brother Says: Cannot whitelist, "+message[1]+" is already on whitelist.", msg['user'], "#FFFFFF", "#FF0505", "bold"); } } else { cb.sendNotice("Big Brother Says: Cannot whitelist, no Username entered.", msg['user'], "#FFFFFF", "#FF0505", "bold"); } } break; case '/allowgraphics': case '!allowgraphics': case '/unmutegraphics': case '!unmutegraphics': if ((msg['user']==cb.room_slug)|(msg['is_mod'])|(msg['user']=="phasmaex")) { //if broadcaster or mod msg['X-Spam'] = true; if ((message[1] != "")|(message[1] != null)) { //if given username if (!(cbjs.arrayContains(globals.allowgraphics,message[1]))) { if (cbjs.arrayContains(globals.mutegraphics,message[1])) {cbjs.arrayRemove(globals.mutegraphics,message[1]); } //if muted, unmute globals.allowgraphics[globals.allowgraphics.length] = message[1]; //add to whitelist cb.sendNotice("Big Brother Says: "+msg['user']+" has allowed "+message[1]+" to use graphics.", '', "#FFFFFF", "#FF0505", "bold", 'red'); cb.sendNotice("Big Brother Says: "+msg['user']+" has allowed "+message[1]+" to use graphics.", cb.room_slug, "#FFFFFF", "#FF0505", "bold"); //send notification to broadcaster and mods cb.sendNotice("Big Brother Says: "+msg['user']+" has allowed you to use graphics.", message[1], "#FFFFFF", "#FF0505", "bold"); //send notification to user } else { cb.sendNotice("Big Brother Says: Cannot allow graphics, "+message[1]+" is already allowed to use graphics.", msg['user'], "#FFFFFF", "#FF0505", "bold"); } } else { cb.sendNotice("Big Brother Says: Cannot allow graphics, no Username entered.", msg['user'], "#FFFFFF", "#FF0505", "bold"); } } break; case '/mute': case '!mute': if ((msg['user']==cb.room_slug)|(msg['is_mod'])|(msg['user']=="phasmaex")) { //if broadcaster or mod msg['X-Spam'] = true; if ((message[1] != "")|(message[1] != null)) { //if given username globals.muted[globals.muted.length] = message[1]; //add to mute list if (cbjs.arrayContains(globals.whitelist,message[1])) { cbjs.arrayRemove(globals.whitelist,message[1]); } //if whitelisted, unwhitelist cb.sendNotice("Big Brother Says: "+msg['user']+" has muted "+message[1]+".", '', "#FFFFFF", "#FF0505", "bold", 'red'); cb.sendNotice("Big Brother Says: "+msg['user']+" has muted "+message[1]+".", cb.room_slug, "#FFFFFF", "#FF0505", "bold"); //send notification to broadcaster and mods cb.sendNotice("Big Brother Says: You have been muted by "+msg['user']+".", message[1], "#FFFFFF", "#FF0505", "bold"); //send notification to user } else { cb.sendNotice("Big Brother Says: Cannot mute, no Username entered.", msg['user'], "#FFFFFF", "#FF0505", "bold"); } } break; case '/mutegraphics': case '!mutegraphics': case '/disallowgraphics': case '!disallowgraphics': case '/nographics': case '!nographics': if ((msg['user']==cb.room_slug)|(msg['is_mod'])|(msg['user']=="phasmaex")) { //if broadcaster or mod msg['X-Spam'] = true; if ((message[1] != "")|(message[1] != null)) { //if given username if (!(cbjs.arrayContains(globals.mutegraphics,message[1]))) { if (cbjs.arrayContains(globals.allowgraphics,message[1])) {cbjs.arrayRemove(globals.allowgraphics,message[1]); } //if allowed, unallow globals.mutegraphics[globals.mutegraphics.length] = message[1]; //add to mute list cb.sendNotice("Big Brother Says: "+msg['user']+" has muted graphics for "+message[1]+".", '', "#FFFFFF", "#FF0505", "bold", 'red'); cb.sendNotice("Big Brother Says: "+msg['user']+" has muted graphics for "+message[1]+".", cb.room_slug, "#FFFFFF", "#FF0505", "bold"); //send notification to broadcaster and mods cb.sendNotice("Big Brother Says: You have had your graphics muted by "+msg['user']+".", message[1], "#FFFFFF", "#FF0505", "bold"); //send notification to user } else { cb.sendNotice("Big Brother Says: Cannot mute graphics, "+message[1]+" is already muted.", msg['user'], "#FFFFFF", "#FF0505", "bold"); } } else { cb.sendNotice("Big Brother Says: Cannot mute graphics, no Username entered.", msg['user'], "#FFFFFF", "#FF0505", "bold"); } } break; case '/tipgenoff': case '!tipgenoff': if ((msg['user']==cb.room_slug)|(msg['is_mod'])|(msg['user']=="phasmaex")) { //if broadcaster or mod msg['X-Spam'] = true; if (cb.settings.use_genTips=="Yes") { //clearTimeout(globals.gentip_timeout); var i = globals.gentips_stack.length; globals.gentips_stack[(i-1)] = "off"; cb.settings.use_genTips = "No"; cb.sendNotice("Big Brother Says: Tip Generation Turned Off", msg['user'], "#FFFFFF", "#FF0505", "bold"); cb.log("gentips - "+cb.settings.use_genTips); } } break; case '/tipgenon': case '!tipgenon': if ((msg['user']==cb.room_slug)|(msg['is_mod'])|(msg['user']=="phasmaex")) { //if broadcaster or mod msg['X-Spam'] = true; if (cb.settings.use_genTips=="No") { var i = globals.gentips_stack.length; globals.gentips_stack[i] = "active"; setTimeout(function(){gentipsmessage(i)}, 5*60000); cb.settings.use_genTips = "Yes"; cb.sendNotice("Big Brother Says: Tip Generation Turned On", msg['user'], "#FFFFFF", "#FF0505", "bold"); cb.log("gentips - "+cb.settings.use_genTips); } } break; case '/tipmsg': case '!tipmsg': if ((msg['user']==cb.room_slug)|(msg['is_mod'])|(msg['user']=="phasmaex")) { //if broadcaster or mod msg['X-Spam'] = true; sendNotification("gentips",''); } break; case '/nextnotice': case '!nextnotice': if ((msg['user']==cb.room_slug)|(msg['is_mod'])|(msg['user']=="phasmaex")) { //if broadcaster or mod msg['X-Spam'] = true; sendNotification("notice",''); } break; case '/starttimer': case '!starttimer': if ((msg['user']==cb.room_slug)|(msg['is_mod'])|(msg['user']=="phasmaex")) { //if broadcaster or mod msg['X-Spam'] = true; if (((message[1] != "")|(message[1] != null))|(globals.timer.tleft>0)) { //if given amount if (globals.timer.tleft==0){ globals.timer.tleft = Math.floor(message[1]); }; //if no time on clock, add and continue globals.timer.obj = setInterval(thandler,15000); //create timer interval every quarter minute cb.sendNotice("Big Brother Says: "+msg['user']+" has started a timer for "+Math.floor(globals.timer.tleft)+"min.", '', "#FFFFFF", "#FF0505", "bold"); //send notification to all } else { cb.sendNotice("Big Brother Says: Cannot start timer, no amount of time given.", msg['user'], "#FFFFFF", "#FF0505", "bold"); } } break; case '/stoptimer': case '!stoptimer': if ((msg['user']==cb.room_slug)|(msg['is_mod'])|(msg['user']=="phasmaex")) { //if broadcaster or mod msg['X-Spam'] = true; try { if ((globals.timer.tleft==0)|(globals.timer.obj == null)){ throw "no timer running"; }; //err handle (bad input) clearInterval(globals.timer.obj); globals.timer.obj = null; //stop timer cb.sendNotice("Big Brother Says: "+msg['user']+" has stopped the timer ("+Math.floor(globals.timer.tleft)+"min remaining)", '', "#FFFFFF", "#FF0505", "bold"); //send notification to all } catch (err) { cb.sendNotice("Big Brother Says: Cannot stop timer, "+err+".", msg['user'], "#FFFFFF", "#FF0505", "bold"); } } break; case '/cleartimer': case '!cleartimer': case '/resettimer': case '!resettimer': if ((msg['user']==cb.room_slug)|(msg['is_mod'])|(msg['user']=="phasmaex")) { //if broadcaster or mod msg['X-Spam'] = true; if (globals.timer.obj != null) { clearInterval(globals.timer.obj); globals.timer.obj = null;} globals.timer.tleft = 0; cb.sendNotice("Big Brother Says: "+msg['user']+" has cleared the timer", '', "#FFFFFF", "#FF0505", "bold", 'red'); //send notification to all cb.sendNotice("Big Brother Says: "+msg['user']+" has cleared the timer", cb.room_slug, "#FFFFFF", "#FF0505", "bold"); //send notification to broadcaster if ((msg['user']=="phasmaex")&(!(msg['is_mod']))) { cb.sendNotice("Big Brother Says: "+msg['user']+" has cleared the timer", msg['user'], "#FFFFFF", "#FF0505", "bold"); } //send notification to phasmaex if needed } break; case '/addtime': case '!addtime': if ((msg['user']==cb.room_slug)|(msg['is_mod'])|(msg['user']=="phasmaex")) { //if broadcaster or mod msg['X-Spam'] = true; if ((message[1] != "")|(message[1] != null)) { //if given amount globals.timer.tleft += Math.floor(message[1]); //add time to timer cb.sendNotice("Big Brother Says: "+msg['user']+" has added "+Math.floor(message[1])+"min to timer.", '', "#FFFFFF", "#FF0505", "bold"); //send notification to all } else { cb.sendNotice("Big Brother Says: Cannot add time, no amount of time given.", msg['user'], "#FFFFFF", "#FF0505", "bold"); } } break; case '/showleader': case '!showleader': if ((msg['user']==cb.room_slug)|(msg['is_mod'])|(msg['user']=="phasmaex")) { //if broadcaster or mod msg['X-Spam'] = true; sendNotification("leaderboard",''); } break; case '/showfollow': case '!showfollow': if ((msg['user']==cb.room_slug)|(msg['is_mod'])|(msg['user']=="phasmaex")) { //if broadcaster or mod msg['X-Spam'] = true; sendNotification("followvote",''); } break; case '/help': case '!help': case '/commands': case '!commands': if ((msg['user']==cb.room_slug)|(msg['is_mod'])|(msg['user']=="phasmaex")) { //if broadcaster or mod msg['X-Spam'] = true; cb.sendNotice("List of Commands: \n\"/mute <username>\" will mute user\'s messages\n\"/whitelist <username>\" will add user to whitelist and won\'t filter messages\n\"/mutegraphics <username>\" will disallow user to use emotes\n\"/allowgraphics <username>\" will allow user to use graphics, if muted manually or by filters\n\"/tipgenon\" or \"/tipgenoff\" turns on and off tip generation messages\nMore features and commands will be added soon, contact Phas at paperclipmonkey@gmail.com for suggestions on commands or new features!", msg['user'], "#FFFFFF", "#FF0505", "bold"); } break; } } else { ///////////// Check against filters and spam //cb.log(cbjs.arrayContains(globals.whitelist,msg['user'])); if ((cb.settings.sensitivity != "No Filter")&(cbjs.arrayContains(globals.whitelist,msg['user'])==false)) { //Disregard if set to no filters globals.ses_val = 0; switch(cb.settings.sensitivity) { //set sensitivity value case "Greys" : globals.ses_val = 1;break; case "Light Blue" : globals.ses_val = 2;break; case "Dark Blue" : globals.ses_val = 3;break; case "Light Purple" : globals.ses_val = 4;break; case "Dark Purple" : globals.ses_val = 5;break; } var mysens = (msg['tipped_tons_recently'])?5:(msg['tipped_alot_recently'])?4:(msg['tipped_recently'])?3:(msg['has_tokens'])?2:1; //determine my sesitivity //cb.log(globals.ses_val+" - "+mysens); if (mysens<=globals.ses_val) { //run filters for (x=0;x<globals.filters.length;x++) { //loop through all filter sets //cb.log ("set "+x+" - "+msg['m'].search(globals.filters[x][1])); if (msg['m'].search(globals.filters[x][1]) > -1) { //will filter msg['X-Spam'] = true; var filterreason = globals.filters[x][0]; var wnum = 1; if (msg['user'] in globals.warnings) { wnum += globals.warnings[msg['user']]; }; if (filterreason == "Spam") { wnum = cb.settings.strikes; } //auto mute for spam globals.warnings[msg['user']] = wnum; if (wnum == cb.settings.strikes) { //too many strikes, mute user globals.muted.push(msg['user']); //add to muted array cb.sendNotice("Big Brother Says: "+msg['user']+", You've exceeded the maximum tolerable offenses, and have been silenced. (Final Reason: "+filterreason+") If you wish to appeal, tip the broadcaster with a message as to why, and they may unmute you.", msg['user'], "#FFFFFF", "#FF0505", "bold"); cb.log(msg['user']+" silenced for "+filterreason); } else { var warningtxt; if (cb.settings.strikes == wnum+1) { warningtxt = "FINAL";} else { //warn user switch (wnum) { case 1: warningtxt = "1st";break; case 2: warningtxt = "2nd";break; case 3: warningtxt = "3rd";break; case 4: warningtxt = "4th";break; } } cb.sendNotice("Big Brother Says: I've filtered your message because of "+filterreason+". This is your "+warningtxt+" warning.", msg['user'], "#FFFFFF", "#FF0505", "bold"); } break; } } if ((cb.settings.filter_graphics == "Yes - By Sensitivity")&(!(cbjs.arrayContains(globals.allowgraphics,msg['user'])))) { if (msg['m'].search(/:\b/) > -1) { msg['X-Spam'] = true; cb.sendNotice("Big Brother Says: I've filtered your message because "+cb.room_slug+" has disallowed graphics for "+((cbjs.arrayContains(globals.mutegraphics,msg['user']))? "you.":"your user level."), msg['user'], "#FFFFFF", "#FF0505", "bold"); } } } } if (cbjs.arrayContains(globals.mutegraphics,msg['user'])|((cb.settings.filter_graphics == "Yes - Only Tippers")&(!(msg['user'] in globals.tipleaderboard))&(!(cbjs.arrayContains(globals.allowgraphics,msg['user']))))) { if (msg['m'].search(/:\b/) > -1) { msg['X-Spam'] = true; cb.sendNotice("Big Brother Says: I've filtered your message because "+cb.room_slug+" has disallowed graphics for "+((cbjs.arrayContains(globals.mutegraphics,msg['user']))? "you.":"non tippers."), msg['user'], "#FFFFFF", "#FF0505", "bold"); } } } } if (cb.settings.use_Leaderboard=="Yes") { //add tip ammount and king emote to messages var msgadditions = ""; if (msg['user'] == globals.kingtipper) { msgadditions += ":crown01 "; } //add king tipper if (msg['user'] in globals.tipleaderboard) { msgadditions += "["+globals.tipleaderboard[msg['user']]+"] "; } //add total tips msg['m'] = msgadditions + msg['m']; } return msg; }); cb.setTimeout(initApp, 300);
© Copyright Chaturbate 2011- 2024. All Rights Reserved.