Bots Home
|
Create an App
ElvenBot
Author:
elvendragon
Description
Source Code
Launch Bot
Current Users
Created by:
Elvendragon
// startof CBSv2 module - not for re-compilation (function(a,h){function f(a){this.message=a}f.prototype=Error();f.prototype.name="InvalidCharacterError";a.btoa||(a.btoa=function(a){a=String(a);for(var g,b,m=0,d=h,q="";a.charAt(m|0)||(d="=",m%1);q+=d.charAt(63&g>>8-m%1*8)){b=a.charCodeAt(m+=.75);if(255<b)throw new f('"btoa" failed: The string to be encoded contains characters outside of the Latin1 range.');g=g<<8|b}return q});a.atob||(a.atob=function(a){a=String(a).replace(/=+$/,"");if(1==a.length%4)throw new f('"atob" failed: The string to be decoded is not correctly encoded.'); for(var g=0,b,m,d=0,q="";m=a.charAt(d++);~m&&(b=g%4?64*b+m:m,g++%4)?q+=String.fromCharCode(255&b>>(-2*g&6)):0)m=h.indexOf(m);return q})})("undefined"===typeof exports?this:exports,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="); (function(a){var h=cb.onMessage,f=null,p=null,g,b="#"+(cb.settings.hasOwnProperty("slot")?cb.settings.slot:"")+"CBSv2",m=/^\/#[0-3]CBSv2\//;cb.onMessage=function(d){if("function"!==typeof d)throw new TypeError(d+" is not a function");h(function(h){var e=h.m.replace(/\s*/g,"").split("/"),k,r;3<e.length&&""===e[0]&&e[1]===b?(f&&p&&h.user===cb.room_slug&&(k=e[2],4===e.length?(e[3]="?",h.m=e.join("/")):6===e.length?((g||{}).hasOwnProperty(k)||(r=f(),g={},g[k]=a.btoa(a.unescape(a.encodeURIComponent(r))), r||cb.log("onSave returned no data.")),g.hasOwnProperty(k)&&(r=parseInt(e[3],10),k=g[k].slice(r,r+512),e[4]=k,e[5]=k.length,h.m=e.join("/"))):7===e.length&&("0"===e[3]&&(g={},g[k]=""),g.hasOwnProperty(k)&&(e[3]=g[k].length,e[6]=e[4].length,h.m=e.join("/"),e[4]?g[k]+=e[4]:(r=a.decodeURIComponent(a.escape(a.atob(g[k]))),p(r),cb.sendNotice("Previously Saved Data Restored.",cb.room_slug))))),h["X-Spam"]=!0):m.test(h.m)&&(h["X-Spam"]=!0);return d(h)});return d};cb.onRestore=function(a){if("function"!== typeof a)throw new TypeError(a+" is not a function");return p=a};cb.onSave=function(a){if("function"!==typeof a)throw new TypeError(a+" is not a function");return f=a};cb.onMessage(function(a){return a})})("undefined"===typeof exports?this:exports); // endof CBSv2 module - not for re-compilation /** Name: ElvenBot Author: ElvenDragon Creation Date: 12/15/15 Date Last Edited: 12/16/15 Live Verson: 0.6.5 Test Version: 0.2.2 Credits to: Ultra Bot by britney_and_justin (v1.11) No Grey Demands,Graphics,Stickykeys,Caps bot by badbadbubba (v2.0.5c) It's Raffle Time by mermmaids_couple **/ /** Purpose Room Control King Tip Leader Board Notifier Rotator The Nice List No Grey Demands Raffle Ticket tracking CB Save and Restore Enabled **/ //user settings { /** setting ==> result capsToggle ==> toggles the automatic toLower funciton for all caps messages invalidToggle ==> toggles the invalid command message tipTitles ==> toggles displaying the users' tips at the beginning of their messages kingTipper ==> toggle the King Tipper feature kingTipperSpam ==> toggles spamming "tip x to become king" every 5 minutes kingMin ==> minimum tip level for a user to be King kingTimer ==> interval for kingTipperSpam leaderBoard ==> toggles the Leader Board feature leaderBoardSpam ==> toggles spamming the top 3 tippers every 5 minutes leaderTimer ==> interval for leaderBoardSpam notiferEnter ==> toggle for message on enter enterMessage ==> message on enter notifierSpam ==> toggle for message on interval spamMessage ==> message on interval spamTimer ==> length of interval notifierTip ==> toggle for message on tip tipMessage ==> message on tip tipMessageMin ==> min tip for message silenceDefault ==> default silenceLevel niceList ==> list of users the host wants to guarantee voice and graphic privileges **/ cb.settings_choices = [ {name: 'color', label: 'Enter the six digit hex color code you would like to use for the background highlight.', type: 'str', minLength: 6, maxLength: 6, defaultValue: 'C287C2'}, {name: 'capsToggle', label: 'Would you like the bot to convert all capital messages to all lowercase messages?', type: 'choice', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes'}, {name: 'tipTitles', label: 'Do you want to display users\' tip totals as titles?', type: 'choice', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes'}, {name: 'kingTipper', label: 'Do you want to use the "King Tipper" feature?', type: 'choice', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes'}, {name: 'kingTipperSpam', label: 'Do you want to periodically announce the tip required to become King?', type: 'choice', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes'}, {name: 'kingMin', label: 'Enter the minimum tip level for a user to become King:', type: 'int', minValue: 1, maxValue: 1000000, defaultValue: 25}, {name: 'kingTimer', label: 'Change this value if you would like the King announcement to happen at a different interval:', type: 'int', minValue: 1, maxValue: 60, defaultValue: 5}, {name: 'leaderBoard', label: 'Would you like to use the Leader Board feature?', type: 'choice', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes'}, {name: 'leaderBoardSpam', label: 'Do you want to periodically announce the top three tippers?', type: 'choice', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes'}, {name: 'leaderTimer', label: 'Change this value if you would like the Leaderboard announcement to happen at a different interval:', type: 'int', minValue: 1, maxValue: 60, defaultValue: 5}, {name: 'notifierEnter', label: 'Would you like to display a message for users when they enter the room?', type: 'choice', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes'}, {name: 'enterMessage', label: 'Enter the message you would like to display.', type: 'str', minLength: 1, maxLength: 1000, defaultValue: 'Welcome to my room!'}, {name: 'notifierSpam', label: 'Would you like to periodicaly send a message to the room?', type: 'choice', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes'}, {name: 'spamMessage0', label: 'Enter the message you would like to display. Put 0 (zero) to skip', type: 'str', minLength: 1, maxLength: 1000, defaultValue: 'Be nice!'}, {name: 'spamMessage1', label: 'Enter the message you would like to display. Put 0 (zero) to skip', type: 'str', minLength: 1, maxLength: 1000, defaultValue: '0'}, {name: 'spamMessage2', label: 'Enter the message you would like to display. Put 0 (zero) to skip', type: 'str', minLength: 1, maxLength: 1000, defaultValue: '0'}, {name: 'spamMessage3', label: 'Enter the message you would like to display. Put 0 (zero) to skip', type: 'str', minLength: 1, maxLength: 1000, defaultValue: '0'}, {name: 'spamMessage4', label: 'Enter the message you would like to display. Put 0 (zero) to skip', type: 'str', minLength: 1, maxLength: 1000, defaultValue: '0'}, {name: 'spamTimer', label: 'Change this value if you would like the room announcement to happen at a different interval:', type: 'int', minValue: 1, maxValue: 60, defaultValue: 1}, {name: 'notifierTip', label: 'Would you like to display a message when a user tips?', type: 'choice', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes'}, {name: 'tipMessage', label: 'Enter the message you would like to display.', type: 'str', minLength: 1, maxLength: 1000, defaultValue: 'Thank you!'}, {name: 'tipMessageMin', label: 'Enter the minimum tip amount that you would like to trigger the message', type: 'int', minValue: 1, maxValue: 1000000, defaultValue: 10}, {name: 'silenceDefault', label: 'Enter the default Silence level', type: 'int', minValue: 0, maxValue: 3, defaultValue: 0}, {name: 'niceList', label: 'Enter the names of any users you would like to guarantee voice and graphic usage privileges, regardless of the silence and graphic levels, separated by commas and without spaces:', type: 'str', minLength: 1, maxLength: 1000, defaultValue: '', required: false}, {name: 'msgonentry', label: 'Display warning to greys on entry - set to no for busy rooms', type: 'choice', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes'}, {name: 'msgcolor', label: "Entry message color", type: 'str', minLength: 6, maxLength: 6, defaultValue: '000000'}, {name: 'mutehide', label: "Mute (replaces message) or hide (no notifications)", type: 'choice', choice1: 'Mute', choice2: 'Hide', defaultValue: 'Mute'}, {name: 're0', label: 'Mute demands (open/show/zoom/see/spread/touch & boobs/tits/ass/pussy/body/vagina/nipple)?', type: 'choice', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes'}, {name: 're1', label: 'Mute sticky keys (3+ repeating characters eg. mmmm)?', type: 'choice', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes'}, {name: 're2', label: 'Mute demand words (pm,c2c,private,pvt,prvt)?', type: 'choice', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes'}, {name: 're3', label: 'Mute spam words (streamingnaked,18f cam,18female,erotimo,amecam,goo)?', type: 'choice', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes'}, {name: 're4', label: 'Mute rude words (bitch,slut,whore,ugly,fat,pee,poo,peeing,fist,fart)?', type: 'choice', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes'}, {name: 're5', label: 'Mute baby words (bb,baby,daddy)?', type: 'choice', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes'}, {name: 're6', label: 'Mute feet words (feet,foot,soles,toes)?', type: 'choice', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes'}, {name: 're7', label: 'Mute non-english characters (cyrillic,arabic,chinese,accented)?', type: 'choice', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes'}, {name: 'raffleEnabled', label: "Use Raffle tracking?", type: 'choice', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes' }, {name: 'raffle_ticket_cost', label: "Raffle Ticket Cost", type:'int',minValue:1, maxValue:999, defaultValue:21} ]; } //variables { // Copy cb.settings to make it easer for S&R var ebcolor = cb.settings.color; var ebcapsToggle = cb.settings.capsToggle; var ebtipTitles = cb.settings.tipTitles; var ebkingTipper = cb.settings.kingTipper; var ebkingTipperSpam = cb.settings.kingTipperSpam; var ebkingMin = cb.settings.kingMin; var ebkingTimer = cb.settings.kingTimer; var ebleaderBoard = cb.settings.leaderBoard; var ebleaderBoardSpam = cb.settings.leaderBoardSpam; var ebleaderTimer = cb.settings.leaderTimer; var ebnotifierEnter = cb.settings.notifierEnter; var ebenterMessage = cb.settings.enterMessage; var ebnotifierSpam = cb.settings.notifierSpam; var ebspamArray = [cb.settings.spamMessage0, cb.settings.spamMessage1, cb.settings.spamMessage2, cb.settings.spamMessage3, cb.settings.spamMessage4] var ebspamTimer = cb.settings.spamTimer; var ebnotifierTip = cb.settings.notifierTip; var ebtipMessage = cb.settings.tipMessage; var ebtipMessageMin = cb.settings.tipMessageMin; var ebsilenceDefault = cb.settings.silenceDefault; var ebniceList = cb.settings.niceList; var ebmsgonentry = cb.settings.msgonentry; var ebmsgcolor = cb.settings.ebmsgcolor; var ebmutehide = cb.settings.mutehide; var ebreArray = [cb.settings.re0, cb.settings.re1, cb.settings.re2, cb.settings.re3, cb.settings.re4, cb.settings.re5, cb.settings.re6, cb.settings.re7]; var ebraffleEnabled = cb.settings.raffleEnabled; var ebraffle_ticket_cost = cb.settings.raffle_ticket_cost; /** Variable ==> Purpose tipperArray ==> [i][0] = User's name [i][1] = User's total tips this session numTippers ==> number of users who have given tips this session modArray ==> array of mods eModArray ==> [i] = User's name, list of users who have been given emergency mod powers numMods ==> number of moderators this session numEMods ==> number of users who have been given emergency mod powers this session niceArray ==> [i] = user's name, list of users who have been added to the nice list numNice ==> number of users who have been added to the nice list silenceArray ==> [i] = User's name, list of users who have been silenced numSilenced ==> number of users who have been added to the silence list silenceLevel ==> 0 = anyone can talk 1 = users with tips can talk, 2 users who have tipped can talk, 3 = users who have tipped >=10 can talk graphicLevel ==> 0 = anyone can use graphics 1 = users with tips can use graphics, 2 users who have tipped can use graphics, 3 = users who have tipped >=10 can use graphics timerRunning ==> Is the timer currently running (0 No, 1 Yes) timerSlice ==> Used to help keep proper timing timerStart ==> Amount of time the timer was set for, in minutes timerLeft ==> length of the timer remianing in minutes currentKing ==> holds the user name of the current king kingTip ==> holds the value of the king tipper's tip total kingTimer ==> user defined interval for king spam leaderArray ==> array that holds the top 3 tippers' names and tip totals leaderTimer ==> user defined interval for leader spam initialize ==> runs init() once only kingTipperSpam ==> facilitates command to toggle king tipper spam notifierSpamTGL ==> facilitates command to toggle notifier spam leaderboardSpam ==> facilitates command to toggle leaderboard spam notifierCount ==> Notifuer message number (0-4) that will be sent to the user. greyEnterMsg ==> rules message to to grays on enter MAX_REASONS ==> Max number of reasons for mute (grey no requests) MAX_CHECKS ==> Max number of checks to be made for mute (grey no requests) userArray ==> An array to hold raffle ticket info muteReasons ==> regexp of mute reasons (grey no requests) **/ var tipperArray = new Array; var numTippers = 0; var modArray = new Array; modArray[0] = cb.room_slug; var eModArray = new Array; var numMods = 1; var numEMods = 0; var niceArray = new Array; var numNice = 0; var silenceArray = new Array; var numSilenced = 0; var silenceLevel = 0; var graphicLevel = 1; var timerRunning = 0; var timerSlice = 0; var timerStart = 0; var timerLeft = 0; var currentKing = ''; var kingTip = 0; var kingTimer = 0; var leaderArray = [['',0],['',0],['',0]]; var leaderTimer = 0; var initialize = 0; var kingTipperSpam = 0; var kingTipperTrigger = 0; var notifierSpamTGL = 0; var leaderboardSpam = 0; var notifierCount = 0; var spamTimer = 0; var greyEnterMsg=''; var MAX_REASONS = 7; var MAX_CHECKS = 9; var userArray = []; var mainTime = 0; muteReasons = [ {regexp: /(?=.*\b(f?ck|finger|suck|show|zoom|open|see|touch|spread|lick)\b)(?=.*\b(body|ass|pussy|boobs?|bobs?|tits?|vagina|nipples?|breasts?|asshole|cock|penis|vagina|face)\b)/i, notice: 'demands', index: 0}, {regexp: /(.)\1{2}/, notice: 'sticky keys', index: 1}, {regexp: /((?=.*pm)|(?=.*c2c)|(?=.*private)|(?=.*pvt)|(?=.*prvt))/i, notice: 'PM requests', index: 2}, {regexp: /((?=.*1.?f cam)|(?=.*streamingnaked)|(?=.*1.?female)|(?=.*erotimo)|(?=.*amecam)|(?=.*1.? f)|(?=.*bestwork)|(?=.*p.*r.*e.*m.*i.*u.*m.*c.*h.*e.*a.*t)|(?=.*goo)|(?=.*ellagocam)|(?=.*visit this)|(?=.*fucktubate))/i, notice: 'spam', index: 3}, {regexp: /((?=.*bitch)|(?=.*slut)|(?=.*whore)|(?=.*ugly)|(?=.*fat)|(?=.*pee)|(?=.*poo)|(?=.*peeing)|(?=.*fist)|(?=.*fart))/i, notice: 'rudeness', index: 4}, {regexp: /((?=.*bb)|(?=.*baby)|(?=.*babby)|(?=.*daddy))/i, notice: 'bb or baby', index: 5}, {regexp: /((?=.*f.?e.?e.?t)|(?=.*f33t?)|(?=.*foot)|(?=.*soles?)|(?=.*toes?))/i, notice: 'feet', index: 6}, {regexp: /[^\x00-\x7F]+/, notice: 'non-english', index: 7}, {regexp: /(please|plz|pls|pleas).?.?$/i, notice: 'demands', index: 0}, {regexp: /((^mast.?rbate.?.?$)|(^squirt.?.?$)|(^kiss.?.?$)|(^cum.?.?$)|(^twerk.?.?$)|(^ass.?.?$)|(^boobs?.?.?$)|(^pussy.?.?$)|(^doggy.?.?$)|(^anal.?.?$)|(^zoom.?.?$)|(^show.?.?$)|(^tits?.?.?$)|(?=.*stand up.?.?)|(?=.*face.?.?)|(?=.*watch my cam.?.?)|(?=.*watch me.?.?))/i, notice: 'demands', index: 0}, ] //color codes { var purple = "#C287C2";//original color: #B369B3 } } //functions { /** Function ==> Purpose tipperArrayPopulate ==> adds tippers to the tipperArray findTipper ==> finds and returns the index of a user eModArrayPopulate ==> adds users to the eModArray niceArrayPopulate ==> adds users to the niceArray setSilenceLevel ==> called when /silencelevel is used. sets silenceLevel setGraphicLevel ==> called when /graphiclevel is used. sets graphiclevel silence ==> called when /silence is used. adds a user to the silenceArray unsilence ==> called when /unsilence is used. removes a user from the silenceArray startTimer ==> called when /starttimer is used. starts a timer for t minutes timer ==> called from startTimer. it's the actual timer fiveMinuteWarning ==> called from startTimer. if t > 5, sounds a warning at 5 minutes remaining oneMinuteWarning ==> called from startTimer. if t > 2, sounds a warning at 1 minute remaining timeLeft ==> called when /timeleft is used. sends the user a notice with the time remaining addTime ==> called when /addtime is used. adds t minutes to the timer, if one is running sendWhisper ==> called when /whisper or an alias of /whisper is used. sends a private message to a user in chat ignoreUser ==> called when /ignore is used. adds a member to the user's ignore list unignoreUser ==> called when /unignore is used. removes a member from the user's ignore list setIgnoreLevel ==> called when /ignorelevel is used. sets ignoreLevel for the user setTipTitles ==> called from onMessage. appends the user's tips to the beginning of the message eMod ==> called when /emod is used. adds or removes a user from the eModArray kingSpam ==> spams "tip x to be king" every 5 minutes if the user setting allows it kingSpamTimer ==> the actual timer for kingSpam leaderSpam ==> spams the leaderboard every 5 minutes leaderSpamTimer ==> the actual timer for leaderSpam showLeaderBoard ==> called when /leaderboard is used. shows the leaderboard notifierSpam ==> called from init, starts the timer for notifer spam notiferSpamTimer ==> the actual timer for notifierSpam nice ==> called from /addnice and /removenice. adds and removes users from the niceArray kingSpamToggle ==> called when /kingspam is used. toggles the spam notifierSpamToggle ==> called when /notifierspam is used. toggles the spam colorChecker ==> verifies the color code is valid **/ { function tipperArrayPopulate(user) { tipperArray[numTippers] = new Array; tipperArray[numTippers][0] = user; tipperArray[numTippers][1] = 0; numTippers++; } function findTipper(user) { //find the index of the user for(var i = 0; i < tipperArray.length; i++) { if(tipperArray[i][0] == user) { break; } } //the user is not in the array. add him and call findTipper if(i == tipperArray.length) { tipperArrayPopulate(user); findTipper(user); } return i; } function modArrayPopulate(user) { modArray[numMods] = user; numMods++; } function eModArrayPopulate(user) { eModArray[numEMods] = user; numEMods++; } function niceArrayPopulate(user) { niceArray[numNice] = user; numNice++; } function silenceArrayPopulate(user) { silenceArray[numSilenced] = user; numSilenced++; } function setSilenceLevel(s, mod) { if(parseInt(s) >= 0 && parseInt(s) <= 3) { silenceLevel = parseInt(s); cb.sendNotice("The silence level has been set to " + s + ".", cb.room_slug, purple); cb.sendNotice("The silence level has been set to " + s + ".", "", purple, "", "", 'red'); switch(parseInt(s)) { case 0: cb.sendNotice('All members can talk in chat.',cb.room_slug,purple); cb.sendNotice('All members can talk in chat.',"",purple,"","",'red'); break; case 1: cb.sendNotice('Only members with tokens can talk in chat.',cb.room_slug,purple); cb.sendNotice('Only members with tokens can talk in chat.',"",purple,"","",'red'); break; case 2: cb.sendNotice('Only members who have tipped can talk in chat.',cb.room_slug,purple); cb.sendNotice('Only members who have tipped can talk in chat.',"",purple,"","",'red'); break; case 3: cb.sendNotice('Only members who have tipped at least 10 tokens can talk in chat.',cb.room_slug,purple); cb.sendNotice('Only members who have tipped at least 10 tokens can talk in chat.',"",purple,"","",'red'); break; } } else { cb.sendNotice(s + ' is not a valid setting.\nType "/ebhelp silencelevel" to see how to use /silencelevel.',mod,purple); } } function setGraphicLevel(s, mod) { if(parseInt(s) >= 0 && parseInt(s) <= 3) { graphicLevel = parseInt(s); cb.sendNotice('The graphic level has been set to ' + s + '.',cb.room_slug,purple); cb.sendNotice('The graphic level has been set to ' + s + '.',"",purple,"","",'red'); switch(parseInt(s)) { case 0: cb.sendNotice('All members can use graphics in chat.',cb.room_slug,purple); cb.sendNotice('All members can use graphics in chat.',"",purple,"","",'red'); break; case 1: cb.sendNotice('Only members with tokens can use graphics in chat.',cb.room_slug,purple); cb.sendNotice('Only members with tokens can use graphics in chat.',"",purple,"","",'red'); break; case 2: cb.sendNotice('Only members who have tipped can use graphics in chat.',cb.room_slug,purple); cb.sendNotice('Only members who have tipped can use graphics in chat.',"",purple,"","",'red'); break; case 3: cb.sendNotice('Only members who have tipped at least 10 tokens can use graphics in chat.',cb.room_slug,purple); cb.sendNotice('Only members who have tipped at least 10 tokens can use graphics in chat.',"",purple,"","",'red'); break; } } else { cb.sendNotice(s + ' is not a valid setting.\nType "/ebhelp graphiclevel" to see how to use /graphiclevel.',mod,purple); } } function silence(user, mod) { if(cbjs.arrayContains(silenceArray,user)) { cb.sendNotice(user + ' has already been silenced.',mod,purple); } else { silenceArrayPopulate(user); cb.sendNotice(mod + ' has silenced ' + user + '.','',purple,'','','red'); } } function unsilence(user, mod) { if(cbjs.arrayContains(silenceArray,user)) { cbjs.arrayRemove(silenceArray,user); cb.sendNotice(mod + ' has unsilenced ' + user + '.','',purple,'','','red'); cb.sendNotice('You have been unsilenced by ' + mod + '. Be nice and don\'t make demands. :smile',user,purple); } else { cb.sendNotice(user + ' does not need to be unsilenced.',mod,purple); } } function startTimer(t, mod) { //there is no timer already running if(timerRunning == 0) { //verify a valid option was sent with /starttimer if(t >= 0 && t.toString().indexOf('.') == -1) { timerStart = t; //notice of timer start if(mod != null) { cb.sendNotice(mod + ' has set a timer for ' + timerStart + ' minutes!','',purple); if(mainTime > 59) timerSlice = 0; else timerSlice = mainTime; timerLeft = timerStart; timerRunning = 1; } } else if(t != null) { cb.sendNotice(t + ' is not a valid option for /starttimer.\nType /ebhelp starttimer to see how to use /starttimer.',mod,purple); } else if(t == null) { cb.sendNotice('You did not enter a valid option for /starttimer.\nType /ebhelp starttimer to see how to use /starttimer.',mod,purple); } } else { cb.sendNotice('There is a timer running already.',mod,purple); } } function timeLeft(user) { if(timerRunning == 1) { //local variable for the current time var minutes = timerLeft; var seconds = timerSlice - mainTime; if(seconds == 60) { seconds = 0; minutes++; } else if(seconds < 0) { seconds = seconds + 60; minutes--; } var hours = minutes/60; hours = Math.floor(hours); minutes = (minutes-(hours*60)); if(hours > 0) { if(hours > 9) { if(minutes > 9 && seconds > 9) { cb.sendNotice('Time Remaining: ' + hours + ':' + minutes + ':' + seconds,user,purple); } else if(minutes > 9 && seconds <= 9) { cb.sendNotice('Time Remaining: ' + hours + ':' + minutes + ':0' + seconds,user,purple); } else if(minutes <= 9 && seconds > 9) { cb.sendNotice('Time Remaining: ' + hours + ':' + minutes + ':' + seconds,user,purple); } else if(minutes <= 9 && seconds <= 9) { cb.sendNotice('Time Remaining: ' + hours + ':' + minutes + ':0' + seconds,user,purple); } } else { if(minutes > 9 && seconds > 9) { cb.sendNotice('Time Remaining: 0' + hours + ':' + minutes + ':' + seconds,user,purple); } else if(minutes > 9 && seconds <= 9) { cb.sendNotice('Time Remaining: 0' + hours + ':' + minutes + ':0' + seconds,user,purple); } else if(minutes <= 9 && seconds > 9) { cb.sendNotice('Time Remaining: 0' + hours + ':' + minutes + ':' + seconds,user,purple); } else if(minutes <= 9 && seconds <= 9) { cb.sendNotice('Time Remaining: 0' + hours + ':' + minutes + ':0' + seconds,user,purple); } } } else if(hours == 0 && minutes > 0) { if(minutes > 9 && seconds > 9) { cb.sendNotice('Time Remaining: 00:' + minutes + ':' + seconds,user,purple); } else if(minutes > 9 && seconds <= 9) { cb.sendNotice('Time Remaining: 00:' + minutes + ':0' + seconds,user,purple); } else if(minutes <= 9 && seconds > 9) { cb.sendNotice('Time Remaining: 00:0' + minutes + ':' + seconds,user,purple); } else if(minutes <= 9 && seconds <= 9) { cb.sendNotice('Time Remaining: 00:0' + minutes + ':0' + seconds,user,purple); } } else if(hours == 0 && minutes == 0 && seconds > 0) { if(seconds > 9) { cb.sendNotice('Time Remaining: 00:00' + ':' + seconds,user,purple); } else { cb.sendNotice('Time Remaining: 00:00' + ':0' + seconds,user,purple); } } else { cb.sendNotice('hours: ' + hours + '\nminutes: ' + minutes + '\nseconds: ' + seconds); } } else { cb.sendNotice('There is no timer running.',user,purple); } } function addTime(t, mod) { if(t > 0 && t.toString().indexOf('.') == -1) { if(timerRunning == 1) { var timeAdded = parseInt(t); timerLeft = timeLeft + timeAdded; //notice of timer start if(timeAdded == 1) { cb.sendNotice(mod + ' has has added 1 minute to the timer!','',purple); } else { cb.sendNotice(mod + ' has has added ' + timeAdded + ' minutes to the timer!','',purple); } } else { cb.sendNotice('There is no timer running.',mod,purple); } } else if(t != null) { cb.sendNotice(t + ' is not a valid option for /addtime.\nType /ebhelp addtime to see how to use /addtime.',mod,purple); } else if(t == null) { cb.sendNotice('You did not enter a valid option for /addtime.\nType /ebhelp addtime to see how to use /addtime.',mod,purple); } } function setTipTitles(user, message) { if(ebkingTipper == 'Yes' && user == currentKing) { var m = ':smallCrown |' + tipperArray[findTipper(user)][1] + '| ' + message; } else { var m = '|' + tipperArray[findTipper(user)][1] + '| ' + message; } return m; } function eMod(ar,user,from) { if(ar == 'add') { if(!cbjs.arrayContains(eModArray,user)) { eModArrayPopulate(user); cb.sendNotice('Emergency moderator powers have been granted to ' + user,from,purple); cb.sendNotice('You have been granted emergency moderator powers by ' + from,user,purple); } else { cb.sendNotice(user + ' has already been granted emergency moderator powers.',from,purple); } } else if(ar == 'remove') { if(cbjs.arrayContains(eModArray,user)) { cbjs.arrayRemove(eModArray,user); cb.sendNotice('Emergency moderator powers have been removed from ' + user,from,purple); cb.sendNotice('Your emergency moderator powers have been removed by ' + from,user,purple); } else { cb.sendNotice(user + ' has not been granted emergency moderator powers.',from,purple); } } else { cb.sendNotice(ar + ' is not a valid option for /emod. Type /ebhelp emod to see how to use /emod.',from,purple); } } function help(option,from) { var valid = 0; if(option == null){option = '';} switch(option) { case '': { valid = 1; cb.sendNotice ( 'Elven Bot Help Menu' ,from,purple ); cb.sendNotice ( 'Type /ebhelp x, where x is one of the following choices, for more detailed information.' + '\nEx: /ebhelp commands' ,from ); cb.sendNotice ( '' ,from,purple ); cb.sendNotice ( 'commands\n' + 'nicelist\n' ,from ); cb.sendNotice ( '' ,from,purple ); break; } case 'commands': { valid = 1; cb.sendNotice ('Elven Bot Command List' ,from,purple ); cb.sendNotice ( 'Type /ebhelp x, where x is one of the following commands, for more detailed information.' + '\nEx: /ebhelp silencelevel' ,from ); cb.sendNotice ( '' ,from,purple ); cb.sendNotice ( '/silencelevel' + '\n/graphiclevel' + '\n/silence' + '\n/unsilence' + '\n/starttimer' + '\n/addtime' + '\n/timeleft' + '\n/emod' + '\n/addnice' + '\n/removenice' + '\n/leaderboard' + '\n/kingspam' + '\n/notifierspam' + '\n/ebhelp' ,from ); cb.sendNotice ( '' ,from,purple ); break; } case 'nicelist': { cb.sendNotice ('The Nice List' ,from,purple ); cb.sendNotice ( 'Sometimes, there are users whose comments are desirable, but they either do not have tokens or do not tip frequently. ' + 'When rooms get rowdy, hosts and mods are forced to do things like silence users without tokens or who have not tipped and those groups often includes the users whose comments hosts would like to see. ' + 'To fix this problem, hosts and mods can add users to the Nice List. ' + 'Users who are on the nice list can send messages regardless of the global silence setting.' ,from ); cb.sendNotice ( '' ,from,purple ); valid = 1; break; } case 'silencelevel': { valid = 1; cb.sendNotice ('/silencelevel Help' ,from,purple ); cb.sendNotice ( '/silencelevel is a command that is usable by moderators and room hosts.' + '\nThe syntax for using silencelevel is "/silencelevel x", where x is a number between 0 and 3.' + '\nSetting the Silence Level to 0 will grant voice privileges to all users, ' + 'setting it to 1 will revoke voice privileges from users without tokens, ' + 'setting it to 2 will revoke voice privileges from users who have not tipped, ' + 'and setting it to 3 will revoke voice privileges from users who have not tipped at least 10 tokens.' + '\nThe default setting for /silencelevel is 0.' + '\nRoom hosts, moderators, and fan club members are unaffected by the Silence Level.' ,from ); cb.sendNotice ( '' ,from,purple ); break; } case 'graphiclevel': { valid = 1; cb.sendNotice ('/graphiclevel Help' ,from,purple ); cb.sendNotice ( '/graphiclevel is a command that is usable by moderators and room hosts.' + '\nThe syntax for using graphiclevel is "/graphiclevel x", where x is a number between 0 and 3.' + '\nSetting the Graphic Level to 0 will grant graphic usage privileges to all users, ' + 'setting it to 1 will revoke graphic usage privileges from users without tokens, ' + 'setting it to 2 will revoke graphic usage privileges from users who have not tipped, ' + 'and setting it to 3 will revoke graphic usage privileges from users who have not tipped at least 10 tokens.' + '\nThe default setting for /graphiclevel is 0.' + '\nRoom hosts, moderators, and fan club members are unaffected by the Graphic Level.' ,from ); cb.sendNotice ( '' ,from,purple ); break; } case 'silence': { valid = 1; cb.sendNotice ('/silence Help' ,from,purple ); cb.sendNotice ( '/silence is a command that is usable by moderators and room hosts.' + '\nThe syntax for using silence is "/silence x", where x is the username of the user you want to silence.' + '\nThe effect of /silence is the same as Chaturbate\'s silence feature, ' + 'except that it lasts for the duration of the current session instead of for six hours.' + '\nThe effect of /silence can be reversed by using the command /unsilence.' ,from ); cb.sendNotice ( '' ,from,purple ); break; } case 'unsilence': { valid = 1; cb.sendNotice ('/unsilence Help' ,from,purple ); cb.sendNotice ( '/unsilence is a command that is usable by moderators and room hosts.' + '\nThe syntax for using unsilence is "/unsilence x", where x is the username of the user you want to unsilence.' + '\nunsilence simply grants voice privileges back to a user who was previously silenced.' + '\nNOTE: /unsilence WILL NOT undo the effect of Chaturbate\'s silence feature!' + '\n/unsilence WILL ONLY reverse the effect of /silence!' ,from ); cb.sendNotice ( '' ,from,purple ); break; } case 'starttimer': { valid = 1; cb.sendNotice ('/starttimer Help' ,from,purple ); cb.sendNotice ( '/starttimer is a command that is usable by moderators and room hosts.' + '\nThe syntax for using starttimer is "/starttimer x", where x is the desired duration of the timer in minutes.' + '\n/starttimer will accept whole numbers only.' + '\nThe timer will make announcements at five minutes remaining and at one minute remaining.' + '\n/addtime can be used to add time to a currently running timer.' + '\n/timeleft can be used to display the amount of time remaining on the timer.' ,from ); cb.sendNotice ( '' ,from,purple ); break; } case 'addtime': { valid = 1; cb.sendNotice ('/addtime Help' ,from,purple ); cb.sendNotice ( '/addtime is a command that is usable by moderators and room hosts.' + '\nThe syntax for using addtime is "/addtime x", where x is the amount of time you want to add in minutes.' + '\n/addtime will accept whole numbers only.' + '\nSee the help section for starttimer for more information on timers.' ,from ); cb.sendNotice ( '' ,from,purple ); break; } case 'timeleft': { valid = 1; cb.sendNotice ('/timeleft Help' ,from,purple ); cb.sendNotice ( '/timeleft is a command that is usable by everyone.' + '\nThe syntax for using timeleft is /timeleft' + '\n/timeleft will display the amount of time left on the timer in the format 00:00:00' + '\nSee the help section for starttimer for more information on timers.' ,from ); cb.sendNotice ( '' ,from,purple ); break; } case 'emod': { valid = 1; cb.sendNotice ('/emod Help' ,from,purple ); cb.sendNotice ( '/emod is a command that is usable by moderators and room hosts.' + '\nThe syntax for using emod is "/emod x y", where x is either "add" or "remove" and y is the username of the user you want to either grant or revoke emergency moderator powers.' + '\n/emod allows moderators to quickly grant other users access to moderator-only commands in the event that he is having difficulty controlling the room by himself.' + '\nEmergency moderators have access to all moderator-only commands with the exceptions of /emod, /addnice, and /removenice.' ,from ); cb.sendNotice ( '' ,from,purple ); break; } case 'addnice': { valid = 1; cb.sendNotice ('/addnice Help' ,from,purple ); cb.sendNotice ( '/addnice is a command that is usable by moderators and room hosts.' + '\nThe syntax for using addnice is "/addnice x", where x is the username of the user you want to add to the nice list.' + '\nAdding a user to the nice list guarantees that user voice and graphic usage privileges regardless of the silence, graphic, and ignore level settings. ' + 'Using /silence or /ignore will still silence or ignore a user on the nice list.' + '\nUsers can be removed from the nice list by using the command /removenice.' + '\nSee the help sections for silencelevel, graphiclevel, and ignorelevel for more information on the global settings or the help section for nicelist for more information on the nice list.' ,from ); cb.sendNotice ( '' ,from,purple ); break; } case 'removenice': { valid = 1; cb.sendNotice ('/removenice Help' ,from,purple ); cb.sendNotice ( '/removenice is a command that is usable by moderators and room hosts.' + '\nThe syntax for using removenice is "/removenice x", where x is the username of the user you want to remove from the nice list.' + '\nSee the help section for nicelist for more information on the nice list.' ,from ); cb.sendNotice ( '' ,from,purple ); break; } case 'ebhelp': { valid = 1; cb.sendNotice ('/ebhelp Help' ,from,purple ); cb.sendNotice ( '/ebhelp is a command that is usable by everyone.' + '\nThe syntax for using ebhelp is "/ebhelp x", where x is the subsection of the help menu that you want to access.' ,from ); cb.sendNotice ( '' ,from,purple ); break; } case 'leaderboard': { valid = 1; cb.sendNotice ('/leaderboard Help' ,from,purple ); cb.sendNotice ( '/leaderboard is a command that is usable by everyone.' + '\nThe syntax for using leaderboard is "/leaderboard".' + '\n/leaderboard shows the top 3 tippers of the current session.' ,from ); cb.sendNotice ( '' ,from,purple ); break; } case 'kingspam': { valid = 1; cb.sendNotice ('/kingspam Help' ,from,purple ); cb.sendNotice ( '/kingspam is a command that is usable by moderators and room hosts.' + '\nThe syntax for using kingspam is /kingspam x, where x is either on or off. ' + 'Using this command toggles the spamming of the message "Tip x to become the new King!"' ,from ); cb.sendNotice ( '' ,from,purple ); break; } case 'notifierspam': { valid = 1; cb.sendNotice ('/notifierspam Help' ,from,purple ); cb.sendNotice ( '/notifierspam is a command that is usable by moderators and room hosts.' + '\nThe syntax for using notifierspam is /notifierspam x, where x is either on or off. ' + 'Using this command toggles the spamming of the periodic message defined by the host.' ,from ); cb.sendNotice ( '' ,from,purple ); break; } case 'leaderboardspam': { valid = 1; cb.sendNotice ('/leaderboardspam Help' ,from,purple ); cb.sendNotice ( '/leaderboardspam is a command that is usable by moderators and room hosts.' + '\nThe syntax for using leaderboardspam is /leaderboardspam x, where x is either on or off. ' + 'Using this command toggles the spamming of the top three tippers.' ,from ); cb.sendNotice ( '' ,from,purple ); break; } } if(valid == 0) { cb.sendNotice(option + ' is not a valid subsection of the help menu. Type /ebhelp to access the main help menu.',from,purple); } } function startMainTimer() { // Ticks Every second cb.setTimeout(mainTimer,1000); } function mainTimer() { var supplant, noticespam; mainTime++; if(timerRunning == 1 && timerSlice == mainTime) { timerLeft--; if(timerLeft < 1) { timerRunning = 0; cb.sendNotice(':timesup Timer had ended!!','',purple); } if(timerLeft == 30 || timerLeft == 25 || timerLeft == 20 || timerLeft == 15 || timerLeft == 10 || (timerLeft < 5 && timerLeft > 0)) { cb.sendNotice(timerLeft + ' minute(s) remaining!','',purple); } } if(mainTime > 59) { // Decrease all counters kingTimer--; leaderTimer--; spamTimer--; // King Tipper if(kingTipperSpam == 1 && kingTimer < 1) { if(kingTip < parseInt(ebkingMin)) supplant = ebkingMin; else supplant = kingTip + 1; cb.sendNotice('Tip ' + supplant + ' to become the new King!','',purple); kingTimer = ebkingTimer; } // Leader Board if(leaderboardSpam == 1 && leaderTimer < 1) { cb.sendNotice('Leaderboard!','',purple); cb.sendNotice(leaderArray[0][0] + ' : ' + leaderArray[0][1] + '\n' + leaderArray[1][0] + ' : ' + leaderArray[1][1] + '\n' + leaderArray[2][0] + ' : ' + leaderArray[2][1]); cb.sendNotice('','',purple); leaderTimer = ebleaderTimer; } // Notifier if(notifierSpamTGL == 1 && spamTimer < 1) { if((notifierCount < 0) || (notifierCount > 4) ) notifierCount = 0; noticespam = ebspamArray[notifierCount]; if(noticespam != '0') cb.sendNotice(noticespam,'',purple); notifierCount++; spamTimer = parseInt(ebspamTimer); } mainTime = 0; } startMainTimer(); } function showLeaderBoard(from) { if(ebleaderBoard == 'Yes') { cb.sendNotice ( 'Leaderboard!' ,from,purple ); cb.sendNotice ( leaderArray[0][0] + ' : ' + leaderArray[0][1] + '\n' + leaderArray[1][0] + ' : ' + leaderArray[1][1] + '\n' + leaderArray[2][0] + ' : ' + leaderArray[2][1] ,from); cb.sendNotice ( '' ,from,purple); } else { cb.sendNotice('The room host has decided not to use the Leaderboard feature.',from,purple); } } function nice(user,mod,ar) { if(ar == 'a') { if(!cbjs.arrayContains(niceArray,user)) { niceArrayPopulate(user); cb.sendNotice('You have added ' + user + ' to the nice list.', mod, purple); cb.sendNotice(mod + ' has added you to the nice list. You will be able to chat and use graphcs regardless of the global room settings. Thank you for being nice!',user,purple); } else { cb.sendNotice(user + ' is already on the nice list.', mod, purple); } } else if(ar == 'r') { if(cbjs.arrayContains(niceArray,user)) { cbjs.arrayRemove(niceArray,user); cb.sendNotice('You have removed ' + user + ' from the nice list.', mod, purple); cb.sendNotice(mod + ' has removed you from the nice list.', user, purple); } else { cb.sendNotice(user + ' is not on the nice list.', mod, purple); } } } function kingSpamToggle(option, mod) { if(option == 'on') { if(kingTipperSpam == 1) { cb.sendNotice('The King Tipper spam is already turned on.',mod,purple); } else { kingTipperSpam == 1; cb.sendNotice('You have turned on King Tipper spam.',mod,purple); } } else if(option == 'off') { if(kingTipperSpam == 0) { cb.sendNotice('The King Tipper spam is already turned off.',mod,purple); } else { kingTipperSpam == 0; cb.sendNotice('You have turned off the King Tipper spam.',mod,purple); } } else if(option != null) { cb.sendNotice(option + ' is not a valid option for /kingspam.\nType /ebhelp kingspam to see how to use /kingspam.',mod,purple); } else if(option == null) { cb.sendNotice('You did not enter a valid option for /kingspam.\nType /ebhelp kingspam to see how to use /kingspam.',mod,purple); } } function notifierSpamToggle(option, mod) { if(option == 'on') { if(notifierSpamTGL == 1) { cb.sendNotice('The Notifier spam is already turned on.',mod,purple); } else { notifierSpamTGL == 1; cb.sendNotice('You have turned on the Notifier spam.',mod,purple); } } else if(option == 'off') { if(notifierSpamTGL == 0) { cb.sendNotice('The Notifier spam is already turned off.',mod,purple); } else { notifierSpamTGL == 0; cb.sendNotice('You have turned off the Notifier spam.',mod,purple); } } else if(option != null) { cb.sendNotice(option + ' is not a valid option for /notifierspam.\nType /ebhelp notifierspam to see how to use /notifierspam.',mod,purple); } else if(option == null) { cb.sendNotice('You did not enter a valid option for /notifierspam.\nType /ebhelp notifierspam to see how to use /notifierspam.',mod,purple); } } function leaderboardSpamToggle(option, mod) { if(option == 'on') { if(leaderboardSpam == 1) { cb.sendNotice('The Leaderboard spam is already turned on.',mod,purple); } else { leaderboardSpam == 1; cb.sendNotice('You have turned on the Leaderboard spam.',mod,purple); } } else if(option == 'off') { if(leaderboardSpam == 0) { cb.sendNotice('The Leaderboard spam is already turned off.',mod,purple); } else { leaderboardSpam == 0; cb.sendNotice('You have turned off the Leaderboard spam.',mod,purple); } } else if(option != null) { cb.sendNotice(option + ' is not a valid option for /leaderboardspam.\nType /ebhelp leaderboardspam to see how to use /leaderboardspam.',mod,purple); } else if(option == null) { cb.sendNotice('You did not enter a valid option for /leaderboardspam.\nType /ebhelp leaderboardspam to see how to use /leaderboardspam.',mod,purple); } } function colorChecker() { var colorString = '0123456789abcdefABCDEF'; var valid = true; var color = "C287C2"; if(ebcolor != null) { color = ebcolor; } for(var i = 0; i < 6; i++) { if(colorString.indexOf(color.charAt(i)) == -1) { valid = false; } if(valid == false) { purple = '#C287C2'; cb.sendNotice(color + ' is not a valid option for the highlight color. Hex color codes use numbers and letters only.\nUse www.color-hex.com to find the code for the color you want.\nDo not include the #.\nReverting to default color.',cb.room_slug,purple); break; } } if(valid) { purple = '#' + ebcolor; } } function onEnterMsg() { var EnterMsg=''; for (i=0; i<= MAX_REASONS; i++) { if (ebreArray[i] == 'Yes') { EnterMsg += 'No ' + muteReasons[i].notice + ', '; } } cb.sendNotice('Enter Message set to: ' + EnterMsg, cb.room_slug, purple); return EnterMsg; } /* * return array of users with the new user added, duplicate, * or error string. * Req: userArray = array of users to add the new user to * Req: username = username of new user * Return: array of users with new users added * On error: return "duplicate" if username in user array already * On error: return "failed" if user no duplicate and wasn't added */ function addUser(userArray, username,ticketsBought) { var userArrayLength = userArray.length; username = username.toLowerCase(); //cb.chatNotice(userArray.length); // check if username is in userarray usernameExists = userInArray(userArray, username); if (usernameExists === true) { for(i=0; i < userArray.length; i++) { if(userArray[i].username== username) { userArray[i].tickets += ticketsBought; } } return userArray; // username found in array, return duplicate } else { // remove user from all user arrays //delUserFromAll(username); // add username to array //cb.chatNotice(userArrayLength); var valueToPush = { }; // or "var valueToPush = new Object();" which is the same valueToPush["username"] = username; valueToPush["tickets"] = ticketsBought; valueToPush["email"] = ''; userArray.push(valueToPush); // check to see that addition of user worked usernameExists = userInArray(userArray, username); if (usernameExists === true) { return userArray; // it worked, return the array } else { return "failed"; // failed, return failed } } } function userInArray(userArray, username) { var userFound = false; username = username.toLowerCase(); if (userArray.length > 0) { for(i=0; i < userArray.length; i++) { if(userArray[i].username== username) { userFound = true; } } } return userFound; } function showRaffleTickets(from) { var msg = "##### RAFFLE TICKET PURCHASERS #####"; msg += "\nList sorted in chronological order"; for (var i = 0; i < userArray.length; i++) msg += "\n" + userArray[i].username + ": " + userArray[i].tickets + " tickets " + userArray[i].email; cb.sendNotice(msg, from, '#FFF0DE', '#8A4900', 'bold'); } } } //onMessage { cb.onMessage(function (msg) { //turn the message into an array var message = msg['m'].split(' '); //0 = invalid command, 1 = valid command var cmd = 0; //1 = user is already silenced var silenced = 0; var symbolString = '~`!@#$%^&*()_-+={[}]|\\:;"\'<,>.?/'; //check to see if the user is attempting to use a command if(message[0].charAt(0) == '/') { //don't print this message to chat msg['X-Spam'] = true; switch(message[0]) { case '/rafflemail': { //user entered a proper command cmd = 1; if(ebraffleEnabled == 'Yes') { if (userInArray(userArray, msg['user']) === true) { for(i=0; i < userArray.length; i++) { if(userArray[i].username== msg['user']) { userArray[i].email = msg['m'].substring(14); cb.sendNotice('******\nThank you for adding your email for notification!', msg['user'], '#FFF0DE', '#8A4900', 'bold'); } } } } else { cb.sendNotice('******\nRaffle is not currently enabled, so there is no need to enter your e-mail address currently.', msg['user'], '#FFF0DE', '#8A4900', 'bold'); } break; } case '/raffle_list': { cmd = 1; //permission check if(msg['is_mod'] || msg['user'] == cb.room_slug || cbjs.arrayContains(eModArray,msg['user'])) { showRaffleTickets(msg['user']); } else { cb.sendNotice('Only moderators and broadcasters are able to use that command.\nType "/ebhelp commands" to see a full list of the available commands.',msg['user'],purple); } break; } case '/silencelevel': { //user entered a proper command cmd = 1; //permission check if(msg['is_mod'] || msg['user'] == cb.room_slug || cbjs.arrayContains(eModArray,msg['user'])) { setSilenceLevel(message[1], msg['user']); } else { cb.sendNotice('Only moderators and broadcasters are able to use that command.\nType "/ebhelp commands" to see a full list of the available commands.',msg['user'],purple); } break; } case '/graphiclevel': { //user entered a proper command cmd = 1; //permission check if(msg['is_mod'] || msg['user'] == cb.room_slug || cbjs.arrayContains(eModArray,msg['user'])) { setGraphicLevel(message[1], msg['user']); } else { cb.sendNotice('Only moderators and broadcasters are able to use that command.\nType "/ebhelp commands" to see a full list of the available commands.',msg['user'],purple); } break; } case '/silence': { //user entered a proper command cmd = 1; //permission check if(msg['is_mod'] || msg['user'] == cb.room_slug || cbjs.arrayContains(eModArray,msg['user'])) { silence(message[1], msg['user']); } else { cb.sendNotice('Only moderators and broadcasters are able to use that command.\nType "/ebhelp commands" to see a full list of the available commands.',msg['user'],purple); } break; } case '/unsilence': { //user entered a proper command cmd = 1; //permission check if(msg['is_mod'] || msg['user'] == cb.room_slug || cbjs.arrayContains(eModArray,msg['user'])) { unsilence(message[1], msg['user']); } else { cb.sendNotice('Only moderators and broadcasters are able to use that command.\nType "/ebhelp commands" to see a full list of the available commands.',msg['user'],purple); } break; } case '/starttimer': { //user entered a proper command cmd = 1; //permission check if(msg['is_mod'] || msg['user'] == cb.room_slug || cbjs.arrayContains(eModArray,msg['user'])) { startTimer(message[1], msg['user']); } else { cb.sendNotice('Only moderators and broadcasters are able to use that command.\nType "/ebhelp commands" to see a full list of the available commands.',msg['user'],purple); } break; } case '/addtime': { //user entered a proper command cmd = 1; //permission check if(msg['is_mod'] || msg['user'] == cb.room_slug || cbjs.arrayContains(eModArray,msg['user'])) { addTime(message[1], msg['user']); } else { cb.sendNotice('Only moderators and broadcasters are able to use that command.\nType "/ebhelp commands" to see a full list of the available commands.',msg['user'],purple); } break; } case '/timeleft': { //user entered a proper command cmd = 1; timeLeft(msg['user']); break; } case '/emod': { //user entered a proper command cmd = 1; if(msg['is_mod'] || msg['user'] == cb.room_slug) { eMod(message[1],message[2],msg['user']); } else { cb.sendNotice('Only moderators and broadcasters are able to use that command.\nType "/ebhelp commands" to see a full list of the available commands.',msg['user'],purple); } break; } case '/addnice': { //user entered a proper command cmd = 1; if(msg['is_mod'] || msg['user'] == cb.room_slug) { nice(message[1],msg['user'],'a'); } break; } case '/removenice': { //user entered a proper command cmd = 1; if(msg['is_mod'] || msg['user'] == cb.room_slug) { nice(message[1],msg['user'],'r'); } break; } case '/ebhelp': { //user entered a proper command cmd = 1; help(message[1],msg['user']); break; } case '/leaderboard': { //user entered a proper command cmd = 1; showLeaderBoard(msg['user']); break; } case '/kingspam': { //user entered a proper command cmd = 1; //permission check if(msg['is_mod'] || msg['user'] == cb.room_slug || cbjs.arrayContains(eModArray,msg['user'])) { kingSpamToggle(message[1],msg['user']) } else { cb.sendNotice('Only moderators and broadcasters are able to use that command.\nType "/ebhelp commands" to see a full list of the available commands.',msg['user'],purple); } break; } case '/notifierspam': { //user entered a proper command cmd = 1; //permission check if(msg['is_mod'] || msg['user'] == cb.room_slug || cbjs.arrayContains(eModArray,msg['user'])) { notifierSpamToggle(message[1],msg['user']) } else { cb.sendNotice('Only moderators and broadcasters are able to use that command.\nType "/ebhelp commands" to see a full list of the available commands.',msg['user'],purple); } break; } case '/leaderboardspam': { //user entered a proper command cmd = 1; //permission check if(msg['is_mod'] || msg['user'] == cb.room_slug || cbjs.arrayContains(eModArray,msg['user'])) { leaderboardSpamToggle(message[1],msg['user']) } else { cb.sendNotice('Only moderators and broadcasters are able to use that command.\nType "/ebhelp commands" to see a full list of the available commands.',msg['user'],purple); } break; } case '/nm0': { //user entered a proper command cmd = 1; //permission check if(msg['is_mod'] || msg['user'] == cb.room_slug || cbjs.arrayContains(eModArray,msg['user'])) { if(message[1] == '' || message[1] == null) { cb.sendNotice('You must enter a new message for the notifier feature. If you want to disable the notifications, enter /notifierspam off.',msg['user'],purple) } else { ebspamArray[0] = msg['m'].substring(5).trim(); cb.sendNotice('You have set the notifier spam message 0 to: ' + ebspamArray[0],msg['user'],purple); } } else { cb.sendNotice('Only moderators and broadcasters are able to use that command.\nType "/ebhelp commands" to see a full list of the available commands.',msg['user'],purple); } break; } case '/nm1': { //user entered a proper command cmd = 1; //permission check if(msg['is_mod'] || msg['user'] == cb.room_slug || cbjs.arrayContains(eModArray,msg['user'])) { if(message[1] == '' || message[1] == null) { cb.sendNotice('You must enter a new message for the notifier feature. If you want to disable the notifications, enter /notifierspam off.',msg['user'],purple) } else { ebspamArray[1] = msg['m'].substring(5).trim(); cb.sendNotice('You have set the notifier spam message 1 to: ' + ebspamArray[1],msg['user'],purple); } } else { cb.sendNotice('Only moderators and broadcasters are able to use that command.\nType "/ebhelp commands" to see a full list of the available commands.',msg['user'],purple); } break; } case '/nm2': { //user entered a proper command cmd = 1; //permission check if(msg['is_mod'] || msg['user'] == cb.room_slug || cbjs.arrayContains(eModArray,msg['user'])) { if(message[1] == '' || message[1] == null) { cb.sendNotice('You must enter a new message for the notifier feature. If you want to disable the notifications, enter /notifierspam off.',msg['user'],purple) } else { ebspamArray[2] = msg['m'].substring(5).trim(); cb.sendNotice('You have set the notifier spam message 2 to: ' + ebspamArray[2],msg['user'],purple); } } else { cb.sendNotice('Only moderators and broadcasters are able to use that command.\nType "/ebhelp commands" to see a full list of the available commands.',msg['user'],purple); } break; } case '/nm3': { //user entered a proper command cmd = 1; //permission check if(msg['is_mod'] || msg['user'] == cb.room_slug || cbjs.arrayContains(eModArray,msg['user'])) { if(message[1] == '' || message[1] == null) { cb.sendNotice('You must enter a new message for the notifier feature. If you want to disable the notifications, enter /notifierspam off.',msg['user'],purple) } else { ebspamArray[3] = msg['m'].substring(5).trim(); cb.sendNotice('You have set the notifier spam message 3 to: ' + ebspamArray[3],msg['user'],purple); } } else { cb.sendNotice('Only moderators and broadcasters are able to use that command.\nType "/ebhelp commands" to see a full list of the available commands.',msg['user'],purple); } break; } case '/nm4': { //user entered a proper command cmd = 1; //permission check if(msg['is_mod'] || msg['user'] == cb.room_slug || cbjs.arrayContains(eModArray,msg['user'])) { if(message[1] == '' || message[1] == null) { cb.sendNotice('You must enter a new message for the notifier feature. If you want to disable the notifications, enter /notifierspam off.',msg['user'],purple) } else { ebspamArray[4] = msg['m'].substring(5).trim(); cb.sendNotice('You have set the notifier spam message 4 to: ' + ebspamArray[4],msg['user'],purple); } } else { cb.sendNotice('Only moderators and broadcasters are able to use that command.\nType "/ebhelp commands" to see a full list of the available commands.',msg['user'],purple); } break; } } //Level Up! command support if(message[0] == '/luhelp' || message[0] == '/levels') { cmd = 1; } //Elven App command support if(message[0] == '/startshow' || message[0] == '/showtimeleft' || message[0] == '/printtime' || message[0] == '/addshowtime' || message[0] == '/adduser' || message[0] == '/changegoal' || message[0] == '/hide' || message[0] == '/unhide' || message[0] == '/selltickets' || message[0] == '/uacommands') { cmd = 1; } } //let silence do its thing if(cbjs.arrayContains(silenceArray,msg['user']) && silenced == 0) { msg['X-Spam'] = true; silenced = 1; cb.sendNotice('Your message was not sent because you have been silenced. Be nice and don\'t make demands.',msg['user'],purple); } //let silenceLevel do its thing if(silenceLevel > 0 && !msg['is_mod'] && msg['user'] != cb.room_slug && !cbjs.arrayContains(eModArray,msg['user']) && !cbjs.arrayContains(niceArray,msg['user']) && !msg['in_fanclub'] && silenced == 0) { switch(silenceLevel) { case 1: if(!msg['has_tokens']) { msg['X-Spam'] = true; silenced = 1; cb.sendNotice('I\'m sorry, but the silence level has been set to 1; your message was not sent. Only members who have tokens are currently permitted to talk in chat. \nType "/ebhelp silencelevel" to see how the various silence levels work.\nPlease enjoy the show :smile',msg['user'],purple); } break; case 2: if(parseInt(tipperArray[findTipper(msg['user'])][1]) == 0) { msg['X-Spam'] = true; silenced = 1; cb.sendNotice('I\'m sorry, but the silence level has been set to 2; your message was not sent. Only members who have tipped at least 1 token are currently permitted to talk in chat. \nType "/ebhelp silencelevel" to see how the various silence levels work.\nPlease enjoy the show :smile',msg['user'],purple); } break; case 3: if(parseInt(tipperArray[findTipper(msg['user'])][1]) < 10) { msg['X-Spam'] = true; silenced = 1; cb.sendNotice('I\'m sorry, but the silence level has been set to 3; your message was not sent. Only members who have tipped at least 10 token are currently permitted to talk in chat. \nType "/ebhelp silencelevel" to see how the various silence levels work.\nPlease enjoy the show :smile',msg['user'],purple); } break; } } //let graphicLevel do its thing if(graphicLevel > 0 && !msg['is_mod'] && msg['user'] != cb.room_slug && !cbjs.arrayContains(eModArray,msg['user']) && !cbjs.arrayContains(niceArray,msg['user']) && !msg['in_fanclub'] && silenced == 0) { switch(graphicLevel) { case 1: if(!msg['has_tokens']) { for(var i = 0; i < message.length; i++) { if(message[i].charAt(0) == ':') { msg['X-Spam'] = true; cb.sendNotice('Your message was not sent because you tried to use ' + message[i] + ' and the graphic level has been set to ' + graphicLevel + '.\nType "/ebhelp graphiclevel to see how the various graphic levels work.\nPlease enjoy the show :smile',msg['user'],purple); } } } break; case 2: if(parseInt(tipperArray[findTipper(msg['user'])][1]) == 0) { for(var i = 0; i < message.length; i++) { if(message[i].charAt(0) == ':') { msg['X-Spam'] = true; cb.sendNotice('Your message was not sent because you tried to use ' + message[i] + ' and the graphic level has been set to ' + graphicLevel + './nType "/ebhelp graphiclevel to see how the various graphic levels work.\nPlease enjoy the show :smile',msg['user'],purple); } } } break; case 3: if(parseInt(tipperArray[findTipper(msg['user'])][1]) < 10) { for(var i = 0; i < message.length; i++) { if(message[i].charAt(0) == ':') { msg['X-Spam'] = true; cb.sendNotice('Your message was not sent because you tried to use ' + message[i] + ' and the graphic level has been set to ' + graphicLevel + './nType "/ebhelp graphiclevel to see how the various graphic levels work.\nPlease enjoy the show :smile',msg['user'],purple); } } } break; } } //stop people from sending messages in all caps if(msg['m'] == msg['m'].toUpperCase() && msg['m'].toUpperCase() != msg['m'].toLowerCase() && !msg['is_mod'] && msg['user'] != cb.room_slug && !cbjs.arrayContains(eModArray,msg['user']) && ebcapsToggle == 'Yes') { for(var i = 0; i < msg['m'].length; i++) { if(symbolString.indexOf(msg['m'].charAt(i)) == -1) { msg['m'] = msg['m'].toLowerCase(); cb.sendNotice('I\'m sure you didn\'t actually mean to send that message in all capital letters, so I fixed it for you :smile',msg['user'],purple); break; } } } if (!msg['is_mod'] && msg['user'] != cb.room_slug && !cbjs.arrayContains(eModArray,msg['user']) && !cbjs.arrayContains(niceArray,msg['user']) && !msg['in_fanclub'] && !msg['has_tokens'] && silenceLevel == 0) { var tmpmsg = msg['m']; var reason = ''; var mutemsg = false; for(var i = 0; i<= MAX_CHECKS; i++) { if((tmpmsg.search(muteReasons[i].regexp) != -1) && (ebreArray[muteReasons[i].index] == 'Yes')) { mutemsg = true; reason = muteReasons[i].notice; } } if (mutemsg == true) { msg['m'] = "*** Muted for " + reason + " ***"; if (ebmutehide == 'Hide') { msg['X-Spam'] = true; cb.chatNotice('Your msg was hidden from chat',msg['user'],'','','bold'); } } } //tip titles, if turned on, as well as king's crown if(ebtipTitles == 'Yes' && parseInt(tipperArray[findTipper(msg['user'])][1]) > 0 && message[0].charAt(0) != "/") { msg['m'] = setTipTitles(msg['user'],msg['m']); } return msg; }); } //onTip { cb.onTip(function (tip) { if(ebraffleEnabled == 'Yes') { var ticketsBought = 0; if (parseInt(tip['amount'])%ebraffle_ticket_cost == 0) { ticketsBought = parseInt(tip['amount'])/ebraffle_ticket_cost; cb.chatNotice(tip['from_user'] + " has bought " + ticketsBought + " raffle ticket(s)! Thank you!!"); addUser(userArray, tip['from_user'], ticketsBought); if (userInArray(userArray, tip['from_user']) === true) { for(i=0; i < userArray.length; i++) { if(userArray[i].username== tip['from_user']) { if (userArray[i].email == '') { cb.sendNotice('\n******\nPlease use the command /rafflemail then a space and your email so ' + cb.room_slug + ' can notify you if you win\n******', tip['from_user'], '#FFF0DE', '#8A4900', 'bold'); } } } } } } tipperArray[findTipper(tip['from_user'])][1] += parseInt(tip['amount']); if(ebkingTipper == 'Yes') { if(tip['from_user'] != currentKing && parseInt(tipperArray[findTipper(tip['from_user'])][1]) > kingTip && parseInt(tipperArray[findTipper(tip['from_user'])][1]) >= parseInt(ebkingMin)) { if(currentKing != '') { cb.sendNotice('You have been dethroned by ' + tip['from_user'] + ', but revenge is sweet...', currentKing, purple); } cb.sendNotice('We have a new King!\nAll hail ' + tip['from_user'] + '!','',purple); currentKing = tip['from_user']; kingTip = parseInt(tipperArray[findTipper(tip['from_user'])][1]); } else if(tip['from_user'] == currentKing) { kingTip = parseInt(tipperArray[findTipper(tip['from_user'])][1]); } } if(ebleaderBoard == 'Yes') { //create an array of the names var nameArray = new Array; for(var i = 0; i < leaderArray.length; i++) { nameArray[i] = leaderArray[i][0]; } //the user is not currently in the top 3 if(!cbjs.arrayContains(nameArray,tip['from_user'])) { if(tipperArray[findTipper(tip['from_user'])][1] > leaderArray[0][1]) { leaderArray[2][0] = leaderArray[1][0]; leaderArray[2][1] = leaderArray[1][1]; leaderArray[1][0] = leaderArray[0][0]; leaderArray[1][1] = leaderArray[0][1]; leaderArray[0][0] = tip['from_user']; leaderArray[0][1] = tipperArray[findTipper(tip['from_user'])][1]; } else if(tipperArray[findTipper(tip['from_user'])][1] < leaderArray[0][1] && tipperArray[findTipper(tip['from_user'])][1] > leaderArray[1][1] || tipperArray[findTipper(tip['from_user'])][1] == leaderArray[0][1]) { leaderArray[2][0] = leaderArray[1][0]; leaderArray[2][1] = leaderArray[1][1]; leaderArray[1][0] = tip['from_user']; leaderArray[1][1] = tipperArray[findTipper(tip['from_user'])][1]; } else if(tipperArray[findTipper(tip['from_user'])][1] < leaderArray[1][1] && tipperArray[findTipper(tip['from_user'])][1] > leaderArray[2][1] || tipperArray[findTipper(tip['from_user'])][1] == leaderArray[1][1]) { leaderArray[2][0] = tip['from_user']; leaderArray[2][1] = tipperArray[findTipper(tip['from_user'])][1]; } } //the user is currently in the top 3 else { //the user is already #1 if(leaderArray[0][0] == tip['from_user']) { leaderArray[0][1] = tipperArray[findTipper(tip['from_user'])][1]; } //the user is #2 and is moving to #1 if(leaderArray[1][0] == tip['from_user'] && tipperArray[findTipper(tip['from_user'])][1] > parseInt(leaderArray[0][1])) { leaderArray[1][0] = leaderArray[0][0]; leaderArray[1][1] = leaderArray[0][1]; leaderArray[0][0] = tip['from_user']; leaderArray[0][1] = parseInt(tipperArray[findTipper(tip['from_user'])][1]); } //the user is #2 and is not moving to #1 else if(leaderArray[1][0] == tip['from_user'] && tipperArray[findTipper(tip['from_user'])][1] <= parseInt(leaderArray[0][1])) { leaderArray[1][1] = parseInt(tipperArray[findTipper(tip['from_user'])][1]); } //the user is #3 and is moving to #2 else if(leaderArray[2][0] == tip['from_user'] && tipperArray[findTipper(tip['from_user'])][1] > parseInt(leaderArray[1][1])) { leaderArray[2][0] = leaderArray[1][0]; leaderArray[2][1] = leaderArray[1][1]; leaderArray[1][0] = tip['from_user']; leaderArray[1][1] = parseInt(tipperArray[findTipper(tip['from_user'])][1]); } //the user is #3 and is moving to #1 else if(leaderArray[2][0] == tip['from_user'] && tipperArray[findTipper(tip['from_user'])][1] > parseInt(leaderArray[0][1])) { leaderArray[2][0] = leaderArray[1][0]; leaderArray[2][1] = leaderArray[1][1]; leaderArray[1][0] = leaderArray[0][0]; leaderArray[1][1] = leaderArray[0][1]; leaderArray[0][0] = tip['from_user']; leaderArray[0][1] = parseInt(tipperArray[findTipper(tip['from_user'])][1]); } //the user is #3 and is not moving else if(leaderArray[2][0] == tip['from_user'] && tipperArray[findTipper(tip['from_user'])][1] <= parseInt(leaderArray[1][1])) { leaderArray[2][1] = tipperArray[findTipper(tip['from_user'])][1]; } if(leaderArray[2][0] == leaderArray[1][0] || leaderArray[2][0] == leaderArray[0][0]) { leaderArray[2][0] = ''; leaderArray[2][1] = 0; } if(leaderArray[1][0] == leaderArray[0][0]) { leaderArray[1][0] = ''; leaderArray[1][1] = 0; } } } if(ebnotifierTip == 'Yes' && parseInt(tip['amount']) >= ebtipMessageMin) { cb.sendNotice(ebtipMessage,'',purple); } }); } //onEnter { cb.onEnter(function(user) { if(ebnotifierEnter == "Yes") { cb.sendNotice(ebenterMessage,user['user'],purple); } if(user['is_mod'] && !cbjs.arrayContains(modArray,user)) { modArrayPopulate(user['user']); } if (ebmsgonentry == 'Yes') { if ((!user['has_tokens']) && (!user['is_mod']) && (!user['in_fanclub']) && (user['user'] != cb['room_slug'])) { cb.chatNotice('Welcome ' + user['user'] + '! No Grey Demands is enabled',user['user'],'',ebmsgcolor,'bold'); cb.chatNotice(greyEnterMsg,user['user'],'',ebmsgcolor,'bold'); cb.chatNotice('Your message will be muted and you risk being silenced for violating these rules',user['user'],'',ebmsgcolor,'bold'); } } }); } cb.onSave(function () { var leaderList = JSON.stringify(leaderArray); var rafflelist = JSON.stringify(userArray); var data = { ebcolor: ebcolor, ebcapsToggle: ebcapsToggle, ebtipTitles: ebtipTitles, ebkingTipper: ebkingTipper, ebkingTipperSpam: ebkingTipperSpam, ebkingMin: ebkingMin, ebkingTimer: ebkingTimer, ebleaderBoard: ebleaderBoard, ebleaderBoardSpam: ebleaderBoardSpam, ebleaderTimer: ebleaderTimer, ebnotifierEnter: ebnotifierEnter, ebenterMessage: ebenterMessage, ebnotifierSpam: ebnotifierSpam, ebspamArray: ebspamArray, ebspamTimer: ebspamTimer, ebnotifierTip: ebnotifierTip, ebtipMessage: ebtipMessage, ebtipMessageMin: ebtipMessageMin, ebsilenceDefault: ebsilenceDefault, ebniceList: ebniceList, ebmsgonentry: ebmsgonentry, ebmutehide: ebmutehide, ebreArray: ebreArray, ebraffleEnabled: ebraffleEnabled, ebraffle_ticket_cost: ebraffle_ticket_cost, graphicLevel: graphicLevel, currentKing: currentKing, kingTip: kingTip, niceArray: niceArray, silenceArray: silenceArray, leaderArray: leaderArray, userArray: userArray, }; // return that object in the form of a string return JSON.stringify(data); }); cb.onRestore(function (data) { // parse the restored data string into an object var restored = JSON.parse(data); // reinstate the saved variables Object.keys(restored).forEach(function (variable) { if (this.hasOwnProperty(variable)) { this[variable] = restored[variable] } }); kingTimer = parseInt(ebkingTimer); leaderTimer = parseInt(ebleaderTimer); spamTimer = parseInt(ebspamTimer); numNice = niceArray.length; numSilenced = silenceArray.length; if(ebkingTipperSpam == 'Yes' && kingTipperSpam != 1) kingTipperSpam = 1; if(ebleaderBoardSpam == 'Yes' && leaderboardSpam != 1) leaderboardSpam = 1; if(ebnotifierSpam == 'Yes' && notifierSpamTGL != 1) notifierSpamTGL = 1; if(ebcolor != 'C287C2') { colorChecker(); } if(silenceLevel != ebsilenceDefault) { silenceLevel = ebsilenceDefault; cb.sendNotice("The silence level has been changed to " + silenceLevel + ".", cb.room_slug, purple); switch(parseInt(silenceLevel)) { case 0: cb.sendNotice('All members can talk in chat.',cb.room_slug,purple); break; case 1: cb.sendNotice('Only members with tokens can talk in chat.',cb.room_slug,purple); break; case 2: cb.sendNotice('Only members who have tipped can talk in chat.',cb.room_slug,purple); break; case 3: cb.sendNotice('Only members who have tipped at least 10 tokens can talk in chat.',cb.room_slug,purple); break; } } if (ebmsgonentry == 'Yes') { greyEnterMsg = onEnterMsg(); } }); //init { if(initialize == 0) { if(ebkingTipperSpam == 'Yes') { kingTipperSpam = 1; kingTimer = parseInt(ebkingTimer); } if(ebleaderBoardSpam == 'Yes') { leaderboardSpam = 1; leaderTimer = parseInt(ebleaderTimer); } if(ebnotifierSpam == 'Yes') { notifierSpamTGL = 1; spamTimer = parseInt(ebspamTimer); } if(ebniceList != '' && ebniceList != null) { var n = ebniceList; niceArray = n.split(','); numNice = niceArray.length; } if(ebcolor != 'C287C2') { colorChecker(); } silenceLevel = ebsilenceDefault; cb.sendNotice("The silence level has been set to " + silenceLevel + ".", cb.room_slug, purple); switch(parseInt(silenceLevel)) { case 0: cb.sendNotice('All members can talk in chat.',cb.room_slug,purple); break; case 1: cb.sendNotice('Only members with tokens can talk in chat.',cb.room_slug,purple); break; case 2: cb.sendNotice('Only members who have tipped can talk in chat.',cb.room_slug,purple); break; case 3: cb.sendNotice('Only members who have tipped at least 10 tokens can talk in chat.',cb.room_slug,purple); break; } cb.sendNotice('Grey users are now unable to use graphics by default. If you would like grey users to be able to use graphics, type /graphiclevel 0.', cb.room_slug, purple); if (ebmsgonentry == 'Yes') greyEnterMsg = onEnterMsg(); mainTimer(); initialize = 1; } }
© Copyright Chaturbate 2011- 2026. All Rights Reserved.