Bots Home
|
Create an App
triton bot test
Author:
phasmaex
Description
Source Code
Launch Bot
Current Users
Created by:
Phasmaex
var phas = "keystring=17h7h4nsnkfjng743"; /*/////////////////////////////////// -------Erin's Triton Bot (Forked from 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.1"/*********************** FORKED FROM BIG BROTHER VERSION 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 TO DO YET -Token Poll *//////////////////////////////////// // 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; globals.colors = new Object(); // Define Color Codes for messages globals.colors['Light Blue'] = "#4595ED"; globals.colors['Navy Blue'] = "#004A82"; globals.colors['Light Purple'] = "#A448FF"; globals.colors['Violet'] = "#69008C"; globals.colors['Pink'] = "#E27570"; globals.colors['Red'] = "#FF2626"; globals.colors['Orange'] = "#FF8000"; globals.colors['Gold'] = "#FAA732"; globals.colors['Lime Green'] = "#97FF2F"; globals.colors['Forest Green'] = "#378037"; globals.colors['Olive Green'] = "#7C9445"; globals.colors['Grey'] = "#6B6B6B"; globals.colors['Black'] = "#000000"; globals.colors['White'] = "#EFEFEF"; function createcolshoice(name,label,defval) { var returnobj = new Object(); returnobj['name'] = name; returnobj['type'] = 'choice'; returnobj['label'] = label; returnobj['defaultValue'] = defval; var x=1; for (var col in globals.colors) { returnobj['choice'+x] = col; x++; } return returnobj; } globals.emotes = new Object(); globals.emotes['-'] = "-"; globals.emotes['~'] = "~"; globals.emotes['|'] = "|"; globals.emotes['Sparkle Emote'] = ":sparklpink"; globals.emotes['Heart Emote'] = ":heart7"; globals.emotes['Hearts Emote 2'] = ":pixelheart"; globals.emotes['Twinkling Stars'] = ":starslana"; globals.emotes['Flower'] = ":tinyflower2"; globals.emotes['Bow'] = ":bluebow"; globals.emotes['Glitter'] = ":pixelglitter"; globals.textmotes = new Object(); globals.textmotes['wave'] = decodeURIComponent("%F0%9F%8C%8A"); globals.textmotes['surf'] = decodeURIComponent("%F0%9F%8F%84"); globals.textmotes['splash'] = decodeURIComponent("%F0%9F%92%A6"); globals.textmotes['swim'] = decodeURIComponent("%F0%9F%8F%8A"); globals.members = new Object(); //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}, createcolshoice('col_WelcomeMessage','Color For Welcome Message?','Light Blue'), {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}, createcolshoice('col_RoomRules','Color For Room Rules Message?','Light Blue'), {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}, createcolshoice('col_Message1','Color For Notification Message 1?','Light Blue'), {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}, createcolshoice('col_Message2','Color For Notification Message 2?','Light Blue'), {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}, createcolshoice('col_Message3','Color For Notification Message 3?','Light Blue'), {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}, createcolshoice('col_Message4','Color For Notification Message 4?','Light Blue'), {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}, createcolshoice('col_Message5','Color For Notification Message 5?','Light Blue'), {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-5 above one at a time with this delay between messages)"}, {name: 'use_TipMenu', type:'choice', choice1:'Yes',choice2:'No',label:'Use Tip Menu? (If enabled, will display tip menu set below periodically using the specified delay, or when a user runs the /tipmenu command)',defaultValue:'No'}, {name: 'alert_TipMenu', type:'choice', choice1:'Yes',choice2:'No',label:'Send Alerts For Tip Menu? (Only if Tip Menu is enabled above)',defaultValue:'Yes'}, {name: 'str_TipMenu', type:'str', minLength:1,maxLength:800,label:"Tip Menu (MUST BE in the folowing format: [\"Item Name\",Cost] each item seperated by a comma. The square brackets must surround each item, the title of each item must also be wrapped in quotes, comma seperates the item name from the cost in tokens)",defaultValue:'["PMs",10],["Boob Flash",50],["Kitty Flash","100"]',required: false}, {name: 'sep_TipMenu', type:'choice', choice1:'-', choice2:'~',choice3:'|',choice4:'Heart Emote',choice5:'Hearts Emote 2',choice6:'Sparkle Emote',choice7:'Twinkling Stars',choice8:'Flower',choice9:'Bow',choice10:'Glitter',label:'Tip Menu Seperator',defaultValue:'-'}, createcolshoice('col_TipMenu','Color For Tip Menu?','Pink'), {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:2,maxValue:50,defaultValue:10,label:"Tip Threshold For Thanking Users (range 2-50, recommend 10. If thank tips is enabled above, will thank any user that tips more than this amount, and display the messages below acordingly.)"}, {name: 'str_ThankTips1', type:'str', minLength:1,maxLength:800,label:"Thank You Message For Tips 2-24 Tokens (Emotes are allowed)",defaultValue:'Thank You! :clap',required: false}, {name: 'str_ThankTips2', type:'str', minLength:1,maxLength:800,label:"Thank You Message For Tips 25-99 Tokens (Emotes are allowed)",defaultValue:':Hobbits Thank You So Much!',required: false}, {name: 'str_ThankTips3', type:'str', minLength:1,maxLength:800,label:"Thank You Message For Tips 100+ Tokens (Emotes are allowed)",defaultValue:':excitedii OMG Thank You! You Are Amazing!',required: false}, createcolshoice('col_ThankTips','Color For Tip Thanks Messages?','Navy Blue'), {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}, {name: 'use_Waves', type:'choice', choice1:'Yes',choice2:'No',label:'Use \'Making Waves\'?',defaultValue:'No'}, {name: 'thresh_Waves', type:'int',minValue:10,maxValue:500,defaultValue:25,label:"Tip Threshold For Making Waves (range 10-500, recommend at least 25)"}, {name: 'int_waveCount', type:'int',minValue:5,maxValue:15,defaultValue:7,label:"Number Of Lines For \'Making Waves\' (range 5-15, recommend 6-8)"}, {name: 'use_members', type:'choice', choice1:'Yes',choice2:'No',label:'Use Club Members?',defaultValue:'Yes'}, createcolshoice('col_members_fnt','Message Color For Club Members?','Violet'), createcolshoice('col_members_bck','Background Message Color For Club Members?','White'), {name: 'str_members_lvl1', type:'str', minLength:1,maxLength:100,label:"Member Level 1 Emote",defaultValue:':clubstarfish',required: false}, {name: 'str_members_lvl2', type:'str', minLength:1,maxLength:100,label:"Member Level 2 Emote",defaultValue:':erin_clubfish',required: false}, {name: 'str_members_lvl3', type:'str', minLength:1,maxLength:100,label:"Member Level 3 Emote",defaultValue:':erin_clubjelly',required: false}, {name: 'str_members_lvl4', type:'str', minLength:1,maxLength:100,label:"Member Level 4 Emote",defaultValue:':erin_clubman',required: false}, {name: 'str_membershipnotice', type:'str', minLength:1,maxLength:800,label:"Membership Notification (emotes alowed, use \"\\n\" for a line break. Notification gets displayed every 10 minutes if membership is enabled)",defaultValue:'Join My Aquarium!!! Tip 878tkns to start your way up the food chain. Every tip of 878tkns moves you up one level. Every level gets their name in my aquarium down in my bio, special highlights in my chat room, and many other perks! Full details listed below in my bio!',required: false}, {name: 'use_highestTipper', type:'choice', choice1:'Yes',choice2:'No',label:'Use Highest Single Tipper?',defaultValue:'Yes'}, {name: 'str_highestTipperEmote', type:'str', minLength:1,maxLength:100,label:"Highest Tipper Emote",defaultValue:':crownprincess',required: false}, {name: 'use_nicknames', type:'choice', choice1:'Yes',choice2:'No',label:'Use Nicknames?',defaultValue:'Yes'}, {name: 'load_external', type:'str',label:"Load Membership Settings From Previous Session (output generated from bot by running \'/save\', copy that output here to load from previous session)",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; } globals.memberlvl = [cb.settings.str_members_lvl1,cb.settings.str_members_lvl2,cb.settings.str_members_lvl3,cb.settings.str_members_lvl4]; if (cb.settings.load_external != "") { //if there is something, load it globals.members = JSON.parse(decodeURIComponent(cb.settings.load_external.replace(/^(Notice: )/,""))); } //set notification list if (cb.settings.use_Message1=="Yes") { globals.notifications[globals.notifications.length] = [cb.settings.str_Message1,globals.colors[cb.settings.col_Message1]]; }; if (cb.settings.use_Message2=="Yes") { globals.notifications[globals.notifications.length] = [cb.settings.str_Message2,globals.colors[cb.settings.col_Message2]]; }; if (cb.settings.use_Message3=="Yes") { globals.notifications[globals.notifications.length] = [cb.settings.str_Message3,globals.colors[cb.settings.col_Message3]]; }; if (cb.settings.use_Message4=="Yes") { globals.notifications[globals.notifications.length] = [cb.settings.str_Message4,globals.colors[cb.settings.col_Message4]]; }; if (cb.settings.use_Message5=="Yes") { globals.notifications[globals.notifications.length] = [cb.settings.str_Message5,globals.colors[cb.settings.col_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") { globals.tipMenuArray = JSON.parse("["+cb.settings.str_TipMenu+"]"); 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); } if (cb.settings.use_members=="Yes") { setTimeout(runMembership, 5*60000); } if (cb.settings.use_highestTipper=="Yes") { setTimeout(runHighestTipper, 10*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"); throw "ver error"; } //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"); throw "keystring error"; } 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("Triton Says: I am now running! Triton 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 @phasmaex, or email at paperclipmonkey@gmail.com. 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"); cb.sendNotice("Sorry I\'ve Encountered An Error! "+err, 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=globals.colors[cb.settings.col_WelcomeMessage];backcol='';msg = "Welcome "+user+" to "+cb.room_slug+"'s room! "+cb.settings.str_WelcomeMessage; break; case "roomrules": msgcol=globals.colors[cb.settings.col_RoomRules];backcol='';msg = "Triton Says: Room Rules: \n"+cb.settings.str_RoomRules; break; case "notice": msgcol=globals.notifications[globals.notificationIndex][1];backcol='';msg = globals.notifications[globals.notificationIndex][0]; globals.notificationIndex++; if (globals.notificationIndex==globals.notifications.length) { globals.notificationIndex=0; } break; case "tipmenu": msgcol=globals.colors[cb.settings.col_TipMenu];backcol=''; msg = 'TIP MENU: '; for (x=0;x<globals.tipMenuArray.length;x++) { msg += ((x>0)?" "+globals.emotes[cb.settings.sep_TipMenu]+" ":"") + globals.tipMenuArray[x][1] +" for "+ globals.tipMenuArray[x][0]; }; break; case "followvote": msg = "Triton 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 = "Triton Says: "+globals.tipemotes[Math.floor(Math.random()*globals.tipemotes.length)]; break; case "newking": msg = "Triton 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 = "Triton 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; } break; case "hightipper": msgcol=globals.colors[cb.settings.col_RoomRules];backcol=''; var mm = "Tip 4k+ Tokens To Become The Highest Tipper! Full details on perks listed in my bio below!"; for (var u in globals.members) { if ("hightipper" in globals.members[u]) { mm = u + " holds the Highest Single Tip with "+globals.members[u]["hightipper"]+" tokens! Any single tip greater than "+globals.members[u]["hightipper"]+" will take their crown! Full details on perks listed in my bio below!"; break; } } msg = "Triton Says: Highest Single Tip - "+mm; break; case "membership": msgcol=globals.colors[cb.settings.col_RoomRules];backcol='';msg = cb.settings.str_membershipnotice; break; break; } 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 runHighestTipper() { sendNotification("hightipper",''); setTimeout(runHighestTipper, 15*60000); } function runMembership() { sendNotification("membership",''); setTimeout(runMembership, 10*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("Triton 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("Triton Says: There is "+globals.timer.tleft+" left on the timer!", '', "#FFFFFF", "#FF0505", "bold"); //send time left message } } } function genwaves(rows,user) { var w = globals.textmotes['wave']; var sp = globals.textmotes['splash']; var s = globals.textmotes['surf']; var sw = globals.textmotes['swim']; var msg = user + " is MAKING WAVES! "+w+" "+w+" "+s; for (x=0;x<rows;x++) { msg += "\n"; for (i=0;i<(Math.floor(Math.random()*15)+5);i++) { msg +=" "+ ((Math.floor(Math.random()*5))?w:((Math.floor(Math.random()*3))?sp:((Math.floor(Math.random()*2))?sw:s))); } } return msg; } 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 = globals.colors[cb.settings.col_ThankTips]; var backcol = ''; if (cb.settings.use_thankTips=="Yes") { if (parseInt(tip['amount'])>=cb.settings.thresh_thankTips) { //thank tip if (parseInt(tip['amount'])>=100) { msg = tip['from_user']+": "+cb.settings.str_ThankTips3; } else if (parseInt(tip['amount'])>=25) { msg = tip['from_user']+": "+cb.settings.str_ThankTips2; } else { msg = msg = tip['from_user']+": "+cb.settings.str_ThankTips1; } cb.chatNotice("Triton 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 } if ((cb.settings.use_TipMenu=="Yes")&(cb.settings.alert_TipMenu=="Yes")) { //check for tip menu alerts for (x=0;x<globals.tipMenuArray.length;x++) { //loop through each item if (tip['amount'] == globals.tipMenuArray[x][1]) { //if amount matches item on tip menu, then prepare and send message var msg = tip['from_user'] + " Tipped For "+globals.tipMenuArray[x][0]; var msgcol = globals.colors['Red']; var backcol = ''; cb.chatNotice("Triton Says: "+msg,'',backcol,msgcol,'bold'); break; } } } if (cb.settings.use_Waves=="Yes") { if (parseInt(tip['amount'])>=cb.settings.thresh_Waves) { //thank tip var msg = genwaves(cb.settings.int_waveCount,tip['from_user']); var msgcol = globals.colors['Light Blue']; var backcol = ''; cb.chatNotice("Triton Says: "+msg,'',backcol,msgcol,'bolder'); } } // 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")|(msg['user'] in globals.members)) { //////// 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]) { /* ------------------------------------- FILTER COMMANDS ---------------------------------------*/ 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("Triton Says: "+msg['user']+" has added "+message[1]+" to the whitelist.", '', "#FFFFFF", "#FF0505", "bold", 'red'); cb.sendNotice("Triton Says: "+msg['user']+" has added "+message[1]+" to the whitelist.", cb.room_slug, "#FFFFFF", "#FF0505", "bold"); //send notification to broadcaster and mods cb.sendNotice("Triton Says: "+msg['user']+" has added you to the whitelist.", message[1], "#FFFFFF", "#FF0505", "bold"); //send notification to user } else { cb.sendNotice("Triton Says: Cannot whitelist, "+message[1]+" is already on whitelist.", msg['user'], "#FFFFFF", "#FF0505", "bold"); } } else { cb.sendNotice("Triton 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("Triton Says: "+msg['user']+" has allowed "+message[1]+" to use graphics.", '', "#FFFFFF", "#FF0505", "bold", 'red'); cb.sendNotice("Triton Says: "+msg['user']+" has allowed "+message[1]+" to use graphics.", cb.room_slug, "#FFFFFF", "#FF0505", "bold"); //send notification to broadcaster and mods cb.sendNotice("Triton Says: "+msg['user']+" has allowed you to use graphics.", message[1], "#FFFFFF", "#FF0505", "bold"); //send notification to user } else { cb.sendNotice("Triton Says: Cannot allow graphics, "+message[1]+" is already allowed to use graphics.", msg['user'], "#FFFFFF", "#FF0505", "bold"); } } else { cb.sendNotice("Triton 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("Triton Says: "+msg['user']+" has muted "+message[1]+".", '', "#FFFFFF", "#FF0505", "bold", 'red'); cb.sendNotice("Triton Says: "+msg['user']+" has muted "+message[1]+".", cb.room_slug, "#FFFFFF", "#FF0505", "bold"); //send notification to broadcaster and mods cb.sendNotice("Triton Says: You have been muted by "+msg['user']+".", message[1], "#FFFFFF", "#FF0505", "bold"); //send notification to user } else { cb.sendNotice("Triton 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("Triton Says: "+msg['user']+" has muted graphics for "+message[1]+".", '', "#FFFFFF", "#FF0505", "bold", 'red'); cb.sendNotice("Triton Says: "+msg['user']+" has muted graphics for "+message[1]+".", cb.room_slug, "#FFFFFF", "#FF0505", "bold"); //send notification to broadcaster and mods cb.sendNotice("Triton Says: You have had your graphics muted by "+msg['user']+".", message[1], "#FFFFFF", "#FF0505", "bold"); //send notification to user } else { cb.sendNotice("Triton Says: Cannot mute graphics, "+message[1]+" is already muted.", msg['user'], "#FFFFFF", "#FF0505", "bold"); } } else { cb.sendNotice("Triton Says: Cannot mute graphics, no Username entered.", msg['user'], "#FFFFFF", "#FF0505", "bold"); } } break; /* ------------------------------------- TIP GEN FEATURES ---------------------------------------*/ 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("Triton 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("Triton Says: Tip Generation Turned On", msg['user'], "#FFFFFF", "#FF0505", "bold"); cb.log("gentips - "+cb.settings.use_genTips); } } break; /* ------------------------------------- TIMER COMMANDS ---------------------------------------*/ 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("Triton Says: "+msg['user']+" has started a timer for "+Math.floor(globals.timer.tleft)+"min.", '', "#FFFFFF", "#FF0505", "bold"); //send notification to all } else { cb.sendNotice("Triton 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("Triton 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("Triton 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("Triton Says: "+msg['user']+" has cleared the timer", '', "#FFFFFF", "#FF0505", "bold", 'red'); //send notification to all cb.sendNotice("Triton 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("Triton 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("Triton Says: "+msg['user']+" has added "+Math.floor(message[1])+"min to timer.", '', "#FFFFFF", "#FF0505", "bold"); //send notification to all } else { cb.sendNotice("Triton Says: Cannot add time, no amount of time given.", msg['user'], "#FFFFFF", "#FF0505", "bold"); } } break; /* ------------------------------------- MANUAL NOTIFICATIONS ---------------------------------------*/ case '/showleader': case '!showleader': if ((msg['user']==cb.room_slug)|(msg['is_mod'])|(msg['user']=="phasmaex")) { msg['X-Spam'] = true; sendNotification("leaderboard",''); } break; case '/showfollow': case '!showfollow': if ((msg['user']==cb.room_slug)|(msg['is_mod'])|(msg['user']=="phasmaex")) { msg['X-Spam'] = true;sendNotification("followvote",''); } break; case '/tipmsg': case '!tipmsg': if ((msg['user']==cb.room_slug)|(msg['is_mod'])|(msg['user']=="phasmaex")) { msg['X-Spam'] = true; sendNotification("gentips",''); } break; case '/nextnotice': case '!nextnotice': if ((msg['user']==cb.room_slug)|(msg['is_mod'])|(msg['user']=="phasmaex")) { msg['X-Spam'] = true; sendNotification("notice",''); } break; case '/membernotice': case '!membernotice': if ((msg['user']==cb.room_slug)|(msg['is_mod'])|(msg['user']=="phasmaex")) { msg['X-Spam'] = true; sendNotification("membership",''); } break; case '/highesttipper': case '!highesttipper': if ((msg['user']==cb.room_slug)|(msg['is_mod'])|(msg['user']=="phasmaex")) { msg['X-Spam'] = true; sendNotification("hightipper",''); } break; /* ------------------------------------- MEMBER PROPERTIES (club, nickname, high tipper) ---------------------------------------*/ case '/addmember': if ((msg['user']==cb.room_slug)|(msg['user']=="phasmaex")) { //if broadcaster msg['X-Spam'] = true; if (((message[1] != "")&(message[1] != null))&((message[2] != "")&(message[2] != null))) { //if given username and level if (!(message[1] in globals.members)) { globals.members[message[1]] = new Object(); } globals.members[message[1]]["memberlvl"] = parseInt(message[2]); cb.sendNotice("Triton Says: Added "+message[1]+" to members at level "+message[2], msg['user'], "#FFFFFF", "#FF0505", "bold"); } else { cb.sendNotice("Triton Says: Cannot Add Member, Invalid Information Given.", msg['user'], "#FFFFFF", "#FF0505", "bold"); } } break; case '/addnickname': if ((msg['user']==cb.room_slug)|(msg['user']=="phasmaex")) { //if broadcaster msg['X-Spam'] = true; if (((message[1] != "")&(message[1] != null))&((message[2] != "")&(message[2] != null))) { //if given username and nickname if (!(message[1] in globals.members)) { globals.members[message[1]] = new Object(); } globals.members[message[1]]["nickname"] = message[2]; cb.sendNotice("Triton Says: Added nickname \'"+message[2]+"\' to user "+message[1], msg['user'], "#FFFFFF", "#FF0505", "bold"); } else { cb.sendNotice("Triton Says: Cannot Add Nickname, Invalid Information Given.", msg['user'], "#FFFFFF", "#FF0505", "bold"); } } break; case '/addhightipper': if ((msg['user']==cb.room_slug)|(msg['user']=="phasmaex")) { //if broadcaster msg['X-Spam'] = true; if (((message[1] != "")&(message[1] != null))&((message[2] != "")&(message[2] != null))) { //if given username and amount if (!(message[1] in globals.members)) { globals.members[message[1]] = new Object(); } globals.members[message[1]]["hightipper"] = parseInt(message[2]); cb.sendNotice("Triton Says: Added "+message[1]+" as High Tipper with "+message[2]+" high tip", msg['user'], "#FFFFFF", "#FF0505", "bold"); } else { cb.sendNotice("Triton Says: Cannot Add High Tipper, Invalid Information Given.", msg['user'], "#FFFFFF", "#FF0505", "bold"); } } break; case '/remove': if ((msg['user']==cb.room_slug)|(msg['user']=="phasmaex")) { //if broadcaster msg['X-Spam'] = true; if (((message[1] != "")&(message[1] != null))&((message[2] != "")&(message[2] != null))) { //if given username and amount if (message[2] == "member") { message[2] = "memberlvl" }; //correct some property names if (message[1] in globals.members) { if (message[2] in globals.members[message[1]]) { delete globals.members[message[1]][message[2]]; cb.sendNotice("Triton Says: Removed \'"+message[2]+"\' from "+message[1]+"'s member properties.", msg['user'], "#FFFFFF", "#FF0505", "bold"); } else { cb.sendNotice("Triton Says: Cannot Remove \'"+message[2]+"\', "+message[1]+" does not have that member property.", msg['user'], "#FFFFFF", "#FF0505", "bold"); } } else { cb.sendNotice("Triton Says: Cannot Remove \'"+message[2]+"\', NonExistant Member.", msg['user'], "#FFFFFF", "#FF0505", "bold"); } } else { cb.sendNotice("Triton Says: Cannot Remove, Invalid Information Given.", msg['user'], "#FFFFFF", "#FF0505", "bold"); } } break; /* ------------------------------------- HELP MESSAGE ---------------------------------------*/ 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\n\"/starttimer <minutes>\" will start a timer with the given time. This command can also be run without a given time, as long as a timer has been set using \"/addtime\" or has been previously stopped using \"/stoptimer\"\n\"/stoptimer\" will pause a running timer.\n\"/cleartimer\" will stop and remove a running or paused timer.\n\"/addtime <minutes>\" will add to the timer the given time.\n\"/addmember <username> <memberLevel>\" will give memship to user.\n\"/addnickname <username> <nickname>\" will give the user the specified nickname. Nicknames CAN NOT contain spaces, use the underscore or hyphen in place of spaces.\n\"/addhightipper <username> <amount>\" will add user as single highest tipper with the amount given.\n\"/remove <username> <memberOption>\" will remove the given property from the user. Member Options are \"member\",\"nickname\",\"hightipper\".\n\"/save\" will output a code to load your member settings on future sessions.\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; /* ------------------------------------- SAVE FUNCTION FOR MEMBER DETAILS ---------------------------------------*/ case '/save': if ((msg['user']==cb.room_slug)|(msg['is_mod'])|(msg['user']=="phasmaex")) { //if broadcaster or mod msg['X-Spam'] = true; var output = encodeURIComponent(JSON.stringify(globals.members)); cb.sendNotice("COPY THE FOLLOWING AND PASTE INTO THE LOAD FROM PREVIOUS SESSION BOX ON THE BOT LAUNCH PAGE\n"+output, 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("Triton 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("Triton 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("Triton 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("Triton 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"); } } } } var u = msg['user']; if (u in globals.members) { //if the user is in members array, then check against membership features var msgadditions = ""; if (cb.settings.use_nicknames=="Yes") { //check for nicknames if ("nickname" in globals.members[u]) { msgadditions += "(aka "+globals.members[u]['nickname']+") "; } //if has nickname, append it } if (cb.settings.use_members=="Yes") { //check for membership level if ("memberlvl" in globals.members[u]) { msgadditions += globals.memberlvl[(globals.members[u]['memberlvl']-1)]+" "; msg['c'] = globals.colors[cb.settings.col_members_fnt]; msg['background'] = globals.colors[cb.settings.col_members_bck]; } //if has level, append emote and change color } if (cb.settings.use_highestTipper=="Yes") { //check for membership level if ("hightipper" in globals.members[u]) { msgadditions += cb.settings.str_highestTipperEmote+" "; } //if has hightip, append emote and total } msg['m'] = msgadditions + msg['m']; } if (cb.settings.use_Leaderboard=="Yes") { //add tip ammount and king emote to messages var msgadditions = ""; if (u == globals.kingtipper) { msgadditions += ":crown01 "; } //add king tipper if (u in globals.tipleaderboard) { msgadditions += "["+globals.tipleaderboard[u]+"] "; } //add total tips msg['m'] = msgadditions + msg['m']; } return msg; }); cb.setTimeout(initApp, 300);
© Copyright Chaturbate 2011- 2024. All Rights Reserved.