Bots Home
|
Create an App
lace-aio-test
Author:
bunzl8
Description
Source Code
Launch Bot
Current Users
Created by:
Bunzl8
/** * @return {undefined} */ function parseNick() { var a; var b; var c; var d; a = (BBnicknames || "").split(/[,]+/); /** @type {number} */ b = 0; c = a.length; for (;b < c;b++) { d = a[b].split("@"); if (2 == d.length && (d[0].length && d[1].length)) { set_alias(d[0].toLowerCase().trim(), parse_ucodes_and_emotes(d[1])).join(", "); } else { notifyError("Error: malformed alias record (user@alias): " + a[b], cb.room_slug); } } } /** * @param {string} a * @param {string} b * @return {?} */ function set_alias(a, b) { /** @type {Array} */ var c = []; return b.length ? (users.hasOwnProperty(b), a.length && (c.push(a + "'s alias '" + b + "' added."), aliases[a] = b, users[b] = a)) : a.length && aliases.hasOwnProperty(a), c; } /** * @param {string} a * @return {?} */ function parse_ucodes_and_emotes(a) { var c; var e; var f; /** @type {RegExp} */ var b = /\\u([0-9a-f]{4})/gi; /** @type {Array} */ var d = []; a = a || ""; for (;null != (c = b.exec(a));) { d.push(c[1]); } if (d.length) { /** @type {Array.<?>} */ d = d.filter(uniqueArray); /** @type {number} */ e = 0; /** @type {number} */ f = d.length; for (;e < f;e++) { a = a.replace(new RegExp("\\\\u" + d[e], "gi"), String.fromCharCode(parseInt(d[e], 16))); } } return a = a.replace(/(^|\s|\\n);-*\)/gm, "$1:wink ").replace(/(^|\s|\\n):-*\)/gm, "$1:smile ").replace(/(^|\s|\\n):D/gm, "$1:woot "), a = a.replace(/(\r\n|\n|\r|\\n)/gm, " ").trim(), /(^|\s):([\w\-][\w\-]+)$/.test(a) && (a += " "), /^:([\w\-][\w\-]+)(\s|$)/.test(a) && (a = " " + a), a; } /** * @param {string} a * @return {?} */ function encode_ucodes(a) { return a = a || "", a = a.trim(), a = a.replace(/\s/g, "\\u0020").replace(/,/g, "\\u002c").replace(/@/g, "\\u0040"), a.replace(/[^\u0020-\u007e]/g, function(a) { return "\\u" + (a.charCodeAt(0) + 65536).toString(16).slice(1).toLowerCase(); }); } /** * @return {undefined} */ function kingTipperNotifier() { if ("Yes" == cb.settings.kingTipperToggle) { notifyTheme("Be the High Tip King: tip " + kingtippertipreplace + ", or more to replace " + kingtippername + " as the new High Tip King, and wear the high tip " + kingtippericon); cb.setTimeout(kingTipperNotifier, 6E4 * cb.settings.kingTipperNotifier); } } /** * @return {undefined} */ function tipmenuNotifierSpam() { clearTimeout(tipMenuTimeout); /** @type {number} */ tipMenuTimeout = setTimeout(tipMenuNotifier, tipMenuTimer * minuteMS); } /** * @return {undefined} */ function tipMenuMessageNotifierSpam() { /** @type {number} */ tipMenuMessageTimeout = setTimeout(function() { if (1 == tipMenuMessageSpam) { if (messArray.length) { sendRotatingMessages(); tipMenuMessageNotifierSpam(); } } }, tipMenuMessageTimer * minuteMS); } /** * @param {string} a * @return {undefined} */ function addMessage(a) { if (!isBlank(a)) { a = a.replace(/((\\|\/)n|\{newline\})/gi, "\n"); messArray.push(a); } } /** * @return {undefined} */ function parseRotatingMessages() { addMessage(cb.settings.msg1); addMessage(cb.settings.msg2); addMessage(cb.settings.msg3); } /** * @return {undefined} */ function sendRotatingMessages() { if (messArray.length) { if (messArray[messNum]) { if ("Theme" == cb.settings.tipMenuColorscheme) { notifyThemePlain(messArray[messNum]); } else { if (isBlank(cb.settings.bgcolor) || isBlank(cb.settings.txtcolor)) { notifyErrorBold("Whoops. You selected a custom color scheme for tip messages but you didn't fill in the colors. Reverted to default color scheme.", roomHost); } else { cb.sendNotice(messArray[messNum], "", "#" + cb.settings.bgcolor, "#" + cb.settings.txtcolor, "bold"); } } } messNum += 1; if (messNum >= messArray.length) { /** @type {number} */ messNum = 0; } } } /** * @param {string} a * @return {undefined} */ function tipMenu(a) { var e; /** @type {string} */ var d = "| "; /** @type {Array} */ var f = []; /** @type {Array} */ var g = []; if ("Yes" == cb.settings.tipMenuToggle) { /** @type {number} */ i = 0; for (;i <= MAXSEP - 1;i++) { if (cb.settings.sepchar == separators[i].label) { /** @type {string} */ d = separators[i].shortcut + " "; } } /** @type {string} */ e = "Tip Menu: "; /** @type {number} */ i = 1; for (;i <= MAXTIPMENU;i++) { var h; if (h = cb.settings["item" + i]) { var j = h.split("--"); /** @type {number} */ var k = parseInt(j[0]); if (k > 0) { /** @type {number} */ f[i] = k; g[i] = j[1]; if (i >= 2) { e += d; } e += j[1] + "(" + k + ") "; } } } if ("Theme" == cb.settings.tipMenuColorscheme) { notifyThemePlain(e, a); } else { if (isBlank(cb.settings.bgcolor) || isBlank(cb.settings.txtcolor)) { notifyErrorBold("Whoops. You selected a custom color scheme for tip messages but you didn't fill in the colors. Reverted to default color scheme.", roomHost); } else { cb.sendNotice(e, a, "#" + cb.settings.bgcolor, "#" + cb.settings.txtcolor, "bold"); } } } else { notifyError("Tip menu is not in use", a); } } /** * @return {undefined} */ function tipMenuNotifier() { var d; /** @type {string} */ var c = "| "; /** @type {Array} */ var e = []; /** @type {Array} */ var f = []; if (1 == tipMenuSpam && "Yes" == cb.settings.tipMenuToggle) { /** @type {number} */ n = 0; for (;n <= MAXSEP - 1;n++) { if (cb.settings.sepchar == separators[n].label) { /** @type {string} */ c = separators[n].shortcut + " "; } } /** @type {string} */ d = "Tip Menu: "; /** @type {number} */ n = 1; for (;n <= MAXTIPMENU;n++) { var g; if (g = cb.settings["item" + n]) { var h = g.split("--"); /** @type {number} */ var i = parseInt(h[0]); if (i > 0) { /** @type {number} */ e[n] = i; f[n] = h[1]; if (n >= 2) { d += c; } d += h[1] + "(" + i + ") "; } } } if ("Theme" == cb.settings.tipMenuColorscheme) { notifyThemePlain(d); tipmenuNotifierSpam(); } else { if (isBlank(cb.settings.bgcolor) || isBlank(cb.settings.txtcolor)) { notifyErrorBold("Whoops. You selected a custom color scheme for tip messages but you didn't fill in the colors. Reverted to default color scheme.", roomHost); } else { cb.sendNotice(d, "", "#" + cb.settings.bgcolor, "#" + cb.settings.txtcolor, "bold"); tipmenuNotifierSpam(); } } } } /** * @param {Function} a * @param {number} b * @return {undefined} */ function appTimeout(a, b) { cb.setTimeout(a, b < 1E3 ? 1E3 : b); } /** * @param {string} a * @param {number} b * @return {?} */ function addTip(a, b) { var c; /** @type {number} */ var d = -1; /** @type {boolean} */ tipArraySorted = false; /** @type {number} */ c = 0; for (;c < tipArray.length;c += 1) { if (tipArray[c].sUser === a) { /** @type {number} */ d = c; break; } } return d < 0 ? (tipArray.push({ sUser : a, nTotal : b }), b) : (tipArray[d].nTotal += b, tipArray[d].nTotal); } /** * @return {undefined} */ function sortTipArray() { if (!tipArraySorted) { tipArray.sort(function(a, b) { return b.nTotal - a.nTotal; }); /** @type {boolean} */ tipArraySorted = true; } } /** * @param {(Object|string)} a * @return {?} */ function getUserTotal(a) { var b; /** @type {number} */ b = 0; for (;b < tipArray.length;b += 1) { if (tipArray[b].sUser === a) { return tipArray[b].nTotal; } } return 0; } /** * @param {?} a * @return {?} */ function findTipper(a) { var b; /** @type {number} */ b = 0; for (;b < tipArray.length;b += 1) { if (tipArray[b].sUser == a) { return b; } } return-1; } /** * @param {?} a * @return {undefined} */ function modArrayPopulate(a) { if (!cbjs.arrayContains(modArray, a)) { modArray.push(a); } } /** * @param {?} a * @return {undefined} */ function modArrayDepopulate(a) { if (cbjs.arrayContains(modArray, a)) { cbjs.arrayRemove(modArray, a); } } /** * @param {string} a * @return {undefined} */ function emodArrayPopulate(a) { if (!cbjs.arrayContains(emodArray, a)) { emodArray.push(a); } } /** * @param {string} a * @return {undefined} */ function emodArrayDepopulate(a) { if (cbjs.arrayContains(emodArray, a)) { cbjs.arrayRemove(emodArray, a); } } /** * @param {string} a * @return {undefined} */ function modAndEmodArrayPopulate(a) { if (!cbjs.arrayContains(modAndEmodArray, a)) { modAndEmodArray.push(a); } } /** * @param {?} a * @return {undefined} */ function modAndEmodArrayDepopulate(a) { if (cbjs.arrayContains(modAndEmodArray, a)) { cbjs.arrayRemove(modAndEmodArray, a); } } /** * @param {string} a * @return {undefined} */ function modBlockMsgArrayPopulate(a) { if (!cbjs.arrayContains(modBlockMsgArray, a)) { modBlockMsgArray.push(a); } } /** * @param {string} a * @return {undefined} */ function modBlockMsgArrayDepopulate(a) { if (cbjs.arrayContains(modBlockMsgArray, a)) { cbjs.arrayRemove(modBlockMsgArray, a); } } /** * @param {string} a * @return {undefined} */ function niceArrayPopulate(a) { niceArray.push(a); } /** * @param {string} a * @return {undefined} */ function niceArrayDepopulate(a) { cbjs.arrayRemove(niceArray, a); } /** * @param {string} a * @return {undefined} */ function greyArrayPopulate(a) { greyArray.push(a); } /** * @param {string} a * @return {undefined} */ function greyArrayDepopulate(a) { cbjs.arrayRemove(greyArray, a); } /** * @param {string} a * @return {undefined} */ function silenceArrayPopulate(a) { silenceArray.push(a); } /** * @param {?} a * @return {undefined} */ function silenceArrayDepopulate(a) { cbjs.arrayRemove(silenceArray, a); } /** * @param {string} a * @return {undefined} */ function vipArrayPopulate(a) { if (!cbjs.arrayContains(vipArray, a)) { vipArray.push(a); } } /** * @param {string} a * @return {undefined} */ function ignoreArrayPopulate(a) { /** @type {Array} */ ignoreArray[numIgnorers] = new Array; /** @type {string} */ ignoreArray[numIgnorers][0] = a; /** @type {number} */ ignoreArray[numIgnorers][1] = cb.settings.roomWhisperLevel ? parseInt(cb.settings.roomWhisperLevel.charAt(0)) : 0; numIgnorers++; } /** * @param {string} a * @return {?} */ function findIgnorer(a) { /** @type {number} */ i = 0; for (;i < ignoreArray.length && ignoreArray[i][0] != a;i++) { } return i == ignoreArray.length && (ignoreArrayPopulate(a), findIgnorer(a)), i; } /** * @param {string} a * @return {undefined} */ function whisArrayPopulate(a) { /** @type {Array} */ whisArray[numWhis] = new Array; /** @type {string} */ whisArray[numWhis][0] = a; /** @type {string} */ whisArray[numWhis][1] = ""; numWhis++; } /** * @param {string} a * @return {?} */ function findWhisper(a) { /** @type {number} */ var b = 0; for (;b < whisArray.length && whisArray[b][0] != a;b++) { } return b == whisArray.length && (whisArrayPopulate(a), findWhisper(a)), b; } /** * @param {string} a * @param {string} b * @param {string} c * @param {Function} d * @param {string} e * @return {undefined} */ function notify(a, b, c, d, e) { if (null == c && (c = bb_light), null == d && (d = bb_dark), null == e && (e = "bold"), "onlyMods" == b) { cb.sendNotice(a, "", c, d, e, "red"); } else { if ("modsAndEmods" == b) { /** @type {number} */ mod = 0; for (;mod < modAndEmodArray.length;mod++) { thisMod = modAndEmodArray[mod]; cb.sendNotice(a, thisMod, c, d, e); } } else { if ("roomHost" == b) { cb.sendNotice(a, roomHost, c, d, e); } else { if ("modsAndHost" == b) { cb.sendNotice(a, "", c, d, e, "red"); cb.sendNotice(a, roomHost, c, d, e); } else { if (null == b) { cb.sendNotice(a, "", c, d, e); } else { cb.sendNotice(a, b, c, d, e); } } } } } } /** * @param {string} a * @param {string} b * @param {Object} c * @param {Function} d * @return {undefined} */ function notifyBold(a, b, c, d) { if (null == c) { c = bb_dark; } if (null == d) { d = white; } notify(a, b, c, d, "bold"); } /** * @param {string} a * @param {string} b * @param {Function} c * @return {undefined} */ function notifyPlain(a, b, c) { bg = white; if (null == c) { c = bb_dark; } notify(a, b, bg, c); } /** * @param {string} a * @param {string} b * @param {Object} c * @param {Function} d * @return {undefined} */ function notifyTheme(a, b, c, d) { if (null == c) { c = theme_light; } if (null == d) { d = theme_dark; } notify(a, b, c, d, "bold"); } /** * @param {string} a * @param {string} b * @param {string} c * @param {Object} d * @return {undefined} */ function notifyThemeBold(a, b, c, d) { if (null == c) { c = theme_dark; } if (null == d) { d = white; } notify(a, b, c, d, "bold"); } /** * @param {string} a * @param {string} b * @param {Object} c * @return {undefined} */ function notifyThemePlain(a, b, c) { bg = white; if (null == c) { c = theme_dark; } notify(a, b, bg, c); } /** * @param {string} a * @param {string} b * @return {undefined} */ function notifyError(a, b) { notify(a, b, error_light, error_dark); } /** * @param {string} a * @param {string} b * @return {undefined} */ function notifyErrorBold(a, b) { notify(a, b, error_dark, white); } /** * @param {?} a * @return {?} */ function levelConditions(a) { var b; switch(parseInt(a)) { case 0: /** @type {string} */ b = "All members"; break; case 1: /** @type {string} */ b = 'Only "color" names'; break; case 2: /** @type {string} */ b = 'Only "dark blue" names and higher'; break; case 3: /** @type {string} */ b = "Only members who have tipped in the room"; break; case 4: /** @type {string} */ b = "No one"; } return b; } /** * @param {number} a * @param {string} b * @return {undefined} */ function setSilenceLevel(a, b) { if (parseInt(a) >= 0 && parseInt(a) <= 4) { /** @type {number} */ silenceLevel = parseInt(a); /** @type {string} */ var c = "The silence level has been set to " + a + ".\n"; c += levelConditions(a) + " can talk in chat."; notify(c, "modsAndHost"); } else { if (a) { notifyError('"' + a + '" is not a valid silence level.\nType "/abhelp\u00a0silencelevel" to see how to use /silencelevel.', b); } else { notifyError('You did not enter a valid silence level.\nType "/abhelp\u00a0silencelevel" to see how to use /silencelevel.', b); } } } /** * @param {string} a * @param {string} b * @return {undefined} */ function setGraphicLevel(a, b) { if (parseInt(a) >= 0 && parseInt(a) <= 4) { /** @type {number} */ graphicLevel = parseInt(a); /** @type {string} */ var c = "The graphic level has been set to " + a + ".\n"; c += levelConditions(a) + " can use graphics in chat."; notify(c, "modsAndHost"); } else { if (a) { notifyError('"' + a + '" is not a valid graphic level.\nType "/abhelp\u00a0graphiclevel" to see how to use /graphiclevel.', b); } else { notifyError('You did not enter a valid graphic level.\nType "/abhelp\u00a0graphiclevel" to see how to use /graphiclevel.', b); } } } /** * @param {string} a * @param {string} b * @return {undefined} */ function setIgnoreLevel(a, b) { if (parseInt(a) >= 0 && parseInt(a) <= 4) { /** @type {string} */ ignoreArray[findIgnorer(b)][1] = a; /** @type {string} */ var c = "You have set your whisper ignore level to " + a + ".\n"; c += levelConditions(a) + " can send you whispers.\n"; c += "Remember, the room host, moderators, and fan club members will always be able to whisper you!"; notify(c, b); } else { if (a) { notifyError('"' + a + '" is not a valid ignore level.\nType "/abhelp\u00a0ignorelevel" to see how to use /ignorelevel.', b); } else { notifyError('You did not enter a valid ignore level.\nType "/abhelp\u00a0ignorelevel" to see how to use /ignorelevel.', b); } } } /** * @param {string} a * @param {string} b * @return {undefined} */ function silence(a, b) { if (a == b) { notifyError("You can not silence yourself.", b); } else { if (a == roomHost) { notifyError("You can not silence the broadcaster.", b); } else { if (cbjs.arrayContains(modArray, a)) { notifyError("Broadcaster must revoke " + a + "'s moderator status before silencing.", b); } else { if (cbjs.arrayContains(emodArray, a)) { notifyError("You must revoke " + a + "'s emergency moderator status before silencing. (Type \"/emod remove " + a + '")', b); } else { if (cbjs.arrayContains(niceArray, a)) { notifyError("You must remove " + a + ' from the nice list before silencing. (Type "/removenice ' + a + '")', b); } else { if (a && (a = a.toLowerCase()), null == a) { notify("You must specify a user to silence.", b); } else { if (cbjs.arrayContains(silenceArray, a)) { notifyError(a + " has already been silenced.", b); } else { silenceArrayPopulate(a); /** @type {string} */ var c = b + " has silenced " + a + "."; if (b == dev || b == sm) { notify(c, dev); notify(c, sm); } else { notify(c, "modsAndEmods"); } } } } } } } } } /** * @param {string} a * @param {string} b * @return {undefined} */ function unsilence(a, b) { if (a && (a = a.toLowerCase()), null == a) { notify("You must specify a user to unsilence.", b); } else { if (cbjs.arrayContains(silenceArray, a)) { cbjs.arrayRemove(silenceArray, a); /** @type {string} */ var c = b + " has unsilenced " + a + "."; if (b == dev || b == sm) { notify(c, dev); notify(c, sm); } else { notify(c, "modsAndEmods"); } } else { notifyError(a + " does not need to be unsilenced.", b); } } } /** * @param {string} a * @return {undefined} */ function silenceLast(a) { if (lastBlocked.length) { if (null == lastToUseSL || lastToUseSL == a) { u = lastBlocked.pop(); /** @type {string} */ lastToUseSL = a; lastToGetSLed = u; silence(u, a); cb.setTimeout(function() { /** @type {null} */ lastToUseSL = null; /** @type {null} */ lastToGetSLed = null; }, 5E3); } else { notifyError(lastToUseSL + " has just silenced " + lastToGetSLed + " using the /silencelast command. Please wait at least 5 seconds before using this command again.", a); } } else { notifyError("The bot has not automatically silenced anyone yet, or they have all been silenced already.", a); } } /** * @param {number} a * @return {?} */ function setTimer(a) { return clearTimeout(fiveTimeout), clearTimeout(oneTimeout), clearTimeout(timerTimeout), 0 == a ? void(startTime = 0) : (a > 300 && (fiveTimeout = setTimeout(function() { notifyThemeBold("Yes" == cb.settings.useLight ? ":ml-yl The Timer has Five minutes remaining! :ml-yl" : "The Timer has Five minutes remaining!"); }, 1E3 * (a - 300))), a > 60 && (oneTimeout = setTimeout(function() { notifyThemeBold("Yes" == cb.settings.useLight ? ":ml-yl One minute remaining for the Timer! :ml-yl" : "One minute remaining for the Timer!"); }, 1E3 * (a - 60))), void(timerTimeout = setTimeout(function() { notifyThemeBold("Yes" == cb.settings.useLight ? ":ml-rl The Timer... Time is up! :ml-rl" : bullets + "The Timer... Time is up! " + bullets); /** @type {number} */ startTime = 0; }, 1E3 * a))); } /** * @param {string} a * @param {string} b * @return {undefined} */ function startTimer(a, b) { /** @type {number} */ var c = parseInt(a); /** @type {number} */ var d = 60 * c; if (0 == startTime) { if (c > 0 && -1 == c.toString().indexOf(".")) { /** @type {number} */ timeRemaining = d; /** @type {number} */ timerduration = d; /** @type {Date} */ startTime = new Date; setTimer(d); if (null != b) { notifyThemeBold("Yes" == cb.settings.useLight ? ":ml-gl " + b + " has set a Timer for " + c + " minutes! :ml-gl" : b + " has set a Timer for " + c + " minutes!"); } } else { if (null != a) { notifyError("'" + a + '\' is not a valid option for /starttimer.\nType "/abhelp\u00a0starttimer" to see how to use /starttimer.', b); } else { if (null == a) { notifyError('You did not enter a valid option for /starttimer.\nType "/abhelp\u00a0starttimer" to see how to use /starttimer.', b); } } } } else { if (null != b) { notifyError("The timer is already running.", b); } } } /** * @param {string} a * @param {string} b * @return {undefined} */ function addTime(a, b) { /** @type {number} */ t = parseInt(a); /** @type {number} */ var c = 60 * t; if (t > 0 && -1 == t.toString().indexOf(".")) { if (0 != startTime) { startTime.setSeconds(startTime.getSeconds() + c); /** @type {Date} */ var d = new Date; /** @type {number} */ timeRemaining = 3600 * startTime.getHours() + 60 * startTime.getMinutes() + startTime.getSeconds() + timerduration - 3600 * d.getHours() - 60 * d.getMinutes() - d.getSeconds(); setTimer(timeRemaining); notifyThemeBold("Yes" == cb.settings.useLight ? ":ml-bl " + b + " has added " + t + " minute" + (1 == t ? "" : "s") + " to the Timer! :ml-bl" : b + " has added " + t + " minute" + (1 == t ? "" : "s") + " to the Timer!"); } else { notifyError("The timer timer is not running.", b); } } else { if (null != a) { notifyError("'" + a + '\' is not a valid option for /addtime.\nType "/abhelp\u00a0addtime" to see how to use /addtime.', b); } else { if (null == a) { notifyError('You did not enter a valid option for /addtime.\nType "/abhelp\u00a0addtime" to see how to use /addtime.', b); } } } } /** * @param {string} a * @param {string} b * @return {undefined} */ function minusTime(a, b) { /** @type {number} */ t = parseInt(a); /** @type {number} */ var c = -60 * t; if (t > 0 && -1 == t.toString().indexOf(".")) { if (0 != startTime) { startTime.setSeconds(startTime.getSeconds() + c); /** @type {Date} */ var d = new Date; /** @type {number} */ timeRemaining = 3600 * startTime.getHours() + 60 * startTime.getMinutes() + startTime.getSeconds() + timerduration - 3600 * d.getHours() - 60 * d.getMinutes() - d.getSeconds(); setTimer(timeRemaining); notifyThemeBold("Yes" == cb.settings.useLight ? ":ml-bl " + b + " has has subtracted " + t + " minute" + (1 == t ? "" : "s") + " from the Timer! :ml-bl" : b + " has has subtracted " + t + " minute" + (1 == t ? "" : "s") + " from the Timer!"); } else { notifyError("The timer is not running.", b); } } else { if (null != a) { notifyError("'" + a + '\' is not a valid option for /minustime.\nType "/abhelp\u00a0minustime" to see how to use /minustime.', b); } else { if (null == a) { notifyError('You did not enter a valid option for /minustime.\nType "/abhelp\u00a0minustime" to see how to use /minustime.', b); } } } } /** * @param {string} a * @return {undefined} */ function stopTimer(a) { if (0 != startTime) { setTimer(0); notifyThemeBold("Yes" == cb.settings.useLight ? ":ml-rl " + a + " has cancelled the timer. :ml-rl" : a + " has cancelled the timer."); } else { notifyError("The timer is not running.", a); } } /** * @param {number} a * @return {?} */ function doubleDigit(a) { return("0" + a).slice(-2); } /** * @param {string} a * @return {undefined} */ function timeLeft(a) { if (0 != startTime) { /** @type {Date} */ var b = new Date; /** @type {number} */ timeRemaining = 3600 * startTime.getHours() + 60 * startTime.getMinutes() + startTime.getSeconds() + timerduration - 3600 * b.getHours() - 60 * b.getMinutes() - b.getSeconds(); var c = doubleDigit(Math.floor(timeRemaining / 3600)); var d = doubleDigit(Math.floor((timeRemaining - 3600 * c) / 60)); var e = doubleDigit(timeRemaining - 3600 * c - 60 * d); notify("Time Remaining for the timer: " + c + ":" + d + ":" + e, a); } else { notifyError("The timer is not running.", a); } } /** * @param {string} a * @param {string} b * @param {string} c * @return {undefined} */ function vip(a, b, c) { if ("a" == c) { if (null == a || "" == a && (" " == a && "\u00a0" == a)) { notifyError('You didn\'t specify who you want to add to the VIP list.\nType "/abhelp addvip" to see how to use /addvip.\nAdditionally, check the viplist help section for more info.', b); } else { if (a != cb.room_slug || (!cbjs.arrayContains(modArray, a) || cbjs.arrayContains(eModArray, a))) { if (cbjs.arrayContains(vipArray, a)) { notifyError(a + " is already on the VIP list.", b); } else { vipArrayPopulate(a); notify("You have added " + a + " to the VIP list.", b); notify(b + ' has added you to the VIP list. You will have free access to any future "CrazyTicket" show.', a); } } else { notifyError("Room hosts, moderators, and emergency moderators don't need to be added to the VIP List.", b); } } } else { if ("r" == c) { if (null == a || "" == a && (" " == a && "\u00a0" == a)) { notifyError('You didn\'t specify who you want to remove from the VIP list.\nType "/abhelp removevip" to see how to use /removevip.\nAdditionally, check the viplist help section for more info.', b); } else { if (vipArray.length > 0) { if ("all" == a) { notify("You have removed all users from the VIP list.", b); /** @type {number} */ var d = 0; for (;d < vipArray.length;d++) { notify(b + " has removed you from the VIP list.", vipArray[d]); } /** @type {number} */ vipArray.length = 0; } else { if (cbjs.arrayContains(vipArray, a)) { cbjs.arrayRemove(vipArray, a); notify("You have removed " + a + " from the VIP list.", b); notify(b + " has removed you from the VIP list.", a); } else { notifyError(a + " is not on the VIP list.", b); } } } else { notifyError("The VIP list is currently empty.", b); } } } } } /** * @param {string} a * @param {string} b * @param {string} c * @param {string} d * @return {undefined} */ function sendPublicNotice(a, b, c, d) { if (null != a) { if ("" != a || (" " != a || "\u00a0" != a)) { if ("red" == d) { switch(c) { case "div": cb.sendNotice(dashLine + "\n\u2022 " + a + "\n" + dashLine, "", "", "#dd0012", "bold"); break; case "divh": cb.sendNotice(dashLine + "\n\u2022 " + a + "\n" + dashLine, "", "#ffe5e5", "#dd0012", "bold"); break; case "h": cb.sendNotice("\u2022 " + a, "", "#ffe5e5", "#dd0012", "bold"); break; case "": cb.sendNotice("\u2022 " + a, "", "", "#dd0012", "bold"); } } else { if ("default" == d) { switch(c) { case "div": if ("Theme" == cb.settings.crazyNoteColorscheme) { notifyThemePlain(dashLine + "\n\u2022 " + a + "\n" + dashLine); } else { if (isBlank(cb.settings.crazyNoteBackground) || isBlank(cb.settings.crazyNoteText)) { notifyErrorBold("Whoops. You selected a custom color scheme for crazy note but you didn't fill in the colors. Reverted to default color scheme.", roomHost); } else { cb.sendNotice(dashLine + "\n\u2022 " + a + "\n" + dashLine, "", "", "#" + cb.settings.crazyNoteText, "bold"); } } break; case "divh": if ("Theme" == cb.settings.crazyNoteColorscheme) { notifyTheme(dashLine + "\n\u2022 " + a + "\n" + dashLine); } else { if (isBlank(cb.settings.crazyNoteBackground) || isBlank(cb.settings.crazyNoteText)) { notifyErrorBold("Whoops. You selected a custom color scheme for crazy note but you didn't fill in the colors. Reverted to default color scheme.", roomHost); } else { cb.sendNotice(dashLine + "\n\u2022 " + a + "\n" + dashLine, "", "#" + cb.settings.crazyNoteBackground, "#" + cb.settings.crazyNoteText, "bold"); } } break; case "h": if ("Theme" == cb.settings.crazyNoteColorscheme) { notifyTheme("\u2022 " + a); } else { if (isBlank(cb.settings.crazyNoteBackground) || isBlank(cb.settings.crazyNoteText)) { notifyErrorBold("Whoops. You selected a custom color scheme for crazy note but you didn't fill in the colors. Reverted to default color scheme.", roomHost); } else { cb.sendNotice("\u2022 " + a, "", "#" + cb.settings.crazyNoteBackground, "#" + cb.settings.crazyNoteText, "bold"); } } break; case "": if ("Theme" == cb.settings.crazyNoteColorscheme) { notifyThemePlain("\u2022 " + a); } else { if (isBlank(cb.settings.crazyNoteBackground) || isBlank(cb.settings.crazyNoteText)) { notifyErrorBold("Whoops. You selected a custom color scheme for crazy note but you didn't fill in the colors. Reverted to default color scheme.", roomHost); } else { cb.sendNotice("\u2022 " + a, "", "", "#" + cb.settings.crazyNoteText, "bold"); } } ; } } } } else { notifyError("You can't send a blank message.\nType a message and try again.", b); } } else { notifyError("You can't send a blank message.\nType a message and try again.", b); } } /** * @param {string} a * @param {string} b * @param {string} c * @return {undefined} */ function sendPrivateNotice(a, b, c) { if (null != a) { if ("" != a || (" " != a || "\u00a0" != a)) { switch(c) { case "to_mods": notify("\u2022 " + b + ": " + a, "onlyMods", "#fffec6", "#dd0012", "bold"); notify("\u2022 Sent to Mods \u2022 " + a, b, "#fffec6", "#dd0012", "bold"); break; case "to_caster": notify("\u2022 " + b + ": " + a, "roomHost", "#fffec6", "#dd0012", "bold"); notify("\u2022 Sent to Broadcaster \u2022 " + a, b, "#fffec6", "#dd0012", "bold"); break; case "to_mods_and_caster": notify("\u2022 " + b + ": " + a, "modsAndHost", "#dfeefd", "#084576", "bold"); notify("\u2022 Sent to Broadcaster and Mods \u2022 " + a, b, "#dfeefd", "#084576", "bold"); break; case "to_viewer": if (null == arguments[3] || "" == arguments[3] && (" " == arguments[3] && "\u00a0" == arguments[3])) { notifyError("You didn't specify who should receive the message.\nPlease enter a username and try again."); } else { notify("\u2022 " + b + " \u2022 " + a, arguments[3], "", "#dd0012", "bold"); notify("\u2022 Sent to " + arguments[3] + " \u2022 " + a, b, "", "#dd0012", "bold"); } ; } } else { notifyError("You can't send a blank message.\nType a message and try again.", b); } } else { notifyError("You can't send a blank message.\nType a message and try again.", b); } } /** * @param {Array} a * @param {string} b * @param {string} c * @param {number} d * @return {undefined} */ function doWhisper(a, b, c, d) { /** @type {string} */ whis = ":bb-lightbubble [Whisper from: " + c + "]\u00a0 "; var f; /** @type {null} */ var e = null; /** @type {number} */ f = 1 == d ? 1 : 2; cb.log(f); /** @type {number} */ var g = f; for (;g < a.length;g++) { if (g == f) { e = a[g]; } else { e += " " + a[g]; } } /** @type {string} */ whisArray[findWhisper(b)][1] = c; if (b) { if (e) { notifyBold((whis + e).trim(), b); } else { notifyError("You did not specify a message.", c); } } } /** * @param {Array} a * @param {string} b * @param {number} c * @return {?} */ function textReplaceWhisper(a, b, c) { var f; /** @type {null} */ var d = null; /** @type {null} */ var e = null; if (1 == c ? (d = whisArray[findWhisper(b)][1], f = 1) : (d = a[1], f = 2), d) { var g = f; for (;g < a.length;g++) { if (g == f) { e = a[g]; } else { e += " " + a[g]; } } if (e) { /** @type {string} */ e = ":bb-darkbubble [Whisper to: " + d.toLowerCase() + "]\u00a0 " + e; } } return d && e || (e = 1 == c ? "Reply not sent." : "Whisper not sent."), e; } /** * @param {Object} a * @param {string} b * @param {boolean} c * @param {number} d * @return {undefined} */ function sendWhisper(a, b, c, d) { var e; if (a[1] ? e = a[1].toLowerCase() : notifyError("You did not enter a whisper recipient.", b), e != b) { if (cbjs.arrayContains(silenceArray, b)) { notifyError("You do not have whispering privileges. Your message was not sent.", b); } else { if (!cbjs.arrayContains(ignoreArray[findIgnorer(e)], b) || c) { switch(parseInt(ignoreArray[findIgnorer(e)][1])) { case 0: doWhisper(a, e, b); break; case 1: if (d > 1 || c) { doWhisper(a, e, b); } else { notifyError(e + " is ignoring whispers from greys.", b); } break; case 2: if (d > 2 || c) { doWhisper(a, e, b); } else { notifyError(e + " is ignoring whispers from greys and light blues who haven't tipped in the room.", b); } break; case 3: if (d > 3 || c) { doWhisper(a, e, b); } else { notifyError(e + " is ignoring whispers from all members who haven't tipped in the room.", b); } break; case 4: if (c) { doWhisper(a, e, b); } else { notifyError(e + " is ignoring whispers.", b); } ; } } else { notifyError(e + " is ignoring whispers from you. Your message was not sent.", b); } } } else { notifyError("Talking to yourself is a little odd...", b); } } /** * @param {Object} a * @param {string} b * @return {undefined} */ function sendReply(a, b) { var c = whisArray[findWhisper(b)][1]; if (cbjs.arrayContains(silenceArray, b)) { notifyError("You do not have whispering privileges. Your message was not sent.", b); } if (cbjs.arrayContains(ignoreArray[findIgnorer(c)], b)) { notifyError(c + " is ignoring whispers from you. Your message was not sent.", b); } else { if ("" != c) { doWhisper(a, c, b, true); } else { notifyError("No one has whispered you.", b); } } } /** * @param {string} a * @param {string} b * @return {undefined} */ function ignoreUser(a, b) { if (cbjs.arrayContains(ignoreArray[findIgnorer(b)], a)) { if (a == b) { notifyError("You can't ignore yourself. You may want to consult a therapist.", b); } else { notifyError("You are already ignoring that user's whispers.", b); } } else { if (a) { /** @type {string} */ ignoreArray[findIgnorer(b)][ignoreArray[findIgnorer(b)].length] = a; notify("You are now ignoring whispers from " + a + ".", b); notify("Remember, the room host, moderators, and fan club members will always be able to whisper you!", a); } else { notifyError('You did not specify a user to ignore. Type "/abhelp\u00a0ignore" to see how to use /ignore.', b); } } } /** * @param {string} a * @param {string} b * @return {undefined} */ function unignoreUser(a, b) { if (a == b) { notifyError("My, you are an odd one, aren't you?", b); } else { if (cbjs.arrayContains(ignoreArray[findIgnorer(b)], a)) { cbjs.arrayRemove(ignoreArray[findIgnorer(b)], a); notify("You are no longer ignoring whispers from " + a, b); } else { if (a) { notifyError(a + " is not being ignored. There is no need to unignore " + a, b); } else { notifyError('You did not specify a user to unignore. Type "/abhelp\u00a0unignore" to see how to use /unignore.', b); } } } } /** * @param {(Object|string)} a * @param {string} b * @return {?} */ function setTipTitles(a, b) { /** @type {string} */ var c = ""; if ("Yes" == cb.settings.kingTipper) { if (a == currentKing) { /** @type {string} */ c = " " + cb.settings.crownIcon + " "; } } /** @type {string} */ var d = c + "|" + getUserTotal(a) + "| " + b; return d; } /** * @param {string} a * @param {string} b * @param {string} c * @return {undefined} */ function emod(a, b, c) { if (b) { b = b.toLowerCase(); } if ("add" == a) { if (cbjs.arrayContains(emodArray, b)) { notifyError(b + " has already been granted emergency moderator powers.", c); } else { emodArrayPopulate(b); modAndEmodArrayPopulate(b); modBlockMsgArrayPopulate(b); notify("Emergency moderator powers have been granted to " + b, c); notify("You have been granted emergency moderator powers by " + c, b); } } else { if ("remove" == a) { if (cbjs.arrayContains(emodArray, b)) { emodArrayDepopulate(b); notify("Emergency moderator powers have been removed from " + b, c); notify("Your emergency moderator powers have been removed by " + c, b); } else { notifyError(b + " has not been granted emergency moderator powers.", c); } } else { if (a) { notifyError(a + ' is not a valid option for /emod. Type "/abhelp\u00a0emod" to see how to use /emod.', c); } else { notifyError('You did not enter a valid option for /emod. Type "/abhelp\u00a0emod" to see how to use /emod.', c); } } } } /** * @param {string} a * @param {string} b * @return {undefined} */ function blockNotice(a, b) { if ("on" == a) { if (cbjs.arrayContains(modBlockMsgArray, b)) { notifyError("Your Blocked Message notices are already turned on", b); } else { modBlockMsgArrayPopulate(b); notify("You have turned ON Blocked Message notices. To turn them back off again, type: /blocknotice\u00a0off", b); } } else { if ("off" == a) { if (cbjs.arrayContains(modBlockMsgArray, b)) { modBlockMsgArrayDepopulate(b); notify("You have turned OFF Blocked Message notices. To turn them back on again, type: /blocknotice\u00a0on", b); } else { notifyError("Your Blocked Message notices are already turned off", b); } } else { if (a) { notifyError(a + ' is not a valid option for /blocknotice. Type "/abhelp\u00a0blocknotice" to see how to use /blocknotice.', b); } else { notifyError('You did not enter a valid option for /blocknotice. Type "/abhelp\u00a0blocknotice" to see how to use /blocknotice.', b); } } } } /** * @return {undefined} */ function kingSpam() { clearTimeout(kingTimeout); /** @type {number} */ kingTimeout = setTimeout(kingSpamTimer, kingTimer * minuteMS); } /** * @return {undefined} */ function kingSpamTimer() { if (kingTip < kingMin) { var a = kingMin } else { a = kingTip + 1; } if (1 == kingTipperSpam) { notifyTheme(" " + cb.settings.crownIcon + " Tip a total of " + a + " to be the new " + cb.settings.kingMessage + "! " + cb.settings.crownIcon); kingSpam(); } } /** * @param {number} a * @param {string} b * @return {?} */ function showLeaders(a, b) { var c; /** @type {string} */ var d = ""; if (!tipArray.length) { return void notifyError("No tips yet", b); } sortTipArray(); /** @type {number} */ c = 0; for (;c < a && c < tipArray.length;c += 1) { d += (c ? "\n" : "") + (c + 1) + ".\u00a0\u00a0" + tipArray[c].sUser + "\u00a0\u00a0(" + tipArray[c].nTotal + " tokens)"; } cb.setTimeout(function() { notifyThemeBold(bullets + "Leader Board" + bullets, b); }, 500); cb.setTimeout(function() { notifyTheme(d + "\n", b); }, 1500); } /** * @return {undefined} */ function ldrSpam() { clearTimeout(ldrTimeout); /** @type {number} */ ldrTimeout = setTimeout(ldrSpamTimer, ldrTimer * minuteMS); } /** * @return {undefined} */ function ldrSpamTimer() { if ("Yes" == cb.settings.leaderBoard) { if (1 == leaderboardSpam) { if (tipArray.length) { showLeaders(5, ""); } ldrSpam(); } } } /** * @param {string} a * @return {undefined} */ function showLeaderBoard(a) { if ("Yes" == cb.settings.leaderBoard) { showLeaders(10, a); } else { notifyError("The room host has decided not to use the Leaderboard feature.", a); } } /** * @return {undefined} */ function notifierSpam() { /** @type {number} */ notifierTimeout = setTimeout(function() { if (1 == notifierSpamTGL) { if (noticeArray.length) { sendRotating(); notifierSpam(); } } }, notifierTimer * minuteMS); } /** * @param {?} a * @return {undefined} */ function addNotice(a) { if (!isBlank(a)) { a = a.replace(/((\\|\/)n|\{newline\})/gi, "\n"); noticeArray.push(a); } } /** * @return {undefined} */ function parseRotating() { addNotice(cb.settings.spamMessage1); addNotice(cb.settings.spamMessage2); addNotice(cb.settings.spamMessage3); addNotice(cb.settings.spamMessage4); addNotice(cb.settings.spamMessage5); addNotice(cb.settings.spamMessage6); addNotice(cb.settings.spamMessage7); addNotice(cb.settings.spamMessage8); addNotice(cb.settings.spamMessage9); addNotice(cb.settings.spamMessage10); } /** * @return {undefined} */ function sendRotating() { if (noticeArray.length) { if (noticeArray[noticeNum]) { notifyThemePlain(noticeArray[noticeNum]); } noticeNum += 1; if (noticeNum >= noticeArray.length) { /** @type {number} */ noticeNum = 0; } } } /** * @param {string} a * @return {?} */ function dospamWordlist(a) { var b = a.trim().replace(/([^\w\s\u0027\u2019\[\]]|_)/gi, " "); /** @type {null} */ var c = null; /** @type {RegExp} */ var d = new RegExp("((^|\\s)[^\\s]\\s[^\\s]\\s[^\\s]($|\\s))", "i"); /** @type {RegExp} */ var e = new RegExp("\\b(s+k+(y|i)*p+e|s+k+y*p|(f+r+e+e|unlimited).*t+o+k+e+n|t+o+k+e+n+s.*(f+r+e+e|generator)|(free)|(chaturbate)|(CB)|(camgasm)|(erotimo)|(freecambook)|(webcam23)|(hotjenny)|(fucktubate)|(gaysexrooms)|(fastsexnow)|(alva lanus)|(Delorge942)|(Glasford597)|(hot707man)|sk .*y p e|\\[LEAK(ED)*\\]|(SwipeGirls)|\\[GET\\]|(kikcams)|(swipegirls)|(EllaGo)|(XCLIT)|(cialis)|(viagra)|(YesPills)|(pornmeds)|(dateflirter)|(kikfuck)|(K.I.K)|(Aly.Sky)\\b|\\b(www)|(http)|(com)|(dot)|(cam)|(cams)|(cam2)|(c2c)|(cam2cam)|(pr0file)|(bi0)|(clk)|(klk)|(lkkl)|(chk)|(chrb)|(hola)|(bonjour)|(tap)|(open)|(c\u0430mchats)|(join)|(club))\\b", "i"); /** @type {RegExp} */ var f = new RegExp("\\b((May b eSex?)|(Ma y beSex?)|(M aybeSex?)|(M aybe Sex?)|(Ma ybeSex?)|(Ma ybe Sex?)|(May beSex?)|(Mayb eSex?)|(Mayb e Sex?)|(May be Sex?)|(MaybeSex?)|(Maybe Sex?)|(May b eFuck?)|(Ma y beFuck?)|(M aybeFuck?)|(M aybe Fuck?)|(Ma ybeFuck?)|(Ma ybe Fuck?)|(May beFuck?)|(Mayb eFuck?)|(Mayb e Fuck?)|(May be Fuck?)|(MaybeFuck?)|(Maybe Fuck?)\\b|\\b(Watch My Page)|(add me)|(nice view)|(i am very sexy girl)|(guys watch my)|(tap my show)|(my chat)|(m m)|(mm rubbing)|(watch me)|(i am new on chrb)|(new here)|(im new)|(i am new)|(i m new)|(i n new)|(im newbie)|(i am newbie)|(i m newbie)|(i n newbie)|(i am wet)|(i am so wet)|(im wet)|(i m wet)|(i m so wet)|(i n wet)|(i n so wet)|(im so wet)|(im hot)|(i m hot)|(i n hot)|(i am hot)|(i am so hot)|(im so hot)|(i m so hot)|(i n so hot)|(my profile)|(see my profile)|(see my bio)|(look in my profile)|(look at my profile)|(look in my bio)|(look at my bio)\\b|\\b(check my profile)|(want to date)|(check my bio)|(click on me)|(click my profile)|(click on my profile)|(click on my bio)|(tap my bio)|(tap my profile)|(i just signed)|(link in my bio)|(link in my profile)|(want free tokens)|(free chaturbate tokens)|(tok\u200c\u200cen ge\u200cner\u200cat\u200c\u200cor)|(Cant tip)|(see my page for free tokens)|(open my bio)|(open my profile)|(open me now))\\b", "i"); switch(true) { case -1 != b.search(d): /** @type {string} */ c = "Spam Wordlist"; break; case -1 != b.search(e): /** @type {string} */ c = "Spam Wordlist"; break; case -1 != b.search(f): /** @type {string} */ c = "Spam Wordlist"; } return c; } /** * @param {string} a * @return {?} */ function dogreyWordlist(a) { var b = a.trim().replace(/([^\w\s\u0027\u2019\[\]]|_)/gi, " "); /** @type {null} */ var c = null; /** @type {RegExp} */ var d = new RegExp("[^\\x00-\\xAE\\u2000-\\u206F]"); /** @type {RegExp} */ var e = new RegExp("\\b(b+by|b+(a|e)*b+(y|e)*)\\b", "i"); /** @type {RegExp} */ var f = new RegExp("\\b(s+o+l+e+s*|t+o+e+s*)\\b|(f+e+e+t|f+o+o+t|p+e+d+i+c+u|f+o+t+j+o+b)", "i"); /** @type {RegExp} */ var g = new RegExp("\\b([a-g|i-z]*(h+u+)*m+m+h*|u+f+|#+)\\b", "i"); /** @type {RegExp} */ var h = new RegExp("\\b(s+q+u+i+r+t|k+e+e+p|s+m+e+l+l|s+t+i+c+k|p+l+a+y|s+l+a+p|s+p+a+n+k|f+a+k+e|f+a+c+k|t+i+p|t+i+p+s|a+s+s+h+o+l+e|a+n+a+l|h+o+l+e|c+u+n+t|w+a+n+t|w+a+n+n+a|m+o+r+e|e+a+t|t+a+s+t+e|t+a+s+t+i+n+g|t+a+s+t+y|l+i+c+k|l+i+c+k+i+n+g|t+u+r+d|e+n+e+m+a|d+e+f+e+c+a+t|a+t+m|s+h+i+t|s+h+a+r+t|c+r+a+p|p+o+o+p|p+o+o|p+i+s+s|f+a+r+t|d+a+d|d+a+u+g+h+t+e+r|s+i+s+t+e+r|b+r+o+t+h+e+r|r+a+p+e|r+a+p+i+s+t|s+l+u+t|s+k+a+n+k|w+h+o+r+e|b+i+t+c+h|b+o+r+e+d|b+o+r+i+n+g|d+i+e|f+a+t|u+g+l+y|a+r+b+y+s|r+o+a+s+t|b+e+e+f|r+o+a+s+t+b+e+e+f|b+u+r+g+e+r)\\b|\\b(m+e+a+t+y|m+e+a+t|t+r+a+n+s|t+r+a+n+n+y|t+r+a+n|d+i+c+k|d+i+c+k+s|b+o+n+e+r|c+o+k+k|c+o+c+k+k|c+o+c+k|c+o+c+k+s|w+a+n+k|j+e+r+k|j+e+r+k+i+n+g|f+c+k|p+o+u+n+d|s+h+o+v+e|s+m+a+c+k|f+i+n+g+e+r|b+l+o+w|b+l+o+w+j+o+b|o+p+e+n|d+o+g+g+y|d+o+g+g+i+e|s+h+o+w|f+l+a+s+h|h+a+r+d|h+a+r+d+e+r|h+o+r+n+y|c+2+c|p+r+i+v+a+t+e|p+v+t|z+o+o+m|s+p+r+e+a+d|g+a+p+e|b+a+n+g|c+u+m|f+u+c+k|f+u+c+k+e+r|f+u+c+k+i+n+g|d+e+e+p|d+e+e+p+e+r|d+e+p+e+r|d+p|f+i+s+t|s+t+r+o+k|w+a+n+k|f+a+p|b+e+a+t|d+e+s+t+r+o+y|k+i+l+l|s+h+o+o+t|s+h+o+t|t+h+r+o+b|e+x+p+lo+d+e)\\b|\\b(s+u+c+k|s+u+c+k+i+n+g|p+u+t|p+u+s+h|b+i+g|h+u+g+e|p+u+s+s+y|p+u+s+s+i|a+s+s)\\b", "i"); /** @type {RegExp} */ var i = new RegExp("\\b((barack)|(obama)|(hillary)|(clinton)|(trump)|(brexit)|(anarchist)|(socialist)|(socialism)|(communist)|(communism)|(capitalist)|(capitalism)|(liberals)|(conservatives)|(vote)|(dnc)|(dnp)|(dpp)|(sdp)|(dems)|(democrat)|(democrats)|(gop)|(rnc)|(reps)|(republican)|(republicans)|(government)|(obamacare)|(affordable health care)|(vice)|(president)|(hitler)|(putin))\\b", "i"); /** @type {RegExp} */ var j = new RegExp("\\b((holy)|(pope)|(church)|(jesus)|(god)|(amen)|(christian)|(christians)|(anti)|(christ)|(antichrist)|(heathen)|(heatherns)|(athiest)|(atheists)|(atheism)|(jew)|(jews)|(muslim)|(muslims)|(isil)|(isis)|(gihad)|(jihad)|(infidel)|(buddha)|(buddism)|(satan)|(satanic)|(satanism))\\b", "i"); /** @type {RegExp} */ var k = new RegExp("\\b((nigger)|(nigga)|(negro)|(raghead)|(towelhead)|(burrhead)|(nappy)|(headed)|(sandnigger)|(african)|(brotha)|(bruh)|(brah)|(coon)|(jig)|(wigger)|(redneck)|(hillbilly)|(cracker)|(honkey)|(honky)|(pawg)|(blm)|(blacklivesmatter)|(blackpanthers)|(naacp)|(kkk)|(bbc)|(bwc))\\b", "i"); switch(true) { case a.length <= 1 || a.length > 500: /** @type {string} */ c = "Grey Wordlist"; break; case -1 != b.search(d): /** @type {string} */ c = "Grey Wordlist"; break; case -1 != b.search(e): /** @type {string} */ c = "Grey Wordlist"; break; case -1 != b.search(f): /** @type {string} */ c = "Grey Wordlist"; break; case -1 != b.search(g): /** @type {string} */ c = "Grey Wordlist"; break; case -1 != b.search(h): /** @type {string} */ c = "Grey Wordlist"; break; case -1 != b.search(i): /** @type {string} */ c = "Grey Wordlist"; break; case -1 != b.search(j): /** @type {string} */ c = "Grey Wordlist"; break; case -1 != b.search(k): /** @type {string} */ c = "Grey Wordlist"; } return c; } /** * @return {undefined} */ function parsecustomWordlist() { if (!isBlank(cb.settings.customWordlist)) { customWordlistRegex = cb.settings.customWordlist.replace(/^(\s|,|\|)+|(\s|,|\|)+$/gm, ""); customWordlistRegex = customWordlistRegex.replace(/\s*(,|\|)\s*/gm, "|"); customWordlistRegex = customWordlistRegex.replace(/[^\w|\s]/gm, " "); customWordlistRegex = customWordlistRegex.replace(/(\w)/gm, "$1+"); customWordlistRegex = customWordlistRegex.replace(/\s+/gm, "\\s*"); } } /** * @param {string} a * @return {?} */ function docustomWordlist(a) { a = a.replace(/[^\w]|_/gi, ""); /** @type {RegExp} */ var c = new RegExp("(" + customWordlistRegex + ")", "i"); return-1 != a.search(c) || -1 != a.replace(/[^\w]|\d|_/gi, "").search(c) ? "blocked" : void 0; } /** * @param {string} a * @return {undefined} */ function addWord(a) { cb.settings.customWordlist += "," + a; parsecustomWordlist(); } /** * @param {string} a * @return {undefined} */ function changefcIcon(a) { /** @type {string} */ cb.settings.fanclubIcon = a; } /** * @param {string} a * @return {undefined} */ function changesfcIcon(a) { /** @type {string} */ cb.settings.secondfanclubIcon = a; } /** * @param {string} a * @return {undefined} */ function changetfcIcon(a) { /** @type {string} */ cb.settings.thirdfanclubIcon = a; } /** * @param {string} a * @return {undefined} */ function changecrownIcon(a) { /** @type {string} */ cb.settings.crownIcon = a; } /** * @param {string} a * @param {string} b * @return {undefined} */ function fanclubToggle(a, b) { if ("on" == a) { if ("Yes" == cb.settings.fanclubToggle) { notifyError("The fan club is already turned on.", b); } else { /** @type {string} */ cb.settings.fanclubToggle = "Yes"; notify("You have turned on the fan club.", b); } } else { if ("off" == a) { if ("No" == cb.settings.fanclubToggle) { notifyError("The fan club is already turned off.", b); } else { /** @type {string} */ cb.settings.fanclubToggle = "No"; notify("You have turned off the fan club.", b); } } else { if (null != a) { notifyError(a + " is not a valid option for /fct.", b); } else { if (null == a) { notifyError("You did not enter a valid option for /fct.", b); } } } } } /** * @param {string} a * @param {string} b * @return {undefined} */ function secondfanclubToggle(a, b) { if ("on" == a) { if ("Yes" == cb.settings.secondfanclubToggle) { notifyError("The second fan club is already turned on.", b); } else { /** @type {string} */ cb.settings.secondfanclubToggle = "Yes"; notify("You have turned on the second fan club.", b); } } else { if ("off" == a) { if ("No" == cb.settings.secondfanclubToggle) { notifyError("The second fan club is already turned off.", b); } else { /** @type {string} */ cb.settings.secondfanclubToggle = "No"; notify("You have turned off the second fan club.", b); } } else { if (null != a) { notifyError(a + " is not a valid option for /sfct.", b); } else { if (null == a) { notifyError("You did not enter a valid option for /sfct.", b); } } } } } /** * @param {string} a * @param {string} b * @return {undefined} */ function secondfanclubToggle(a, b) { if ("on" == a) { if ("Yes" == cb.settings.thirdfanclubToggle) { notifyError("The third fan club is already turned on.", b); } else { /** @type {string} */ cb.settings.thirdfanclubToggle = "Yes"; notify("You have turned on the third fan club.", b); } } else { if ("off" == a) { if ("No" == cb.settings.thirdfanclubToggle) { notifyError("The third fan club is already turned off.", b); } else { /** @type {string} */ cb.settings.thirdfanclubToggle = "No"; notify("You have turned off the third fan club.", b); } } else { if (null != a) { notifyError(a + " is not a valid option for /tfct.", b); } else { if (null == a) { notifyError("You did not enter a valid option for /tfct.", b); } } } } } /** * @param {string} a * @param {string} b * @return {undefined} */ function whisperToggle(a, b) { if ("on" == a) { if ("Yes" == cb.settings.whisperToggle) { notifyError("The whisper function is already turned on.", b); } else { /** @type {string} */ cb.settings.whisperToggle = "Yes"; notify("You have turned on the whisper function.", b); } } else { if ("off" == a) { if ("No" == cb.settings.whisperToggle) { notifyError("The whisper function is already turned off.", b); } else { /** @type {string} */ cb.settings.whisperToggle = "No"; notify("You have turned off the whisper function.", b); } } else { if (null != a) { notifyError(a + " is not a valid option for /wt.", b); } else { if (null == a) { notifyError("You did not enter a valid option for /wt.", b); } } } } } /** * @param {string} a * @param {string} b * @return {undefined} */ function greyWordlistToggle(a, b) { if ("on" == a) { if ("Yes" == cb.settings.greyWordlistToggle) { notifyError("The word list is already turned on.", b); } else { /** @type {string} */ cb.settings.greyWordlistToggle = "Yes"; notify("You have turned on the word list.", b); } } else { if ("off" == a) { if ("No" == cb.settings.greyWordlistToggle) { notifyError("The word list is already turned off.", b); } else { /** @type {string} */ cb.settings.greyWordlistToggle = "No"; notify("You have turned off the word list.", b); } } else { if (null != a) { notifyError(a + " is not a valid option for /gwlt.", b); } else { if (null == a) { notifyError("You did not enter a valid option for /gwlt.", b); } } } } } /** * @param {string} a * @param {string} b * @return {undefined} */ function customWordlistToggle(a, b) { if ("on" == a) { if ("Yes" == cb.settings.customWordlistToggle) { notifyError("The custom word list is already turned on.", b); } else { /** @type {string} */ cb.settings.customWordlistToggle = "Yes"; notify("You have turned on the custom word list.", b); } } else { if ("off" == a) { if ("No" == cb.settings.customWordlistToggle) { notifyError("The custom word list is already turned off.", b); } else { /** @type {string} */ cb.settings.customWordlistToggle = "No"; notify("You have turned off the custom word list.", b); } } else { if (null != a) { notifyError(a + " is not a valid option for /cwlt.", b); } else { if (null == a) { notifyError("You did not enter a valid option for /cwlt.", b); } } } } } /** * @param {string} a * @param {string} b * @return {undefined} */ function spamWordlistToggle(a, b) { if ("on" == a) { if ("Yes" == cb.settings.spamWordlistToggle) { notifyError("The spam word list is already turned on.", b); } else { /** @type {string} */ cb.settings.spamWordlistToggle = "Yes"; notify("You have turned on the spam word list.", b); } } else { if ("off" == a) { if ("No" == cb.settings.spamWordlistToggle) { notifyError("The spam word list is already turned off.", b); } else { /** @type {string} */ cb.settings.spamWordlistToggle = "No"; notify("You have turned off the spam word list.", b); } } else { if (null != a) { notifyError(a + " is not a valid option for /swlt.", b); } else { if (null == a) { notifyError("You did not enter a valid option for /swlt.", b); } } } } } /** * @param {string} a * @param {string} b * @return {undefined} */ function tipMenuToggle(a, b) { if ("on" == a) { if ("Yes" == cb.settings.tipMenuToggle) { notifyError("The tip menu is already turned on.", b); } else { /** @type {string} */ cb.settings.tipMenuToggle = "Yes"; notify("You have turned on the tip menu.", b); } } else { if ("off" == a) { if ("No" == cb.settings.tipMenuToggle) { notifyError("The tip menu is already turned off.", b); } else { /** @type {string} */ cb.settings.tipMenuToggle = "No"; notify("You have turned off the tip menu.", b); } } else { if (null != a) { notifyError(a + " is not a valid option for /tmt.", b); } else { if (null == a) { notifyError("You did not enter a valid option for /tmt.", b); } } } } } /** * @param {string} a * @param {string} b * @return {undefined} */ function tipMenuNotifierToggle(a, b) { if ("on" == a) { if (1 == tipMenuSpam) { notifyError("The tip menu is already turned on.", b); } else { /** @type {number} */ tipMenuSpam = 1; tipmenuNotifierSpam(); notify("You have turned on the tip menu.", b); } } else { if ("off" == a) { if (0 == tipMenuSpam) { notifyError("The tip menu is already turned off.", b); } else { /** @type {number} */ tipMenuSpam = 0; notify("You have turned off the tip menu.", b); } } else { if (null != a) { notifyError(a + " is not a valid option for /tmnt.", b); } else { if (null == a) { notifyError("You did not enter a valid option for /tmnt.", b); } } } } } /** * @param {string} a * @param {string} b * @return {undefined} */ function tipMenuMessageNotifierToggle(a, b) { if ("on" == a) { if (1 == tipMenuMessageSpam) { notifyError("The tip menu messages are already turned on.", b); } else { /** @type {number} */ tipMenuMessageSpam = 1; notify("You have turned on the tip menu messages.", b); } } else { if ("off" == a) { if (0 == tipMenuMessageSpam) { notifyError("The tip menu messages are already turned off.", b); } else { /** @type {number} */ tipMenuMessageSpam = 0; notify("You have turned off the tip menu messages.", b); } } else { if (null != a) { notifyError(a + " is not a valid option for /tmmt.", b); } else { if (null == a) { notifyError("You did not enter a valid option for /tmmt.", b); } } } } } /** * @param {string} a * @param {string} b * @return {undefined} */ function invalidCommandToggle(a, b) { if ("on" == a) { if ("Yes" == cb.settings.invalidToggle) { notifyError("Invalid command error messages are already turned on.", b); } else { /** @type {string} */ cb.settings.invalidToggle = "Yes"; notify("You have turned on invalid command error messages.", b); } } else { if ("off" == a) { if ("No" == cb.settings.invalidToggle) { notifyError("Invalid command error messages are already turned off.", b); } else { /** @type {string} */ cb.settings.invalidToggle = "No"; notify("You have turned off invalid command error messages.", b); } } else { if (null != a) { notifyError(a + " is not a valid option for /ict.", b); } else { if (null == a) { notifyError("You did not enter a valid option for /ict.", b); } } } } } /** * @param {string} a * @param {string} b * @return {undefined} */ function fanclubtipsToggle(a, b) { if ("on" == a) { if ("Yes" == cb.settings.fanclubtips) { notifyError("Fan club tips is already turned on.", b); } else { /** @type {string} */ cb.settings.fanclubtips = "Yes"; notify("You have turned on fan club tips.", b); } } else { if ("off" == a) { if ("No" == cb.settings.fanclubtips) { notifyError("Fan club tips is already turned off.", b); } else { /** @type {string} */ cb.settings.fanclubtips = "No"; notify("You have turned off fan club tips.", b); } } else { if (null != a) { notifyError(a + " is not a valid option for /fctip.", b); } else { if (null == a) { notifyError("You did not enter a valid option for /fctip.", b); } } } } } /** * @param {string} a * @param {string} b * @return {undefined} */ function secondfanclubtipsToggle(a, b) { if ("on" == a) { if ("Yes" == cb.settings.secondfanclubtips) { notifyError("Second Fan club tips is already turned on.", b); } else { /** @type {string} */ cb.settings.secondfanclubtips = "Yes"; notify("You have turned on second fan club tips.", b); } } else { if ("off" == a) { if ("No" == cb.settings.secondfanclubtips) { notifyError("Second Fan club tips is already turned off.", b); } else { /** @type {string} */ cb.settings.secondfanclubtips = "No"; notify("You have turned off second fan club tips.", b); } } else { if (null != a) { notifyError(a + " is not a valid option for /sfctip.", b); } else { if (null == a) { notifyError("You did not enter a valid option for /sfctip.", b); } } } } } /** * @param {string} a * @param {string} b * @return {undefined} */ function thirdfanclubtipsToggle(a, b) { if ("on" == a) { if ("Yes" == cb.settings.thirdfanclubtips) { notifyError("Third Fan club tips is already turned on.", b); } else { /** @type {string} */ cb.settings.thirdfanclubtips = "Yes"; notify("You have turned on third fan club tips.", b); } } else { if ("off" == a) { if ("No" == cb.settings.thirdfanclubtips) { notifyError("Third Fan club tips is already turned off.", b); } else { /** @type {string} */ cb.settings.thirdfanclubtips = "No"; notify("You have turned off third fan club tips.", b); } } else { if (null != a) { notifyError(a + " is not a valid option for /tfctip.", b); } else { if (null == a) { notifyError("You did not enter a valid option for /tfctip.", b); } } } } } /** * @param {string} a * @param {string} b * @return {undefined} */ function autoSilenceSpamToggle(a, b) { if ("on" == a) { if ("Yes" == cb.settings.autoSilenceSpamToggle) { notifyError("Auto Silence Spam is already turned on.", b); } else { /** @type {string} */ cb.settings.autoSilenceSpamToggle = "Yes"; notify("You have turned on Auto Silence Spam.", b); } } else { if ("off" == a) { if ("No" == cb.settings.autoSilenceSpamToggle) { notifyError("Auto Silence Spam is already turned off.", b); } else { /** @type {string} */ cb.settings.autoSilenceSpamToggle = "No"; notify("You have turned off Auto Silence Spam.", b); } } else { if (null != a) { notifyError(a + " is not a valid option for /asst.", b); } else { if (null == a) { notifyError("You did not enter a valid option for /asst.", b); } } } } } /** * @param {string} a * @param {string} b * @param {string} c * @return {undefined} */ function niceList(a, b, c) { if (a) { a = a.toLowerCase(); if ("a" == c) { if (cbjs.arrayContains(niceArray, a)) { notifyError(a + " is already on the nice list.", b); } else { niceArrayPopulate(a); notify("You have added " + a + " to the nice list.", b); notify(b + " has added you to the nice list. You will be able to chat and use graphics regardless of the global room settings. Thank you for being nice!", a); } } else { if ("r" == c) { if (cbjs.arrayContains(niceArray, a)) { niceArrayDepopulate(a); notify("You have removed " + a + " from the nice list.", b); notify(b + " has removed you from the nice list.", a); } else { notifyError(a + " is not on the nice list.", b); } } } } else { notifyError('Uh oh. You didn\'t specify a user.\nType "/abhelp\u00a0nicelist" to see how to use the nice list.', b); } } /** * @param {string} a * @param {string} b * @param {string} c * @return {undefined} */ function greyList(a, b, c) { if (a) { a = a.toLowerCase(); if ("a" == c) { if (cbjs.arrayContains(greyArray, a)) { notifyError(a + " is already on the grey list.", b); } else { greyArrayPopulate(a); notify("You have added " + a + " to the grey list.", b); } } else { if ("r" == c) { if (cbjs.arrayContains(greyArray, a)) { greyArrayDepopulate(a); notify("You have removed " + a + " from the grey list.", b); } else { notifyError(a + " is not on the grey list.", b); } } } } else { notifyError('Uh oh. You didn\'t specify a user.\nType "/abhelp\u00a0greylist" to see how to use the grey list.', b); } } /** * @param {string} a * @param {string} b * @return {undefined} */ function kingSpamToggle(a, b) { if ("Yes" != cb.settings.kingTipper) { notifyError("The room host has decided not to use the King Tipper feature", b); } else { if ("on" == a) { if (1 == kingTipperSpam) { notifyError("The King Tipper spam is already turned on.", b); } else { /** @type {number} */ kingTipperSpam = 1; kingSpam(); notify("You have turned on King Tipper spam.", b); } } else { if ("off" == a) { if (0 == kingTipperSpam) { notifyError("The King Tipper spam is already turned off.", b); } else { /** @type {number} */ kingTipperSpam = 0; notify("You have turned off the King Tipper spam.", b); } } else { if (null != a) { notifyError(a + ' is not a valid option for /kingspam.\nType "/abhelp\u00a0kingspam" to see how to use /kingspam.', b); } else { if (null == a) { notifyError('You did not enter a valid option for /kingspam.\nType "/abhelp\u00a0kingspam" to see how to use /kingspam.', b); } } } } } } /** * @param {string} a * @param {string} b * @return {undefined} */ function notifierSpamToggle(a, b) { if ("on" == a) { if (1 == notifierSpamTGL) { notifyError("The Notifier spam is already turned on.", b); } else { /** @type {number} */ notifierSpamTGL = 1; notify("You have turned on the Notifier spam.", b); } } else { if ("off" == a) { if (0 == notifierSpamTGL) { notifyError("The Notifier spam is already turned off.", b); } else { /** @type {number} */ notifierSpamTGL = 0; notify("You have turned off the Notifier spam.", b); } } else { if (null != a) { notifyError(a + ' is not a valid option for /notifierspam.\nType "/abhelp\u00a0notifierspam" to see how to use /notifierspam.', b); } else { if (null == a) { notifyError('You did not enter a valid option for /notifierspam.\nType "/abhelp\u00a0notifierspam" to see how to use /notifierspam.', b); } } } } } /** * @param {string} a * @param {string} b * @return {undefined} */ function leaderboardSpamToggle(a, b) { if ("on" == a) { if (1 == leaderboardSpam) { notifyError("The Leaderboard spam is already turned on.", b); } else { /** @type {number} */ leaderboardSpam = 1; ldrSpam(); notify("You have turned on the Leaderboard spam.", b); } } else { if ("off" == a) { if (0 == leaderboardSpam) { notifyError("The Leaderboard spam is already turned off.", b); } else { /** @type {number} */ leaderboardSpam = 0; notify("You have turned off the Leaderboard spam.", b); } } else { if (null != a) { notifyError(a + ' is not a valid option for /leaderboardspam.\nType "/abhelp\u00a0leaderboardspam" to see how to use /leaderboardspam.', b); } else { if (null == a) { notifyError('You did not enter a valid option for /leaderboardspam.\nType "/abhelp\u00a0leaderboardspam" to see how to use /leaderboardspam.', b); } } } } } /** * @param {?} a * @return {?} */ function isBlank(a) { var b; return a && (b = a.trim()), null == b || ("" == b || "[Optional" == b.substr(0, 9)) ? true : false; } /** * @param {Function} a * @return {?} */ function isValidColor(a) { /** @type {Function} */ var b = a; /** @type {string} */ var c = "0123456789abcdefABCDEF"; /** @type {boolean} */ var d = true; if ("#" == b.charAt(0) && (b = b.substr(1)), b && 6 == b.length) { /** @type {number} */ var e = 0; for (;e < 6;e++) { if (-1 == c.indexOf(b.charAt(e))) { /** @type {boolean} */ d = false; } } } else { /** @type {boolean} */ d = false; } return d ? true : (notifyErrorBold('"' + a + '" is not a valid color option.', roomHost), notifyError("Use html-color-codes.info to find the code for the color you want.\nReverting to default color.", roomHost), false); } /** * @return {undefined} */ function setColor() { var a = cb.settings.colorscheme; var b = cb.settings.darkcolor.trim(); var c = cb.settings.lightcolor.trim(); if (a && "Custom" == a.substr(0, 6)) { if (isBlank(c) && isBlank(b)) { notifyErrorBold("Whoops. You selected a custom color scheme but you didn't fill in the colors. Reverted to default color scheme.", roomHost); } else { if (isBlank(b)) { notifyErrorBold("Whoops. You selected a custom color scheme but you didn't select a text color. Reverted to default color scheme.", roomHost); } else { if (isBlank(c) && !isBlank(b)) { if (b) { if ("#" != b.charAt(0)) { /** @type {string} */ b = "#" + b; } } if (isValidColor(b)) { theme_dark = b; theme_light = white; } } else { if (!isBlank(c)) { if (!isBlank(b)) { if (b) { if ("#" != b.charAt(0)) { /** @type {string} */ b = "#" + b; } } if (c) { if ("#" != c.charAt(0)) { /** @type {string} */ c = "#" + c; } } if (isValidColor(b)) { if (isValidColor(c)) { theme_dark = b; theme_light = c; } } } } } } } } else { if (!(isBlank(b) && isBlank(c))) { notifyErrorBold('You defined custom colors, but your color scheme is set to "' + a + '". In order to use your custom colors, please set your color scheme to "Custom"', roomHost); } if ("Purple" == a) { theme_dark = purple_dark; theme_light = purple_light; } else { if ("Pink" == a) { theme_dark = pink_dark; theme_light = pink_light; } else { if ("Halloween" == a) { theme_dark = halloween_dark; theme_light = halloween_light; } else { if ("Red" == a) { theme_dark = red_dark; theme_light = red_light; } else { if ("Christmas" == a) { theme_dark = christmas_dark; theme_light = christmas_light; } else { if ("Blue" == a) { theme_dark = blue_dark; theme_light = blue_light; } else { if ("Green" == a) { theme_dark = green_dark; theme_light = green_light; } } } } } } } } } /** * @param {string} a * @param {string} b * @return {undefined} */ function help(a, b) { /** @type {number} */ var c = 0; switch(null == a && (a = ""), a) { case "": /** @type {number} */ c = 1; notifyBold("All in one Bot Help Menu", b); notify('Type "/abhelp\u00a0x", where x is one of the following choices, for more detailed information.\nEx: /abhelp\u00a0commands', b); notifyPlain("commands\nnicelist\ngreylist\nabout", b); break; case "commands": /** @type {number} */ c = 1; notifyBold("All in one Bot Help Menu", b); notify('Type "/abhelp\u00a0x", where x is one of the following choices, for more detailed information.\nEx: /abhelp\u00a0commands', b); notifyPlain("/greyson\n/greysoff\n/silencelevel\n/graphiclevel\n/silence\n/unsilence\n/silencelast\n/starttimer\n/stoptimer\n/addtime\n/minustime\n/timeleft\n/cn\n/cnd\n/cndh\n/cnh\n/bc\n/tm\n/tbm\n/tv\n/addnotice\n/removenotice\n/shownotices\n/noticetimer\n/whisper\n/reply\n/ignore\n/unignore\n/ignorelevel\n/emod\n/addnice\n/removenice\n/addgrey\n/removegrey\n/addword\n/leaderboard\n/tipmenu\n/viplist\n/addvip\n/removevip\n/nickmod\n/nickname\n/nicknames\n/kingspam", b); break; case "nicelist": notifyBold("The Nice List", b); notify("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.", b); /** @type {number} */ c = 1; break; case "greylist": /** @type {number} */ c = 1; notifyBold('The "Grey" List', b); notify("Sometimes, there are users whose comments are annoying, in spite of the fact that they may have tokens or even tip. It isn't always desireable to silence these people entirely, especially if they've been tipping, but it can be useful to apply the same word list restrictions that apply to greys, so that the more annoying messages don't get through to the room. To fix this problem, hosts and mods can add users to the \"Grey\" List. Users who are on the grey list will have their messages subjected to the wordlists that apply to greys.", b); notify("", b); break; case "about": /** @type {number} */ c = 1; notifyBold("About All in one Bot", b); notify("All in one Bot is a fork of Ultra Bot, with continuing development by lund0894.\nUltra Bot was written by Justin of the Chaturbate couple britney_and_justin.\nComments, suggestions, requests, and bug reports can be communicated by either tweeting @lund08940, or by posting comments on All in one Bot's page at chaturbate.com/bots.\nThe purpose of All in one Bot is to make the lives of hosts and mods as easy as possible. It adds popular features such as King Tipper, Leaderboard, and Notifier, pre-silences abusive messages, grants quite a bit of power to moderators, and allows private messages to be sent in the main chat window.", b); notify("", b); break; case "greyson": ; case "greyon": ; case "grayson": ; case "grayon": ; case "silencegreys": ; case "selencegrays": /** @type {number} */ c = 1; notifyBold("/greyson Help", b); notify('/greyson is a command that is usable by moderators and room hosts.\nThe syntax for using greyson is "/greyson".\nThe effect of /greyson is the same as silence level 0, which allows voice priveleges from greys.\n/greyon, /grayson, /grayon, /silencegreys, and /silencegrays are all available commands that will turn greys on.\nThe effect of /greyson can be reversed by using the command /greysoff.', b); notify("", b); break; case "greysoff": ; case "greyoff": ; case "graysoff": ; case "grayoff": ; case "unsilencegreys": ; case "unselencegrays": /** @type {number} */ c = 1; notifyBold("/greysoff Help", b); notify('/greysoff is a command that is usable by moderators and room hosts.\nThe syntax for using greysoff is "/greysoff".\nThe effect of /greysoff is the same as silence level 1, which revokes voice priveleges from greys.\n/greyoff, /graysoff, /grayoff, /unsilencegreys, and /unsilencegrays are all available commands that will turn greys off.\nThe effect of /greysoff can be reversed by using the command /greyson.', b); notify("", b); break; case "silencelevel": /** @type {number} */ c = 1; notifyBold("/silencelevel Help", b); notify('/silencelevel is a command that is usable by moderators and room hosts.\nThe syntax for using silencelevel is "/silencelevel\u00a0x", 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 greys, setting it to 2 will revoke voice privileges from greys and light blues, setting it to 3 will revoke voice privileges from users who have not tipped,and setting it to 4 will revoke voice privileges from everyone other than mods and fans.\nThe default setting for /silencelevel is 0.\nRoom hosts, moderators, and fan club members are unaffected by the Silence Level.', b); notify("", b); break; case "graphiclevel": /** @type {number} */ c = 1; notifyBold("/graphiclevel Help", b); notify('/graphiclevel is a command that is usable by moderators and room hosts.\nThe syntax for using graphiclevel is "/graphiclevel\u00a0x", where x is a number between 0 and 3.\nSetting the Graphic Level to 0 will grant graphic privileges to all users, setting it to 1 will revoke graphic privileges from greys, setting it to 2 will revoke graphic privileges from greys and light blues, setting it to 3 will revoke graphic privileges from users who have not tipped,and setting it to 4 will revoke graphic privileges from everyone other than mods and fans.\nThe default setting for /graphiclevel is 1.\nRoom hosts, moderators, and fan club members are unaffected by the Graphic Level.', b); notify("", b); break; case "silence": /** @type {number} */ c = 1; notifyBold("/silence Help", b); notify('/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.', b); notify("", b); break; case "unsilence": /** @type {number} */ c = 1; notifyBold("/unsilence Help", b); notify('/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!', b); notify("", b); break; case "silencelast": ; case "sl": /** @type {number} */ c = 1; notifyBold("/silencelast Help", b); notify('/silencelast is a command that is usable by moderators and room hosts.\nThe syntax for using silence last is "/silencelast", this will silence the most recent user that typed in chat.\nThe effect of /silencelast is the same as Chaturbate\'s silence feature, except that it lasts for the duration of the current session instead of for six hours.\n/sl is another available command that will silence last.\nThe effect of /silence can be reversed by using the command /unsilence.', b); notify("", b); break; case "starttimer": /** @type {number} */ c = 1; notifyBold("/starttimer Help", b); notify('/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.', b); notify("", b); break; case "stoptimer": ; case "endtimer": /** @type {number} */ c = 1; notifyBold("/stoptimer Help", b); notify('/stoptimer is a command that is usable by moderators and room hosts.\nThe syntax for using stoptimer is "/stoptimer", this will stop the current timer that is running.\n/endtimer is another available command that will stop the timer.', b); notify("", b); break; case "addtime": /** @type {number} */ c = 1; notifyBold("/addtime Help", b); notify('/addtime is a command that is usable by moderators and room hosts.\nThe syntax for using addtime is "/addtime\u00a0x", 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.', b); notify("", b); break; case "minustime": /** @type {number} */ c = 1; notifyBold("/minustime Help", b); notify('/minustime is a command that is usable by moderators and room hosts.\nThe syntax for using minustime is "/minustime\u00a0x", where x is the amount of time you want to subtract in minutes.\n/minustime will accept whole numbers only.\nSee the help section for starttimer for more information on timers.', b); notify("", b); break; case "timeleft": /** @type {number} */ c = 1; notifyBold("/timeleft Help", b); notify("/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.", b); notify("", b); break; case "cn": ; case "sendnotice": /** @type {number} */ c = 1; notifyBold("/cn Help", b); notify('/cn is a command that is usable by moderators and room hosts.\nThe syntax for this command is /cn x, where x is the message you want to send to the main chat.\nUsing "/cn r x" - where x is the message to be sent - will send the message in red instead of the default color for notices.\n/sendnotice is also a command that will send notices to the chat.', b); notify("", b); break; case "cnd": /** @type {number} */ c = 1; notifyBold("/cnd Help", b); notify('/cnd is a command that is usable by moderators and room hosts.\nThe syntax for this command is /cnd x, where x is the message you want to send to the main chat.\nThe message will be sent with divider lines.\nUsing "/cnd r x" - where x is the message to be sent - will send the message in red instead of the default color for notices.', b); notify("", b); break; case "cndh": /** @type {number} */ c = 1; notifyBold("/cndh Help", b); notify('/cndh is a command that is usable by moderators and room hosts.\nThe syntax for this command is /cndh x, where x is the message you want to send to the main chat.\nThe message will be sent highlighted and with divider lines.\nUsing "/cndh r x" - where x is the message to be sent - will send the message in red instead of the default color for notices.', b); notify("", b); break; case "cnh": /** @type {number} */ c = 1; notifyBold("/cnh Help", b); notify('/cnh is a command that is usable by moderators and room hosts.\nThe syntax for this command is /cnh x, where x is the message you want to send to the main chat.\nThe message will be sent highlighted.\nUsing "/cnh r x" - where x is the message to be sent - will send the message in red instead of the default color for notices.', b); notify("", b); break; case "bc": ; case "pmm": /** @type {number} */ c = 1; notifyBold("/bc Help", b); notify("/bc is a command that is usable by moderators.\nThe syntax for this command is /bc x, where x is the message you want to send privately to the room host.\nThis can also be done using /pmm x.", b); notify("", b); break; case "tm": /** @type {number} */ c = 1; notifyBold("/tm Help", b); notify("/tm is a command that is usable by moderators and room hosts.\nThe syntax for this command is /tm x, where x is the message you want to send privately to all moderators as a group.", b); notify("", b); break; case "tbm": /** @type {number} */ c = 1; notifyBold("/tbm Help", b); notify("/tm is a command that is usable by moderators and room hosts.\nThe syntax for this command is /tm x, where x is the message you want to send privately to all moderators as a group and the room host.", b); notify("", b); break; case "tv": /** @type {number} */ c = 1; notifyBold("/tv Help", b); notify("/tv is a command that is usable by moderators and room hosts.\nThe syntax for this command is /tv x y, where x is the user who will receive the message, and y is the message to be sent.", b); notify("", b); break; case "addnotice": ; case "addnote": /** @type {number} */ c = 1; notifyBold("/addnotice Help", b); notify('/addnotice is a command that is usable by moderators and room hosts.\nThe syntax for using add notice is "/addnotice x", where x is the notice message you want to add to the rotating notifier.\n/addnote is another available command that will add a notice.\nAdd notice will add a notice message to the rotating notifier, these notices will be displayed in the main chat window at a selected interval.\nAdd notice can be reversed by using the /removenotice command.', b); notify("", b); break; case "removenotice": ; case "removenote": /** @type {number} */ c = 1; notifyBold("/removenotice Help", b); notify('/removenotice is a command that is usable by moderators and room hosts.\nThe syntax for using remove notice is "/removenotice x", where x is the number of the notice message you want to remove to the rotating notifier.\n/removenote is another available command that will remove a notice.\nUse the command /shownotices to view all the notices in the rotating notifier and determine the number of the notice you want to remove.\nRemove notice will remove a notice message from the rotating notifier.', b); notify("", b); break; case "shownotices": /** @type {number} */ c = 1; notifyBold("/shownotices Help", b); notify('/shownotices is a command that is usable by moderators and room hosts.\nThe syntax for using show notices is "/shownotices.\nShow notices will show all the notice messages in the rotating notifier, the number next to each notice is used in the command /removenotice.', b); notify("", b); break; case "noticetimer": /** @type {number} */ c = 1; notifyBold("/noticetimer Help", b); notify('/noticetimer is a command that is usable by moderators and room hosts.\nThe syntax for using notice timer is "/noticetimer x", where x is the number of minutes you want between notice messages for the rotating notifier.\nUsing this command will replace the minute interval between notices that was set at the beginning of the session.', b); notify("", b); break; case "whisper": ; case "w": ; case "tell": ; case "t": ; case "pm": /** @type {number} */ c = 1; notifyBold("/whisper Help", b); notify('/whisper is a command that is usable by everyone.\nThe syntax for using whisper is "/whisper\u00a0x\u00a0y", where x is the username of the user you want to send a whisper and y is the message you want to send.\n/whisper, /w, /tell, /t, and /pm are all available commands that will send a whisper.\nA whisper is a private message that will be sent in the main chat window.\nOther related commands are /reply, /ignore, /unignore, and /ignorelevel.', b); notify("", b); break; case "reply": ; case "r": /** @type {number} */ c = 1; notifyBold("/reply Help", b); notify('/reply is a command that is usable by everyone.\nThe syntax for using whisper is "/reply\u00a0x", where x is message that you want to whisper to the user who most recently sent a whisper to you.\n/reply and /r are available commands that will send a whisper in reply.\nSee the help section for whisper for more information on whispers.\nOther related commands are /whisper, /ignore, /unignore, and /ignorelevel.', b); notify("", b); break; case "ignore": /** @type {number} */ c = 1; notifyBold("/ignore Help", b); notify('/ignore is a command that is usable by everyone.\nThe syntax for using ignore is "/ignore\u00a0x", where x is the user from whom you wish to ignore whispers.\nIgnoring a user will prevent him from sending you whispers, but it will not prevent him from talking normally in chat.\n/unignore will reverse the effect of /ignore.\nSee the help section for whisper for more information on whispers.\nOther related commands are /whisper, /reply, /unignore, and /ignorelevel.', b); notify("", b); break; case "unignore": /** @type {number} */ c = 1; notifyBold("/unignore Help", b); notify('/unignore is a command that is usable by everyone.\nThe syntax for using unignore is "/unignore\u00a0x", where x is the user you wish to remove from your ignore list.\nSee the help section for ignore for more information on ignoring users.\nSee the help section for whisper for more information on whispers.\nOther related commands are /whisper, /reply, /ignore, and /ignorelevel.', b); notify("", b); break; case "ignorelevel": /** @type {number} */ c = 1; notifyBold("/ignorelevel Help", b); notify('/ignorelevel is a command that determines which users you accept whispers from. It is usable by everyone.\nThe syntax for using ignorelevel is "/ignorelevel\u00a0x", where x is a number between 0 and 4.\nSetting it to 0 will allow all users to send you whispers.\nSetting it to 1 will prevent greys from sending you whispers.\nSetting it to 2 will prevent greys and light blues from sending you whispers.\nSetting it to 3 will prevent users who have not tipped in the room from sending you whispers.\nSetting it to 4 will prevent all users from sending you whispers.\nModerators and fan club members can send whispers regardless of whisper level.\nThe default setting for /ignorelevel is 4 for the broadcaster, and 0 for everyone else. (This broadcaster\'s level is set higher by default to prevent abuse of this feature.)\nSee the help section for whisper for more information on whispers\nOther related commands are /whisper, /reply, /ignore, and /unignore.', b); notify("", b); break; case "emod": /** @type {number} */ c = 1; notifyBold("/emod Help", b); notify('/emod is a command that is usable by moderators and room hosts.\nThe syntax for using emod is "/emod\u00a0x\u00a0y", 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.', b); notify("", b); break; case "blocknotice": /** @type {number} */ c = 1; notifyBold("/blocknotice Help", b); notify('/blocknotice is a command that is usable by moderators and room hosts.\nThe syntax for using blocknotice is "/blocknotice\u00a0x", where x is either "on" or "off".\n/blocknotice toggles the blocked message notices that appear by default for moderators when the wordlist is being used\nThe blocked message notifications are toggled on a per-user basis. (Toggling it for yourself does not toggle it for everyone.)', b); notify("", b); break; case "addnice": /** @type {number} */ c = 1; notifyBold("/addnice Help", b); notify('/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.', b); notify("", b); break; case "removenice": /** @type {number} */ c = 1; notifyBold("/removenice Help", b); notify('/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.', b); notify("", b); break; case "addgrey": ; case "addgray": /** @type {number} */ c = 1; notifyBold("/addgrey Help", b); notify('/addgrey is a command that is usable by moderators and room hosts.\nThe syntax for using addgrey is "/addgrey x", where x is the username of the user you want to add to the grey list.\nAdding a user to the grey list subjects them to the same wordlists that apply to greys. \nUsers can be removed from the grey list by using the command /removegrey.\nSee the help section for greylist for more information on the grey list.', b); notify("", b); break; case "removegrey": ; case "removegray": /** @type {number} */ c = 1; notifyBold("/removegrey Help", b); notify('/removegrey is a command that is usable by moderators and room hosts.\nThe syntax for using removegrey is "/removegrey x", where x is the username of the user you want to remove from the grey list.\nSee the help section for greylist for more information on the grey list.', b); notify("", b); break; case "abhelp": ; case "ubhelp": /** @type {number} */ c = 1; notifyBold("/abhelp\u00a0Help", b); notify('/abhelp\u00a0is a command that is usable by everyone.\nThe syntax for using abhelp is "/abhelp\u00a0x", where x is the subsection of the help menu that you want to access.', b); notify("", b); break; case "addword": /** @type {number} */ c = 1; notifyBold("/addword Help", b); notify('/addword is a command that is usable by moderators and room hosts.\nThe syntax for using add word is "/addword x", where x is the word you want to add to the custom word list.\nWords added using this command will only be used for the duration of the current session.\nThis command can only be used when the custom word list is active.', b); notify("", b); break; case "leaderboard": /** @type {number} */ c = 1; notifyBold("/leaderboard Help", b); notify('/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.', b); notify("", b); break; case "kingspam": /** @type {number} */ c = 1; notifyBold("/kingspam Help", b); notify('/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 be the new King!"', b); notify("", b); break; case "leaderboardspam": /** @type {number} */ c = 1; notifyBold("/leaderboardspam Help", b); notify("/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.", b); notify("", b); break; case "viplist": /** @type {number} */ c = 1; notifyBold("The VIP List", b); notify('Sometimes, there\'re users who are trusted regulars, and then the room host decides to do a "CrazyTicket" show, but these users don\'t have tokens to buy a ticket. It isn\'t always desirable (and it may even seem unfair) to leave these users out of the show. To fix this problem, hosts and mods can add these users to the VIP List. Users who are on the VIP List will have free access to any future CrazyTicket show, provided the list is exported to the app via the "/export" command.\nTo show the VIP list at any time, type /viplist.', b); notify("", b); break; case "addvip": /** @type {number} */ c = 1; notifyBold("/addvip Help", b); notify('/addvip is a command that is usable by moderators and room hosts.\nThe syntax for using addvip is "/addvip x", where x is the username of the user you want to add to the VIP list.\nAdding a user to the VIP list grants them free access to a future "CrazyTicket" show. \nUsers can be removed from the VIP list by using the command /removevip.\nSee the help section for viplist for more information on the VIP list.', b); notify("", b); break; case "removevip": /** @type {number} */ c = 1; notifyBold("/removevip Help", b); notify('/removevip is a command that is usable by moderators and room hosts.\nThe syntax for using removevip is "/removevip x", where x is the username of the user you want to remove from the VIP list.\nSee the help section for viplist for more information on the VIP list.', b); notify("", b); break; case "nickmod": /** @type {number} */ c = 1; notifyBold("/nickmod Help", b); notify('/nickmod is a command that is usable by the room hosts.\nThe syntax for using nickmod is "/nickmod".\nUsing this command will enable or disable the ability for mods to use the nickname feature.', b); notify("", b); break; case "nickname": /** @type {number} */ c = 1; notifyBold("/nickname Help", b); notify('/nickname is a command that is usable by moderaters and the room hosts.\nThe syntax for using nickname is "/nickname x y", where x is the user and y is the nickname that should be added.\nif no new nickname is specified the existing nickname for this user is deleted.', b); notify("", b); break; case "nicknames": /** @type {number} */ c = 1; notifyBold("/nicknames Help", b); notify('/nicknames is a command that is usable by moderaters and the room hosts.\nThe syntax for using nicknames is "/nicknames".\nthis command will output a list of all assigned nicknames.', b); notify("", b); break; case "tipmenu": /** @type {number} */ c = 1; notifyBold("/tipmenu Help", b); notify('/tipmenu is a command that is usable by everyone.\nThe syntax for using tip menu is "/tipmenu".\n/Tip menu shows the models tip menu.', b); notify("", b); } if (0 == c) { notifyError(a + ' is not a valid subsection of the help menu. Type "/abhelp" to access the main help menu.', b); } } /** * @param {?} a * @return {?} */ function isFC(a) { return a in fcMembers; } /** * @param {?} a * @return {undefined} */ function makeFC(a) { fcMembers[a] = { u : 1 }; } /** * @param {?} a * @return {undefined} */ function unmakeFC(a) { delete fcMembers[a]; } /** * @param {?} a * @return {undefined} */ function setFC(a) { fcMembers[a] = { u : 1 }; } /** * @param {?} a * @return {undefined} */ function unsetFC(a) { delete fcMembers[a]; } /** * @param {?} a * @return {?} */ function isSFC(a) { return a in sfcMembers; } /** * @param {?} a * @return {undefined} */ function makeSFC(a) { sfcMembers[a] = { u : 1 }; } /** * @param {?} a * @return {undefined} */ function unmakeSFC(a) { delete sfcMembers[a]; } /** * @param {?} a * @return {undefined} */ function setSFC(a) { sfcMembers[a] = { u : 1 }; } /** * @param {?} a * @return {undefined} */ function unsetSFC(a) { delete sfcMembers[a]; } /** * @param {?} a * @return {?} */ function isTFC(a) { return a in tfcMembers; } /** * @param {?} a * @return {undefined} */ function makeTFC(a) { tfcMembers[a] = { u : 1 }; } /** * @param {?} a * @return {undefined} */ function unmakeTFC(a) { delete tfcMembers[a]; } /** * @param {?} a * @return {undefined} */ function setTFC(a) { tfcMembers[a] = { u : 1 }; } /** * @param {?} a * @return {undefined} */ function unsetTFC(a) { delete tfcMembers[a]; } /** * @return {undefined} */ function grabSettings() { if (cb.log("starting grabbing settings"), cb.settings.fcMemberList) { var a = cb.settings.fcMemberList.split(","); /** @type {number} */ var b = 0; for (;b < a.length;b++) { var c = a[b].toLowerCase().replace(/ /g, ""); fcMembers[c] = { u : 1 }; } } if (cb.settings.sfcMemberList) { var d = cb.settings.sfcMemberList.split(","); /** @type {number} */ b = 0; for (;b < d.length;b++) { c = d[b].toLowerCase().replace(/ /g, ""); sfcMembers[c] = { u : 1 }; } } if (cb.settings.tfcMemberList) { var e = cb.settings.tfcMemberList.split(","); /** @type {number} */ b = 0; for (;b < e.length;b++) { c = e[b].toLowerCase().replace(/ /g, ""); tfcMembers[c] = { u : 1 }; } } cb.log("finished grabbing settings"); } /** @type {Array} */ cb.settings_choices = [{ name : "colorscheme", label : "1.) PERSONALIZATION ........................................... Color Scheme:", type : "choice", choice1 : "Purple", choice2 : "Pink", choice3 : "Blue", choice4 : "Red", choice5 : "Green", choice6 : "Halloween", choice7 : "Christmas", choice8 : "Custom (Please define below)", required : false }, { name : "darkcolor", label : "Custom Text Color (Html #code)", type : "str", defaultValue : '[Optional - Set color scheme to "Custom" above]', required : false }, { name : "lightcolor", label : "Custom Highlight Color (Html #code)", type : "str", defaultValue : '[Optional - Set color scheme to "Custom" above]', required : false }, { name : "crazyNoteColorscheme", label : "Crazy Note Color Scheme (Only for /cn /cnd /cnh /cndh) - Theme is colors picked above", type : "choice", choice1 : "Theme", choice2 : "Custom (Please define below)", defaultValue : "Theme", required : false }, { name : "crazyNoteText", label : "Custom Text Color - HTML color code (without #)", type : "str", defaultValue : '[Optional - Set color scheme to "Custom" above]', required : false }, { name : "crazyNoteBackground", label : "Custom Highlight Color - HTML color code (without #)", type : "str", defaultValue : '[Optional - Set color scheme to "Custom" above]', required : false }, { name : "enterMessage", label : "Welcome Message", type : "str", minLength : 1, maxLength : 1E3, defaultValue : "[Optional - Leave blank in busy rooms, as it can cause CB bots to crash]", required : false }, { name : "capsToggle", label : "2.) ROOM CONTROL ................ Convert ALL CAPS to lowercase?", type : "choice", choice1 : "Yes", choice2 : "No", choice3 : "Only for greys", defaultValue : "Only for greys", required : false }, { name : "stickyToggle", label : "Prevent sticky keyyyyyyyyyyyyys?", type : "choice", choice1 : "Yes", choice2 : "No", choice3 : "Only for greys", defaultValue : "Only for greys", required : false }, { name : "defaultGraphicLevel", label : "Default Graphic Level (Who can use graphics?)", type : "choice", choice1 : "0 - (Everyone)", choice2 : "1 - (Color names only)", choice3 : "2 - (Dark blue names and higher)", choice4 : "3 - (Users who have tipped)", choice5 : "4 - (Only mods and fans)", defaultValue : "1 - (Color names only)", required : false }, { name : "defaultSilenceLevel", label : "Default Silence Level (Who can talk in chat?)", type : "choice", choice1 : "0 - (Everyone)", choice2 : "1 - (Color names only)", choice3 : "2 - (Dark blue names and higher)", choice4 : "3 - (Users who have tipped)", choice5 : "4 - (Only mods and fans)", defaultValue : "0 - (Everyone)", required : false }, { name : "niceList", label : "Nice List (Users who can always talk/use graphics)", type : "str", minLength : 1, maxLength : 1E3, defaultValue : "[Optional - Exact usernames, separated by commas]", required : false }, { name : "greyList", label : "Grey List (Usernames any color) who should always be subjected to grey wordlist and grey graphic level)", type : "str", minLength : 1, maxLength : 1E3, defaultValue : "[Optional - Exact usernames, separated by commas]", required : false }, { name : "silenceList", label : "Silence List (Users who are permanently silenced)", type : "str", minLength : 1, maxLength : 1E3, defaultValue : "[Optional - Exact usernames, separated by commas]", required : false }, { name : "silenceTipToggle", label : "Use tip to be un-silenced? (Only un-silences users silenced with the bot, not cb silences)", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "No", required : false }, { name : "silenceTipAmount", label : "Tip amount to become un-silenced", type : "int", minValue : 1, defaultValue : "100" }, { name : "greyWordlistToggle", label : "3.) GREY WORDLIST ............. Use grey wordlist feature for greys?", type : "choice", choice1 : "Yes", choice2 : "No (Skip to section 4)", defaultValue : "Yes", required : false }, { name : "greyWordlistNotice", label : "Notify sender when his/her message gets blocked?(all wordlist)", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "No", required : false }, { name : "greyWordlistShowModerators", label : "Notify moderators of blocked grey wordlist messages?", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "No", required : false }, { name : "greyWordlistShowBroadcaster", label : "Notify broadcaster of blocked grey wordlist messages?", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "No", required : false }, { name : "greyWordlistLevel", label : "Grey wordlist applies to", type : "choice", choice1 : "Only greys", choice2 : "Everyone", defaultValue : "Only greys", required : false }, { name : "customWordlistToggle", label : "4.) CUSTOM WORDLIST ................... Use custom wordlist feature?", type : "choice", choice1 : "Yes", choice2 : "No (Skip to section 5)", defaultValue : "Yes", required : false }, { name : "customWordlistShowModerators", label : "Notify moderators of blocked custom wordlist messages?", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "No", required : false }, { name : "customWordlistShowBroadcaster", label : "Notify broadcaster of blocked custom wordlist messages?", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "No", required : false }, { name : "customWordlist", label : "Custom wordlist", type : "str", minLength : 1, maxLength : 1E3, defaultValue : "[Optional - Exact words or phrases, separated by commas]", required : false }, { name : "customWordlistLevel", label : "Custom wordlist applies to", type : "choice", choice1 : "Only greys", choice2 : "Everyone", defaultValue : "Only greys", required : false }, { name : "spamWordlistToggle", label : "5.) SPAM WORDLIST .......................... Use spam wordlist feature?", type : "choice", choice1 : "Yes", choice2 : "No (Skip to section 6)", defaultValue : "Yes", required : false }, { name : "spamWordlistShowModerators", label : "Notify moderators of blocked spam wordlist messages?", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "No", required : false }, { name : "spamWordlistShowBroadcaster", label : "Notify broadcaster of blocked spam wordlist messages?", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "No", required : false }, { name : "spamWordlistLevel", label : "Spam wordlist applies to", type : "choice", choice1 : "Only greys", choice2 : "Everyone", defaultValue : "Only greys", required : false }, { name : "autoSilenceSpamToggle", label : "Automatically silence users who post spam?", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "Yes", required : false }, { name : "whisperToggle", label : "6.) WHISPERS ............................................... Use whisper feature?", type : "choice", choice1 : "Yes", choice2 : "No (Skip to section 7)", defaultValue : "Yes", required : false }, { name : "roomWhisperLevel", label : "Default whisper level (Who can send whispers?)", type : "choice", choice1 : "0 - (Everyone)", choice2 : "1 - (Color names only)", choice3 : "2 - (Dark blue names and higher)", choice4 : "3 - (Users who have tipped)", choice5 : "4 - (Only mods and fans)", defaultValue : "0 - (Everyone)", required : false }, { name : "hostWhisperLevel", label : "Broadcaster whisper level (Who can send YOU whispers?)", type : "choice", choice1 : "0 - (Everyone)", choice2 : "1 - (Color names only)", choice3 : "2 - (Dark blue names and higher)", choice4 : "3 - (Users who have tipped)", choice5 : "4 - (Only mods and fans)", defaultValue : "4 - (Only mods and fans)", required : false }, { name : "kingTipper", label : "7.) KING TIPPER ................................... Use 'King Tipper' feature?", type : "choice", choice1 : "Yes", choice2 : "No (Skip to section 8)", defaultValue : "Yes", required : false }, { name : "kingMin", label : "Minimum tip amount to become King:", type : "int", minValue : 1, maxValue : 1E3, defaultValue : 25, required : false }, { name : "kingTipperSpam", label : "Periodically announce tip required to become King?", type : "choice", choice1 : "Yes", choice2 : "No (Skip to section 7)", defaultValue : "Yes", required : false }, { name : "kingTipperTimer", label : "Interval (in mins) for king announcement", type : "int", minValue : 1, maxValue : 60, defaultValue : 7, required : false }, { name : "kingMessage", label : "Message to print here... Tip xx to be the new ______", type : "str", minLength : 1, maxLength : 30, defaultValue : "King", required : true }, { name : "crownIcon", label : "Crown Icon: used for King tipper (Use :GIFNAME with colon)", type : "str", minLength : 0, maxLength : 20, required : false, defaultValue : ":crownsilver" }, { name : "kingTipperToggle", label : "8.) ALL TIME HIGH TIP KING........................................ Use All Time High Tip King feature?", type : "choice", choice1 : "Yes", choice2 : "No (Skip to section 9)", defaultValue : "No (Skip to section 9)", required : true }, { name : "kingTipperName", label : "Reigning high tip king (username)", type : "str", minLength : 0, maxLength : 40, required : false, defaultValue : "[Username required when in use]" }, { name : "kingTipperTip", label : "Reigning high tip (token amount)", type : "int", minValue : 1, defaultValue : "1" }, { name : "kingTipperbgColor", label : "Background color for king tipper - HTML color code (without #)", type : "str", minLength : 0, maxLength : 6, required : false, defaultValue : "FFFFFF" }, { name : "kingTippertxtColor", label : "Text color for king tipper - HTML color code (without #)", type : "str", minLength : 0, maxLength : 6, required : false, defaultValue : "000000" }, { name : "kingTipperIcon", label : "Icon for king tipper (use :GIFNAME with colon)", type : "str", minLength : 0, maxLength : 40, required : false, defaultValue : ":crowngold" }, { name : "kingTipperNotifier", label : "Interval (in mins) for rotating king tipper message", type : "int", minValue : 1, maxValue : 60, defaultValue : 2, required : false }, { name : "leaderBoard", label : "9.) LEADERBOARD .............................. Use Leaderboard feature?", type : "choice", choice1 : "Yes", choice2 : "No (Skip to section 10)", defaultValue : "Yes", required : false }, { name : "leaderBoardSpam", label : "Periodically announce top 5 tippers?", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "Yes", required : false }, { name : "leaderBoardTimer", label : "Interval (in mins) for leaderboard announcement", type : "int", minValue : 1, maxValue : 60, defaultValue : 7, required : false }, { name : "notifierTip", label : "10.) TIP MESSAGES ..................... Show message when a user tips?", type : "choice", choice1 : "Yes", choice2 : "Privately to tipper only", choice3 : "No (Skip to section 11)", defaultValue : "Yes", required : false }, { name : "tipMessage", label : "Message to display", type : "str", minLength : 1, maxLength : 1E3, defaultValue : "Thank you for tipping, {username}!", required : false }, { name : "tipMessageMin", label : "Minimum tip to trigger message", type : "int", minValue : 1, maxValue : 1E6, defaultValue : 15, required : false }, { name : "tipMessageColorscheme", label : "Tip Message Color Scheme - Theme is Yellow and Black to match the tip colors", type : "choice", choice1 : "Theme", choice2 : "Custom (Please define below)", defaultValue : "Theme", required : false }, { name : "tipMessageText", label : "Custom Text Color - HTML color code (without #)", type : "str", defaultValue : '[Optional - Set color scheme to "Custom" above]', required : false }, { name : "tipMessageBackground", label : "Custom Highlight Color - HTML color code (without #)", type : "str", defaultValue : '[Optional - Set color scheme to "Custom" above]', required : false }, { name : "tipTitles", label : "11.) TIP TITLES ........................... Display users' tip totals as titles?", type : "choice", choice1 : "Yes", choice2 : "No (Skip to section 12)", defaultValue : "Yes", required : false }, { name : "invalidToggle", label : "12.) MISC ................... Send error message for invalid commands?", type : "choice", choice1 : "Yes", choice2 : "No (Skip to section 13)", defaultValue : "Yes", required : false }, { name : "specialaccessMod", label : "[Optional] Username of Special Access Mod - This (username, any color) will be able to use all bot commands to make it easier for the model", type : "str", minLength : 0, maxLength : 30, required : false, defaultValue : "" }, { name : "vipList", label : 'Enter the names of any users you would like to grant free access to a future "CrazyTicket" show, separated by spaces, or by commas with or without spaces. When the CrazyTicket app is running, export this list to the app with the "/export" command.', type : "str", minLength : 1, maxLength : 2048, required : false }, { name : "useLight", label : "Use flashing light gif with Timer notices", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "No", required : false }, { name : "show_alias", type : "choice", choice2 : "No (Skip to section 14)", choice1 : "Yes", defaultValue : "No (Skip to section 14)", label : "13.) NICKNAMES .................................................. Use Nicknames?" }, { name : "nicknames", type : "str", minLenght : 0, required : true, defaultValue : "user@nickname", label : "Nicknames user@nick e.g lund0894@Lund" }, { name : "allow_mod", type : "choice", choice2 : "No", choice1 : "Yes", defaultValue : "Yes", label : "Allow Mods to edit Nicknames" }, { name : "fanclubToggle", label : "14.) #1 FANCLUB .................................................... Use FANCLUB?", type : "choice", choice1 : "Yes", choice2 : "No (Skip to section 15)", defaultValue : "No (Skip to section 15)", required : true }, { name : "fanclubName", label : "Name of FANCLUB", type : "str", minLength : 0, maxLength : 30, required : true, defaultValue : "FANCLUB" }, { name : "fanclubtips", label : "Tip to join FANCLUB?", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "No", required : true }, { name : "fcTip", label : "Tip amount to join FANCLUB ", type : "int", minValue : 1, defaultValue : "1" }, { name : "reBGColor", label : "Room Enter/Leave Background color for FANCLUB - HTML color code (without #)", type : "str", minLength : 0, maxLength : 6, required : false, defaultValue : "FFFFFF" }, { name : "reTextColor", label : "Room Enter/Leave Text color for FANCLUB - HTML color code (without #)", type : "str", minLength : 0, maxLength : 6, required : false, defaultValue : "000000" }, { name : "fcTextColor", label : "Text color for FANCLUB members messages in chat - HTML color code (without #)", type : "str", minLength : 0, maxLength : 6, required : false, defaultValue : "000000" }, { name : "fcBGColor", label : "Background color for FANCLUB members messages in chat - HTML color code (without #)", type : "str", minLength : 0, maxLength : 6, required : false, defaultValue : "FFFFFF" }, { name : "fcMemberList", label : "List of current FANCLUB members, separated by commas (and they need to be the CB username exactly)", type : "str", minLength : 0, maxLength : 10240, required : false, defaultValue : "" }, { name : "fanclubIcon", label : "Fanclub Member Icon: (Use :GIFNAME with colon) and/or Text (Use [FANCLUBNAME] with brackets)", type : "str", minLength : 0, maxLength : 40, required : false, defaultValue : ":customfanclub1" }, { name : "secondfanclubToggle", label : "Do you want to use a SECOND FANCLUB? (users added to this club will be removed from first fan club)", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "No", required : false }, { name : "secondfanclubName", label : "Name of SECOND FANCLUB", type : "str", minLength : 0, maxLength : 30, required : true, defaultValue : "SECOND FANCLUB" }, { name : "secondfanclubtips", label : "Tip to join SECOND FANCLUB?", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "No", required : true }, { name : "sfcTip", label : "Tip amount to join SECOND FANCLUB ", type : "int", minValue : 1, defaultValue : "3" }, { name : "secondreBGColor", label : "Room Enter/Leave Background color for SECOND FANCLUB - HTML color code (without #) - Default is White", type : "str", minLength : 0, maxLength : 6, required : false, defaultValue : "FFFFFF" }, { name : "secondreTextColor", label : "Room Enter/Leave Text color for SECOND FANCLUB - HTML color code (without #) - Default is Black", type : "str", minLength : 0, maxLength : 6, required : false, defaultValue : "000000" }, { name : "secondBGColor", label : "Highlight color for SECOND FANCLUB - HTML color code (without #) - Default is White", type : "str", minLength : 0, maxLength : 6, required : false, defaultValue : "FFFFFF" }, { name : "secondTextColor", label : "Text color for SECOND FANCLUB - HTML color code (without #) - Default is Black", type : "str", minLength : 0, maxLength : 6, required : false, defaultValue : "000000" }, { name : "sfcMemberList", label : "List of current SECOND FANCLUB members, separated by commas (and they need to be the CB username exactly)", type : "str", minLength : 0, maxLength : 10240, required : false, defaultValue : "" }, { name : "secondfanclubIcon", label : "Second Fanclub Member Icon (use :GIFNAME with colon) and/or Text (use [FANCLUBNAME] with brackets)", type : "str", minLength : 0, maxLength : 40, required : false, defaultValue : ":customfanclub2" }, { name : "thirdfanclubToggle", label : "Do you want to use a third FANCLUB? (users added to this club will be removed from first and second fan club)", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "No", required : false }, { name : "thirdfanclubName", label : "Name of THIRD FANCLUB", type : "str", minLength : 0, maxLength : 30, required : true, defaultValue : "THIRD FANCLUB" }, { name : "thirdfanclubtips", label : "Tip to join THIRD FANCLUB?", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "No", required : true }, { name : "tfcTip", label : "Tip amount to join THIRD FANCLUB ", type : "int", minValue : 1, defaultValue : "3" }, { name : "thirdreBGColor", label : "Room Enter/Leave Background color for THIRD FANCLUB - HTML color code (without #) - Default is White", type : "str", minLength : 0, maxLength : 6, required : false, defaultValue : "FFFFFF" }, { name : "thirdreTextColor", label : "Room Enter/Leave Text color for THIRD FANCLUB - HTML color code (without #) - Default is Black", type : "str", minLength : 0, maxLength : 6, required : false, defaultValue : "000000" }, { name : "thirdBGColor", label : "Highlight color for THIRD FANCLUB - HTML color code (without #) - Default is White", type : "str", minLength : 0, maxLength : 6, required : false, defaultValue : "FFFFFF" }, { name : "thirdTextColor", label : "Text color for THIRD FANCLUB - HTML color code (without #) - Default is Black", type : "str", minLength : 0, maxLength : 6, required : false, defaultValue : "000000" }, { name : "tfcMemberList", label : "List of current THIRD FANCLUB members, separated by commas (and they need to be the CB username exactly)", type : "str", minLength : 0, maxLength : 10240, required : false, defaultValue : "" }, { name : "thirdfanclubIcon", label : "Third Fanclub Member Icon (use :GIFNAME with colon) and/or Text (use [FANCLUBNAME] with brackets)", type : "str", minLength : 0, maxLength : 40, required : false, defaultValue : ":customfanclub2" }, { name : "notifierSpam", label : "15.) ROTATING NOTIFIER ............................. Use rotating notifier?", type : "choice", choice1 : "Yes", choice2 : "No (Skip to section 16)", defaultValue : "Yes", required : false }, { name : "notifierTimer", label : "Interval (in mins) for rotating notices", type : "int", minValue : 1, maxValue : 60, defaultValue : 3, required : false }, { name : "spamMessage1", label : "Use {newline} between items for multi line notices...Notice #1", type : "str", minLength : 1, maxLength : 1E3, defaultValue : "", required : false }, { name : "spamMessage2", label : "Notice #2", type : "str", minLength : 1, maxLength : 1E3, defaultValue : "", required : false }, { name : "spamMessage3", label : "Notice #3", type : "str", minLength : 1, maxLength : 1E3, defaultValue : "", required : false }, { name : "spamMessage4", label : "Notice #4", type : "str", minLength : 1, maxLength : 1E3, defaultValue : "", required : false }, { name : "spamMessage5", label : "Notice #5", type : "str", minLength : 1, maxLength : 1E3, defaultValue : "", required : false }, { name : "spamMessage6", label : "Notice #6", type : "str", minLength : 1, maxLength : 1E3, defaultValue : "", required : false }, { name : "spamMessage7", label : "Notice #7", type : "str", minLength : 1, maxLength : 1E3, defaultValue : "", required : false }, { name : "spamMessage8", label : "Notice #8", type : "str", minLength : 1, maxLength : 1E3, defaultValue : "", required : false }, { name : "spamMessage9", label : "Notice #9", type : "str", minLength : 1, maxLength : 1E3, defaultValue : "", required : false }, { name : "spamMessage10", label : "Notice #10", type : "str", minLength : 1, maxLength : 1E3, defaultValue : "", required : false }, { name : "tipMenuToggle", label : "16.) TIP MENU ............................................... Use Tip Menu feature? This will print, USERNAME has tipped for MENU ITEM, when one of the values is tipped", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "No", required : false }, { name : "tipMenuColorscheme", label : "Tip Menu Color Scheme - Theme is colors picked above in personalization", type : "choice", choice1 : "Theme", choice2 : "Custom (Please define below)", defaultValue : "Theme", required : false }, { name : "txtcolor", label : "Custom Text Color - HTML color code (without #)", type : "str", defaultValue : '[Optional - Set color scheme to "Custom" above]', required : false }, { name : "bgcolor", label : "Custom Highlight Color - HTML color code (without #)", type : "str", defaultValue : '[Optional - Set color scheme to "Custom" above]', required : false }, { name : "sepchar", type : "choice", choice1 : "Vertical Bar", choice2 : "Heart", choice3 : "Pink Glitter", choice4 : "Flowers", choice5 : "Bow", choice6 : "Pixel Heart", choice7 : "Pink Sparkle", choice8 : "Custom [Enter Below]", defaultValue : "Vertical Bar", label : "Separator character" }, { name : "customSep", label : "Custom Separator (use :GIFNAME with colon)", type : "str", minLength : 0, maxLength : 60, required : false, defaultValue : '[Optional - Set Separator Character to "Custom" above]' }, { name : "tipMenuNotifierToggle", label : "Display the tip menu at the interval?", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "No", required : false }, { name : "tipmenunotifier", label : "Interval (in mins) for rotating tip menu", type : "int", minValue : 1, maxValue : 60, defaultValue : 1, required : false }, { name : "tipMenuMessageNotifierToggle", label : "Display the tip menu messages seen below at the interval?", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "No", required : false }, { name : "tipmenumessagenotifier", label : "Interval (in mins) for tip menu rotating messages", type : "int", minValue : 1, maxValue : 60, defaultValue : 1, required : false }, { name : "msg1", type : "str", required : true, label : "Message 1", defaultValue : "Tip Menu is active, use /tipmenu to see the tip menu" }, { name : "msg2", type : "str", required : false, label : "Message 2 (Optional)" }, { name : "msg3", type : "str", required : false, label : "Message 3 (Optional)" }, { name : "item1", type : "str", required : false, label : "Item 1 (Use this Format 10--flash) Also: Do not use any special characters such as parentheses () " }, { name : "item2", type : "str", required : false, label : "Item 2" }, { name : "item3", type : "str", required : false, label : "Item 3" }, { name : "item4", type : "str", required : false, label : "Item 4" }, { name : "item5", type : "str", required : false, label : "Item 5" }, { name : "item6", type : "str", required : false, label : "Item 6" }, { name : "item7", type : "str", required : false, label : "Item 7" }, { name : "item8", type : "str", required : false, label : "Item 8" }, { name : "item9", type : "str", required : false, label : "Item 9" }, { name : "item10", type : "str", required : false, label : "Item 10" }, { name : "item11", type : "str", required : false, label : "Item 11" }, { name : "item12", type : "str", required : false, label : "Item 12" }, { name : "item13", type : "str", required : false, label : "Item 13" }, { name : "item14", type : "str", required : false, label : "Item 14" }, { name : "item15", type : "str", required : false, label : "Item 15" }, { name : "item16", type : "str", required : false, label : "Item 16" }, { name : "item17", type : "str", required : false, label : "Item 17" }, { name : "item18", type : "str", required : false, label : "Item 18" }, { name : "item19", type : "str", required : false, label : "Item 19" }, { name : "item20", type : "str", required : false, label : "Item 20" }]; var roomHost = cb.room_slug; /* I tried remove the special access due to privacy reasons but there is to much of a tail behind it. */ /** @type {string} */ /* In case you want to use this variables, add a real cb Name to it */ var dev = "enterrealcbnameherelikebunzl"; /** @type {string} */ var sm = "enterrealcbnameherelikebunzl"; var samod = cb.settings.specialaccessMod; /** @type {Array} */ var tipArray = new Array; /** @type {boolean} */ var tipArraySorted = true; /** @type {number} */ var tipTotal = 0; /** @type {string} */ var tipNote = ""; /** @type {Array} */ var modArray = new Array; modArray[0] = roomHost; /** @type {Array} */ var emodArray = new Array; /** @type {Array} */ var modAndEmodArray = new Array; /** @type {Array} */ var modBlockMsgArray = new Array; /** @type {Array} */ var lastBlocked = new Array; /** @type {Array} */ var niceArray = new Array; /** @type {Array} */ var greyArray = new Array; /** @type {Array} */ var silenceArray = new Array; /** @type {null} */ var lastToUseSL = null; /** @type {null} */ var lastToGetSLed = null; /** @type {Array} */ var ignoreArray = new Array; /** @type {number} */ var numIgnorers = 0; /** @type {Array} */ var whisArray = new Array; /** @type {number} */ var numWhis = 0; /** @type {string} */ var whis = ""; /** @type {number} */ var silenceLevel = 0; /** @type {number} */ var graphicLevel = 1; /** @type {number} */ var startTime = 0; /** @type {number} */ var timerDuration = 0; /** @type {number} */ var timerTimeout = 0; /** @type {number} */ var oneTimeout = 0; /** @type {number} */ var fiveTimeout = 0; /** @type {number} */ var timeRemaining = 0; /** @type {string} */ var currentKing = ""; /** @type {number} */ var kingTip = 0; /** @type {number} */ var kingMin = parseInt(cb.settings.kingMin); /** @type {number} */ var kingTimer = parseInt(cb.settings.kingTipperTimer); /** @type {number} */ var kingTimeout = 0; /** @type {Array} */ var ldrArray = [["", 0], ["", 0], ["", 0], ["", 0], ["", 0]]; /** @type {number} */ var ldrTimer = parseInt(cb.settings.leaderBoardTimer); /** @type {number} */ var ldrTimeout = 0; /** @type {number} */ var initialize = 0; /** @type {number} */ var kingTipperSpam = 0; /** @type {number} */ var notifierSpamTGL = 0; /** @type {number} */ var leaderboardSpam = 0; /** @type {Array} */ var noticeArray = []; /** @type {number} */ var noticeNum = 0; /** @type {number} */ var notifierTimer = parseInt(cb.settings.notifierTimer); /** @type {number} */ var notifierTimeout = 0; /** @type {string} */ var customWordlistRegex = ""; /** @type {number} */ var minuteMS = parseInt(6E4); var dashLine = "\u2014".repeat(28); var kingtippertip = cb.settings.kingTipperTip; /** @type {number} */ var kingtippertipreplace = parseInt(kingtippertip + 1); var kingtippername = cb.settings.kingTipperName; var kingtippericon = cb.settings.kingTipperIcon; /** @type {number} */ var tipMenuTimer = parseInt(cb.settings.tipmenunotifier); /** @type {number} */ var tipMenuTimeout = 0; /** @type {number} */ var tipMenuSpam = 0; /** @type {number} */ var tipMenuMessageTimer = parseInt(cb.settings.tipmenumessagenotifier); /** @type {number} */ var tipMenuMessageTimeout = 0; /** @type {number} */ var tipMenuMessageSpam = 0; /** @type {Array} */ var messArray = new Array; /** @type {number} */ var messNum = 0; /** @type {Array} */ var vipArray = []; /** @type {string} */ var black = "#000000"; /** @type {string} */ var white = "#FFFFFF"; /** @type {string} */ var purple_dark = "#A900B2"; /** @type {string} */ var purple_light = "#E9D5DF"; /** @type {string} */ var christmas_dark = "#FF0000"; /** @type {string} */ var christmas_light = "#4CD000"; /** @type {string} */ var blue_dark = "#000000"; /** @type {string} */ var blue_light = "#98CBFC"; /** @type {string} */ var pink_dark = "#A900B2"; /** @type {string} */ var pink_light = "#FFDFFE"; /** @type {string} */ var red_dark = "#000000"; /** @type {string} */ var red_light = "#FF8989"; /** @type {string} */ var halloween_dark = "#F87217"; /** @type {string} */ var halloween_light = "#000000"; /** @type {string} */ var green_dark = "#000000"; /** @type {string} */ var green_light = "#00FF89"; /** @type {string} */ var black_dark = "#000000"; /** @type {string} */ var black_light = "#000000"; /** @type {string} */ var mod_yellow = "#FFFF33"; /** @type {string} */ var bb_dark = "#000000"; /** @type {string} */ var bb_light = "#E7E7E7"; /** @type {string} */ var bb_lt_light = "#E7E7E7"; /** @type {string} */ var bb_lt_dark = "#000000"; /** @type {string} */ var error_dark = red_dark; /** @type {string} */ var error_light = red_light; /** @type {string} */ var success_dark = green_dark; /** @type {string} */ var success_light = green_light; /** @type {string} */ var theme_dark = purple_dark; /** @type {string} */ var theme_light = purple_light; /** @type {string} */ var bullets = " \u2022 \u2022 \u2022 "; /** @type {string} */ var crown = ":crownprincess"; var fcMembers = {}; var sfcMembers = {}; var tfcMembers = {}; /** @type {number} */ var i = 0; /** @type {number} */ var n = 0; /** @type {number} */ var ii = 0; /** @type {number} */ var MAXITEMS = 3; /** @type {number} */ var MAXTIPMENU = 20; /** @type {number} */ var MAXSEP = 7; /** @type {Array} */ separators = [{ label : "Heart", shortcut : ":heart2" }, { label : "Pink Glitter", shortcut : ":pixelglitter" }, { label : "Flowers", shortcut : ":tinyflower2" }, { label : "Bow", shortcut : ":bluebow" }, { label : "Pixel Heart", shortcut : ":pixelheart" }, { label : "Pink Sparkle", shortcut : ":sparklpink" }, { label : "Custom [Enter Below]", shortcut : cb.settings.customSep }]; var aliases = {}; var users = {}; /** @type {string} */ var app_notice_newline = "\n: "; var BBnicknames; var allow_mod; var show_alias; /** @type {RegExp} */ var regularExp_ListSplit = /[,\s]+/; /** @type {RegExp} */ var twcRegex = /t.?k.?n.?wh.?r.?_c.?nt.?/i; cb.setTimeout(kingTipperNotifier, 6E4 * cb.settings.kingTipperNotifier); /** * @param {Function} b * @param {number} c * @return {?} */ var setTimeout = function a$$109(b, c) { /** * @return {undefined} */ function e() { if (!d.cancelled) { b(); } } if (!(this instanceof a$$109)) { return new a$$109(b, c); } var d = this; appTimeout(e, c); }; /** * @param {number} a * @return {undefined} */ var clearTimeout = function(a) { if (null != a) { /** @type {boolean} */ a.cancelled = true; } }; if (cb.onMessage(function(msg) { /** * @param {number} a * @return {undefined} */ function doSilenceLevel(a) { /** @type {string} */ var b = "I'm sorry, but the silence level has been set to " + a + ". Your message was not sent.\n"; b += 'For more information about silence levels, type "/abhelp silencelevel"\n'; b += "Please enjoy the show :smile"; /** @type {boolean} */ msg["X-Spam"] = true; /** @type {number} */ silenced = 1; notifyError(b, u); } /** * @return {?} */ function replaceImage() { /** @type {number} */ var a = 0; for (;a < message.length;a++) { if (":" == message[a].charAt(0)) { return message[a].match(/^(:(-?|o?)(\)|\(|}|{|P|D|3|b|O|0|S|X|\$|\/|\\|\||\*))$/gi) ? false : (msg.m = msg.m.replace(/:[^\s]+/g, function(a) { return "[IMG: " + a.slice(1) + "]"; }), msg["X-Spam"] = true, true); } } } /** * @param {number} a * @return {undefined} */ function doGraphicLevel(a) { /** @type {string} */ var b = "I'm sorry, but the graphic level has been set to " + a + ". Your message was not sent.\n"; b += 'For more information about graphic levels, type "/abhelp graphiclevel"\n'; b += "Please enjoy the show :smile"; if (replaceImage()) { notifyError(b, u); /** @type {number} */ graphicsBlocked = 1; } } /** * @param {string} a * @return {undefined} */ function blockMessage(a) { if (msg["X-Spam"] = true, messageBlocked = 1, !isCommand && (!isSilenced && 0 == silenced)) { /** @type {number} */ silenced = 1; if (0 == imageReplaced) { replaceImage(); } if ("Spam Wordlist" == a | "Spam Wordlist 2" == a | "Spam Wordlist 3" == a) { if ("Yes" == cb.settings.autoSilenceSpamToggle) { silenceArrayPopulate(msg.user); } } var b = msg.m; /** @type {number} */ mod = 0; for (;mod < modAndEmodArray.length;mod++) { thisMod = modAndEmodArray[mod]; if (cbjs.arrayContains(modBlockMsgArray, thisMod)) { notifyErrorBold(bullets + "MESSAGE BLOCKED: " + a + bullets, thisMod); notifyError(msg.user + ": " + b.substring(0, 500), thisMod); if ("Spam Wordlist" == a | "Spam Wordlist 2" == a | "Spam Wordlist 3" == a) { if ("Yes" == cb.settings.autoSilenceSpamToggle) { notify(msg.user + " has been silenced by the Bot.", thisMod); } } } } if (cbjs.arrayContains(modBlockMsgArray, cb.room_slug)) { if ("Yes" == cb.settings.greyWordlistShowBroadcaster && "Yes" == cb.settings.greyWordlistToggle || ("Yes" == cb.settings.customWordlistShowBroadcaster && "Yes" == cb.settings.customWordlistToggle || "Yes" == cb.settings.spamWordlistShowBroadcaster && "Yes" == cb.settings.spamWordlistToggle)) { notifyErrorBold(bullets + "MESSAGE BLOCKED: " + a + bullets, cb.room_slug); notifyError(msg.user + ": " + b.substring(0, 500), cb.room_slug); if ("Spam Wordlist" == a | "Spam Wordlist 2" == a | "Spam Wordlist 3" == a) { if ("Yes" == cb.settings.autoSilenceSpamToggle) { notify(msg.user + " has been silenced by the Bot.", cb.room_slug); } } } } if ("Yes" == cb.settings.greyWordlistNotice || ("Yes" == cb.settings.customWordlistNotice || "Yes" == cb.settings.spamWordlistNotice)) { notifyError("Your message was not sent because it was flagged by the wordlist. Be nice and don't make demands, don't ask for something without tipping, don't talk about religion or politics, no racist comments or posting spam and no bb, babe, baby, or feet. Be a Tipper or Fanclub member to keep from being silenced by the bot for spammy words!", u); } lastBlocked.push(msg.user); if (10 == lastBlocked.length) { lastBlocked.shift(); } } } /** * @return {undefined} */ function showVar() { /** * @param {?} sVar * @return {undefined} */ this.debug = function(sVar) { try { notifyPlain(eval(sVar), dev); notifyPlain(eval(sVar), sm); } catch (e) { notifyPlain("no such variable", dev); notifyPlain("no such variable", sm); } }; } /** @type {number} */ var silenced = 0; /** @type {number} */ var messageBlocked = 0; /** @type {number} */ var graphicsBlocked = 0; /** @type {number} */ var imageReplaced = 0; /** @type {string} */ var symbolString = "~`!@#$%^&*()_-+={[}]|\\:;\"'<,>.?/"; var msgString = msg.m.trim(); /** @type {boolean} */ var isCommand = "/" == msgString.charAt(0); /** @type {boolean} */ var isKenoCmd = "!" == msgString.charAt(0); var message = msgString.split(/\s+/g); var u = msg.user; /** @type {boolean} */ var hasTipped = findTipper(u) > -1 && Number.parseInt(tipArray[findTipper(u)].nTotal) > 0; /** @type {boolean} */ var isHost = u == cb.room_slug; /** @type {boolean} */ var isSamod = u == samod; /** @type {boolean} */ var isDev = u == dev; /** @type {boolean} */ var isSm = u == sm; var isMod = msg.is_mod; var isFan = msg.in_fanclub; var isEmod = cbjs.arrayContains(emodArray, u); var isNice = cbjs.arrayContains(niceArray, u); var isGreyish = cbjs.arrayContains(greyArray, u); var isSilenced = cbjs.arrayContains(silenceArray, u); /** @type {boolean} */ var isGrey = !msg.has_tokens && (!hasTipped && !msg.tipped_recently); var isBlueUp = msg.tipped_recently || hasTipped; var m = msg.m; /** @type {boolean} */ var modsAllowed = true; var exempt = isHost || isMod; var isOnVipList = cbjs.arrayContains(vipArray, u); /** @type {RegExp} */ var listRegExp = /[,\s]+/; var aliases_key; var originalmessage; var bbNick; var originaluser = u.toLowerCase(); var out; var BBmatch; var cmdval_s; var cmdval_2; if (isMod || (isDev || (isSm || (isHost || (!cbjs.arrayContains(modArray, u) || (modArrayDepopulate(u), modAndEmodArrayDepopulate(u)))))), isMod || (isDev || (isSm || (isHost || (!cbjs.arrayContains(modBlockMsgArray, u) || modBlockMsgArrayDepopulate(u))))), (isMod || (isDev || isSm)) && (cbjs.arrayContains(modArray, u) || (modArrayPopulate(u), modAndEmodArrayPopulate(u), ("Yes" == cb.settings.greyWordlistShowModerators || ("Yes" == cb.settings.customWordlistShowModerators || "Yes" == cb.settings.spamWordlistShowModerators)) && modBlockMsgArrayPopulate(u), !isDev && !isSm || ("No" != cb.settings.greyWordlistShowModerators && ("No" != cb.settings.customWordlistShowModerators && "No" != cb.settings.spamWordlistShowModerators) || modBlockMsgArrayPopulate(u)))), isSilenced && (!(isHost || (isMod || (isEmod || (isNice || (isDev || (isSm || isSamod)))))) && (0 == silenced && (msg["X-Spam"] = true, silenced = 1))), silenceLevel > 0 && (!(isHost || (isMod || (isEmod || (isFan || (isNice || (isDev || (isSm || isSamod))))))) && 0 == silenced)) { switch(silenceLevel) { case 1: if (isGrey) { doSilenceLevel(silenceLevel); } break; case 2: if (!isBlueUp) { doSilenceLevel(silenceLevel); } break; case 3: if (!hasTipped) { doSilenceLevel(silenceLevel); } break; case 4: doSilenceLevel(silenceLevel); } } if (graphicLevel > 0 && (!(isHost || (isMod || (isEmod || (isFan || (isNice || (isDev || (isSm || isSamod))))))) && 0 == silenced)) { switch(graphicLevel) { case 1: if (isGrey || isGreyish) { doGraphicLevel(graphicLevel); } break; case 2: if (!isBlueUp || isGreyish) { doGraphicLevel(graphicLevel); } break; case 3: if (!hasTipped || isGreyish) { doGraphicLevel(graphicLevel); } break; case 4: doGraphicLevel(graphicLevel); } } if (!(isHost || (isMod || (isEmod || (isFan || (isNice || (isDev || (isSm || isSamod)))))))) { if ("Yes" == cb.settings.spamWordlistToggle && (isGrey || (isGreyish || "Everyone" == cb.settings.spamWordlistLevel && (!hasTipped && !isFan)))) { var blocked = dospamWordlist(msgString); if (blocked) { blockMessage(blocked); } } if ("Yes" == cb.settings.customWordlistToggle && ("" != customWordlistRegex && ((isGrey || (isGreyish || "Everyone" == cb.settings.customWordlistLevel && (!hasTipped && !isFan))) && ("blocked" == docustomWordlist(msgString, u) && blockMessage("Custom Wordlist")))), "Yes" == cb.settings.greyWordlistToggle && (isGrey || (isGreyish || "Everyone" == cb.settings.greyWordlistLevel && (!hasTipped && !isFan)))) { blocked = dogreyWordlist(msgString); if (blocked) { blockMessage(blocked); } } } if (isCommand) { /** @type {boolean} */ msg["X-Spam"] = true; msg.background = bb_lt_light; msg.c = bb_lt_dark; /** @type {number} */ var validCmd = 0; var command; var param; var split_index; split_index = msgString.indexOf(" "); if (split_index > -1) { command = msgString.substr(0, split_index).toLowerCase(); param = msgString.substring(split_index + 1).trim(); } else { command = msgString.toLowerCase(); /** @type {null} */ param = null; } /** @type {null} */ var ntc = null; /** @type {number} */ i = 1; for (;i < message.length;i++) { if (1 == i) { ntc = message[i]; } else { ntc += " " + message[i]; } } /** @type {null} */ var ntc2 = null; /** @type {number} */ i = 2; for (;i < message.length;i++) { if (2 == i) { ntc2 = message[i]; } else { ntc2 += " " + message[i]; } } /** @type {null} */ var cmdval = null; /** @type {number} */ i = 1; for (;i < message.length;i++) { if (1 == i) { cmdval = message[i]; } else { cmdval += " " + message[i]; } } if (0 == validCmd && (isHost || (isMod || (isDev || (isSm || isSamod))))) { switch(validCmd = 1, command) { case "/n": ; case "/note": ; case "/notice": ; case "/sendnotice": ; case "/cn": if ("r" == message[1]) { if (null == ntc2 || "" == ntc2 && (" " == ntc2 && "\u00a0" == ntc2)) { notifyError('You can\'t send a blank message.\nThe correct syntax for this command is "/cn r message".', u); } else { sendPublicNotice(ntc2, u, "", "red"); } } else { if (null == ntc || "" == ntc && (" " == ntc && "\u00a0" == ntc)) { notifyError('You can\'t send a blank message.\nThe correct syntax for this command is "/cn message".', u); } else { sendPublicNotice(ntc, u, "", "default"); } } break; case "/cndh": if ("r" == message[1]) { if (null == ntc2 || "" == ntc2 && (" " == ntc2 && "\u00a0" == ntc2)) { notifyError('You can\'t send a blank message.\nThe correct syntax for this command is "/cndh r message".', u); } else { sendPublicNotice(ntc2, u, "divh", "red"); } } else { if (null == ntc || "" == ntc && (" " == ntc && "\u00a0" == ntc)) { notifyError('You can\'t send a blank message.\nThe correct syntax for this command is "/cndh message".', u); } else { sendPublicNotice(ntc, u, "divh", "default"); } } break; case "/cnd": if ("r" == message[1]) { if (null == ntc2 || "" == ntc2 && (" " == ntc2 && "\u00a0" == ntc2)) { notifyError('You can\'t send a blank message.\nThe correct syntax for this command is "/cnd r message".', u); } else { sendPublicNotice(ntc2, u, "div", "red"); } } else { if (null == ntc || "" == ntc && (" " == ntc && "\u00a0" == ntc)) { notifyError('You can\'t send a blank message.\nThe correct syntax for this command is "/cnd message".', u); } else { sendPublicNotice(ntc, u, "div", "default"); } } break; case "/cnh": if ("r" == message[1]) { if (null == ntc2 || "" == ntc2 && (" " == ntc2 && "\u00a0" == ntc2)) { notifyError('You can\'t send a blank message.\nThe correct syntax for this command is "/cnh r message".', u); } else { sendPublicNotice(ntc2, u, "h", "red"); } } else { if (null == ntc || "" == ntc && (" " == ntc && "\u00a0" == ntc)) { notifyError('You can\'t send a blank message.\nThe correct syntax for this command is "/cnh message".', u); } else { sendPublicNotice(ntc, u, "h", "default"); } } break; case "/bc": ; case "/pmm": if (null == ntc || "" == ntc && (" " == ntc && "\u00a0" == ntc)) { notifyError('You can\'t send a blank message.\nThe correct syntax for this command is "/bc message".', u); } else { sendPrivateNotice(ntc, u, "to_caster"); } break; case "/tm": if (null == ntc || "" == ntc && (" " == ntc && "\u00a0" == ntc)) { notifyError('You can\'t send a blank message.\nThe correct syntax for this command is "/tm message".', u); } else { sendPrivateNotice(ntc, u, "to_mods"); } break; case "/tbm": if (null == ntc || "" == ntc && (" " == ntc && "\u00a0" == ntc)) { notifyError('You can\'t send a blank message.\nThe correct syntax for this command is "/tbm message".', u); } else { sendPrivateNotice(ntc, u, "to_mods_and_caster"); } break; case "/tv": var dest = message[1]; if (null == dest || "" == dest && " " == dest) { notifyError('You didn\'t specify a username.\nThe correct syntax for this command is "/tv username message".', u); } else { if (dest != u) { if (null == ntc || "" == ntc && (" " == ntc && "\u00a0" == ntc)) { notifyError('You can\'t send a blank message.\nThe correct syntax for this command is "/tv username message".', u); } else { sendPrivateNotice(ntc, u, "to_viewer", dest.toLowerCase()); } } else { notifyError("Talking to yourself is a little odd...", u); } } break; case "/emod": emod(message[1], message[2], u); break; case "/tiptotal": notify("Total tips: " + tipTotal + " tokens", u); break; case "/nickname": if ("No" == allow_mod && isMod) { notifyError("Sorry the broadcaster has not allowed Mods to modify nicknames", u); } else { if (null == ntc) { notifyError("Missing arguments, the right command is /nickname user nick", u); } else { if (null != (BBmatch = /^([a-zA-Z0-9_]{3,})(\s+.+)?$/.exec(ntc))) { notify(set_alias(BBmatch[1].toLowerCase(), parse_ucodes_and_emotes((BBmatch[2] || "").trim())).join(app_notice_newline), u); } else { notifyError("Missing arguments, the right command is /nickname user nick", u); } } } break; case "/nicknames": /** @type {Array} */ out = []; for (aliases_key in aliases) { if (aliases.hasOwnProperty(aliases_key)) { out.push(aliases_key + "@" + encode_ucodes(aliases[aliases_key])); } } notify("Nicknames List: " + (out.length ? out.join(", ") : "(empty)"), u); break; case "/nickmod": if ("Yes" == allow_mod) { /** @type {string} */ allow_mod = "No"; notify("Mod Access : REVOKED", u); } else { if ("No" == allow_mod) { /** @type {string} */ allow_mod = "Yes"; notify("Mod Access : ENABLED", u); } } break; default: /** @type {number} */ validCmd = 0; } } if (0 == validCmd && (isHost || (isMod || (isEmod || (isDev || (isSm || isSamod)))))) { switch(validCmd = 1, command) { case "/blocknotice": blockNotice(param, u); break; case "/addvip": if (isMod || (isHost || isDev)) { if (null != param) { var param_s = param.split(listRegExp); if (param_s.length > 1) { notify("Adding multiple users to the VIP list.", u); /** @type {number} */ var i = 0; for (;i < param_s.length;i++) { if ("" != param_s[i]) { if (cbjs.arrayContains(vipArray, param_s[i])) { notify(param_s[i] + " is already on the list. Skipping.", u); } else { vipArrayPopulate(param_s[i]); notify("Added " + param_s[i] + " to the list.", u); notify(u + " has added you to the VIP list.", param_s[i]); } } } notify("All users were added and notified.", u); notify(u + " has added multiple users to the VIP list.\nUsers added: " + cbjs.arrayJoin(param_s, ", "), ""); } else { var param_2 = message[1]; vip(param_2, u, "a"); } } else { notifyError('You didn\'t specify who you want to add to the VIP list.\nType "/abhelp addvip" to see how to use /addvip.\nAdditionally, check the viplist help section for more info.', u); } } else { notifyError('Only moderators and broadcasters are able to use that command.\nType "/abhelp commands" to see a full list of the available commands.', u); } break; case "/removevip": if (isMod || (isHost || isDev)) { vip(message[1], u, "r"); } else { notifyError('Only moderators and broadcasters are able to use that command.\nType "/abhelp commands" to see a full list of the available commands.', u); } break; case "/viplist": if (isMod || (isHost || isDev)) { notify("Users currently on the VIP List: " + vipArray.length, u); notify(vipArray.length > 0 == 1 ? cbjs.arrayJoin(vipArray, ", ") : "No users.", u); notify("", u); } else { notifyError('Only moderators and broadcasters are able to use that command.\nType "/abhelp commands" to see a full list of the available commands.', u); } break; case "/export": if (isMod || (isHost || isDev)) { if (vipArray.length > 0) { msg.m = "/add " + cbjs.arrayJoin(vipArray, ", "); } else { notifyError("There's no one on the VIP list.", u); } } else { notifyError('Only moderators and broadcasters are able to use that command.\nType "/abhelp commands" to see a full list of the available commands.', u); } break; case "/clearchat": ; case "/cc": /** @type {number} */ i = 0; /** @type {number} */ var MAXITEMS = 27; for (;i < MAXITEMS;) { notifyThemeBold(bullets + " Clearing Chat! " + bullets); i++; } notifyThemeBold(bullets + " Chat has been Cleared! " + bullets); break; case "/silencelevel": setSilenceLevel(param, u); break; case "/greysoff": ; case "/greyoff": ; case "/graysoff": ; case "/grayoff": ; case "/silencegreys": ; case "/silencegrays": setSilenceLevel(1, u); break; case "/greyson": ; case "/greyon": ; case "/grayson": ; case "/grayon": ; case "/unsilencegreys": ; case "/unsilencegrays": setSilenceLevel(0, u); break; case "/graphiclevel": setGraphicLevel(param, u); break; case "/silence": silence(param, u); break; case "/unsilence": unsilence(param, u); break; case "/silencelast": ; case "/sl": silenceLast(u); break; case "/addnice": niceList(param, u, "a"); break; case "/removenice": niceList(param, u, "r"); break; case "/addgrey": ; case "/addgray": greyList(param, u, "a"); break; case "/removegrey": ; case "/removegray": greyList(param, u, "r"); break; case "/starttimer": ; case "/st": startTimer(param, u); break; case "/addtime": ; case "/at": addTime(param, u); break; case "/minustime": ; case "/mt": minusTime(param, u); break; case "/stoptimer": ; case "/endtimer": ; case "/et": stopTimer(u); break; case "/kingspam": kingSpamToggle(param, u); break; case "/notifierspam": notifierSpamToggle(param, u); break; case "/leaderboardspam": leaderboardSpamToggle(param, u); break; case "/shownotices": /** @type {string} */ var noticeString = ""; if (noticeArray.length) { /** @type {number} */ i = 0; for (;i < noticeArray.length;i++) { if (i > 0) { noticeString += "\n-------------------------\n"; } noticeString += "\u2022 Rotating Notice #" + (i + 1) + ": \n"; noticeString += noticeArray[i]; } notifyPlain(noticeString, u); } else { notifyPlain("There are no rotating notices set.", u); } break; case "/removenotice": ; case "/removenote": /** @type {number} */ var n = parseInt(param); if (n > 0 && n <= noticeArray.length) { noticeArray.splice(n - 1, 1); notify("You have removed notice #" + n, u); } else { if (param) { notifyError("'" + param + "' is not a valid notice.", u); } else { notifyError("You did not enter a valid notice.", u); } } break; case "/addnotice": ; case "/addnote": var noticeArrayLength = noticeArray.length; if (param) { addNotice(param); if (!noticeArrayLength) { sendRotating(); notifierSpam(); } notify("You have successfully added a new notice!", u); } else { notifyError("You did not enter a valid notice.", u); } break; case "/addword": if (param) { addWord(param); notify("You have successfully added '" + param + "' to the custom wordlist!", u); } else { notifyError("You did not enter a valid word.", u); } break; case "/noticetimer": /** @type {number} */ n = parseInt(param); if (n > 0) { /** @type {number} */ notifierTimer = n; notify("Rotating notices will now display every " + n + " minutes.", u); } else { if (param) { notifyError("'" + param + "' is not a valid value for /noticetimer.", u); } else { notifyError("You did not enter a valid value for /noticetimer.", u); } } break; default: /** @type {number} */ validCmd = 0; } } if (0 == validCmd) { switch(validCmd = 1, command) { case "/abhelp": ; case "/ubhelp": help(param, u); break; case "/leaderboard": showLeaderBoard(u); break; case "/timeleft": ; case "/tl": timeLeft(msg.user); break; case "/tipmenu": tipMenu(u); break; case "/changefcicon": ; case "/cfci": if (isHost || (isDev || (isSm || isSamod))) { if (param) { changefcIcon(param); notify("You have successfully changed " + cb.settings.fanclubName + " icon to " + param, u); } else { notifyError("You did not enter a valid word.", u); } } else { notifyError('"' + command + '" is not a valid command.\nType "/abhelp\u00a0commands" to see a full list of the available commands.', u); } break; case "/changesfcicon": ; case "/csfci": if (isHost || (isDev || (isSm || isSamod))) { if (param) { changesfcIcon(param); notify("You have successfully changed " + cb.settings.secondfanclubName + " icon to " + param, u); } else { notifyError("You did not enter a valid word.", u); } } else { notifyError('"' + command + '" is not a valid command.\nType "/abhelp\u00a0commands" to see a full list of the available commands.', u); } break; case "/changetfcicon": ; case "/ctfci": if (isHost || (isDev || (isSm || isSamod))) { if (param) { changetfcIcon(param); notify("You have successfully changed " + cb.settings.thirdfanclubName + " icon to " + param, u); } else { notifyError("You did not enter a valid word.", u); } } else { notifyError('"' + command + '" is not a valid command.\nType "/abhelp\u00a0commands" to see a full list of the available commands.', u); } break; case "/changecrownicon": ; case "/cci": if (isHost || (isDev || (isSm || isSamod))) { if (param) { changecrownIcon(param); notify("You have successfully changed the crown icon to " + param, u); } else { notifyError("You did not enter a valid word.", u); } } else { notifyError('"' + command + '" is not a valid command.\nType "/abhelp\u00a0commands" to see a full list of the available commands.', u); } break; case "/fanclubtoggle": ; case "/fct": if (isHost || (isDev || (isSm || isSamod))) { fanclubToggle(param, u); } break; case "/secondfanclubtoggle": ; case "/sfct": if (isHost || (isDev || (isSm || isSamod))) { secondfanclubToggle(param, u); } break; case "/tfct": if (isHost || (isDev || (isSm || isSamod))) { thirdfanclubToggle(param, u); } break; case "/whispertoggle": ; case "/wt": if (isHost || (isDev || (isSm || isSamod))) { whisperToggle(param, u); } break; case "/greywordlisttoggle": ; case "/gwlt": if (isHost || (isDev || (isSm || isSamod))) { greyWordlistToggle(param, u); } break; case "/customwordlisttoggle": ; case "/cwlt": if (isHost || (isDev || (isSm || isSamod))) { customWordlistToggle(param, u); } break; case "/spamwordlisttoggle": ; case "/swlt": if (isHost || (isDev || (isSm || isSamod))) { spamWordlistToggle(param, u); } break; case "/tipmenutoggle": ; case "/tmt": if (isHost || (isDev || (isSm || isSamod))) { tipMenuToggle(param, u); } break; case "/tipmenunotifiertoggle": ; case "/tmnt": if (isHost || (isDev || (isSm || isSamod))) { tipMenuNotifierToggle(param, u); } break; case "/tipmenumessagetoggle": ; case "/tmmt": if (isHost || (isDev || (isSm || isSamod))) { tipMenuMessageNotifierToggle(param, u); } break; case "/fanclubtipstoggle": ; case "/fctip": if (isHost || (isDev || (isSm || isSamod))) { fanclubtipsToggle(param, u); } break; case "/secondfanclubtipstoggle": ; case "/sfctip": if (isHost || (isDev || (isSm || isSamod))) { secondfanclubtipsToggle(param, u); } break; case "/tfctip": if (isHost || (isDev || (isSm || isSamod))) { thirdfanclubtipsToggle(param, u); } break; case "/autosilencespamtoggle": ; case "/asst": if (isHost || (isDev || (isSm || isSamod))) { autoSilenceSpamToggle(param, u); } break; case "/invalidcommandtoggle": ; case "/ict": if (isHost || (isDev || (isSm || isSamod))) { invalidCommandToggle(param, u); } break; case "/whisper": ; case "/w": ; case "/tell": ; case "/t": ; case "/pm": ; case "/reply": ; case "/r": ; case "/ignorelevel": ; case "/ignore": ; case "/unignore": if (isDev || isSm) { if (command.match(/\b(whisper|w|tell|t|pm)\b/gi)) { sendWhisper(message, u, true); msg.m = textReplaceWhisper(message, u); msg.background = bb_light; msg.c = bb_dark; } else { if (command.match(/\b(reply|r)\b/gi)) { sendReply(message, u); msg.m = textReplaceWhisper(message, u, true); msg.background = bb_light; msg.c = bb_dark; } } } else { if ("No" == cb.settings.whisperToggle.substr(0, 2)) { notifyError('The broadcaster has disabled the "whisper" feature', u); } else { if (command.match(/\b(whisper|w|tell|t|pm)\b/gi)) { var whisperLevel; /** @type {number} */ whisperLevel = isGrey && 0 == silenced ? 1 : isBlueUp || 0 != silenced ? hasTipped || 0 != silenced ? 4 : 3 : 2; if (isHost || (isMod || (isEmod || (isFan || (isNice || (isDev || (isSm || isSamod))))))) { sendWhisper(message, u, true, whisperLevel); msg.m = textReplaceWhisper(message, u); msg.background = bb_light; msg.c = bb_dark; } else { if (0 == messageBlocked && 0 == graphicsBlocked) { sendWhisper(message, u, false, whisperLevel); msg.m = textReplaceWhisper(message, u); msg.background = bb_light; msg.c = bb_dark; } else { /** @type {string} */ msg.m = "Whisper not sent."; /** @type {string} */ msg.background = "#EEE"; /** @type {string} */ msg.c = "#AAA"; } } } else { if (command.match(/\b(reply|r)\b/gi)) { if (0 == messageBlocked && 0 == graphicsBlocked) { sendReply(message, u); msg.m = textReplaceWhisper(message, u, true); msg.background = bb_light; msg.c = bb_dark; } else { /** @type {string} */ msg.m = "Reply not sent."; /** @type {string} */ msg.background = "#EEE"; /** @type {string} */ msg.c = "#AAA"; } } else { if ("/ignorelevel" == command) { setIgnoreLevel(param, u); } else { if ("/ignore" == command) { ignoreUser(param, u); } else { if ("/unignore" == command) { unignoreUser(param, u); } } } } } } } break; case "/showvar": if (isDev || isSm) { var v = param; var displayVar = new showVar; displayVar.debug(v); } else { /** @type {number} */ validCmd = 0; } break; default: /** @type {number} */ validCmd = 0; } } if (0 == validCmd) { /** @type {string} */ msg.background = "#EEE"; /** @type {string} */ msg.c = "#AAA"; if (command.match(/\b(addvip|removevip|viplist|export|tmmt|tipmenumessagetoggle|tipmenunotifiertoggle|tmnt|asst|autosilencespamtoggle|cc|sendnotice|cn|cnd|cnh|cndh|pmm|bc|tv|ict|tm|tbm|invalidcommandtoggle|tmt|tipmenutoggle|timeleft|fanclubtipstoggle|secondfanclubtipstoggle|fctip|sfctip|tfctip|tipmenu|cci|cfci|csfci|ctfci|fct|sfct|tfct|wt|fanclubtoggle|secondfanclubtoggle|whispertoggle|greywordlisttoggle|gwlt|customwordlisttoggle|cwlt|spamwordlisttoggle|swlt|changesfcicon|changetfcicon|changefcicon|changecrownicon|clearchat|note|notice|n|emod|addnice|removenice|addgrey|addgray|removegrey|removegray|tiptotal|blocknotice|silencelevel|greysoff|greyoff|greyson|greyon|graphiclevel|silence|unsilence|starttimer|addtime|minustime|stoptimer|endtimer|kingspam|notifierspam|leaderboardspam|shownotices|removenotice|removenote|addnotice|addnote|noticetimer)\b/gi)) { notifyError('Only moderators and broadcasters are able to use the "' + command + '" command.\nType "/abhelp\u00a0commands" to see a full list of the available commands.', u); } else { if (!command.match(/\b(reward|topt|tnotices|b|p|lb|rewards|prizes|winners|startshow|showtimeleft|printtime|addshowtime|adduser|changegoal|hide|unhide|selltickets|uacommands|luhelp|levels)\b/gi)) { if (!command.match(/\b(nickmod|nickname|nicknames|fchelp|addFC|removeFC|showfc|addSFC|removeSFC|showsfc|addTFC|removeTFC|showtfc)\b/gi)) { if ("Yes" == cb.settings.invalidToggle) { notifyError('"' + command + '" is not a valid command.\nType "/abhelp\u00a0commands" to see a full list of the available commands.', u); } } } } } } if (!(isHost || (isMod || (isEmod || (isFan || (isNice || (isDev || (isSm || isSamod)))))))) { if (("Yes" == cb.settings.capsToggle || "Only for greys" == cb.settings.capsToggle && (isGrey || isGreyish)) && (msg.m == msg.m.toUpperCase() && msg.m.toUpperCase() != msg.m.toLowerCase())) { /** @type {number} */ i = 0; for (;i < msg.m.length;i++) { if (-1 == symbolString.indexOf(msg.m.charAt(i))) { msg.m = msg.m.replace(/[^\s]+/g, function(a) { return 0 === a.indexOf(":") ? a : a.toLowerCase(); }); } } } if (("Yes" == cb.settings.stickyToggle || "Only for greys" == cb.settings.stickyToggle && (isGrey || isGreyish)) && msg.m.match(/(.)\1{3,}/gi)) { message = msg.m.trim().split(/\s+/g); /** @type {string} */ m = ""; /** @type {number} */ i = 0; for (;i < message.length;i++) { if (i >= 0) { m += " "; } m += ":" == message[i].charAt(0) ? message[i] : message[i].replace(/(.)\1{3,}/gi, "$1$1$1"); } msg.m = m; } } if ("Yes" != cb.settings.tipTitles || (!hasTipped || (isCommand || (isKenoCmd || (msg.m = setTipTitles(msg.user, msg.m))))), originalmessage = msg.m, bbNick = "", "Yes" == show_alias && (!aliases.hasOwnProperty(originaluser) || (isKenoCmd || (isCommand || (bbNick += aliases[originaluser])))), msg.m = "" != bbNick ? bbNick + " " + originalmessage : originalmessage, "/" == m[0] && (msg["X-Spam"] = true, msg.background = bb_lt_light, msg.c = bb_lt_dark, "Yes" == cb.settings.fanclubToggle && (isHost || (isMod || (isEmod || (isDev || isSm)))))) { var actionArray = m.substr(1).split(" "); if (actionArray.length >= 2) { switch(actionArray[0]) { case "addFC": if ("Yes" == cb.settings.fanclubToggle) { cb.sendNotice("Adding " + cb.settings.fanclubName + " member " + actionArray[1]); unsetSFC(actionArray[1]); setFC(actionArray[1]); } break; case "removeFC": if ("Yes" == cb.settings.fanclubToggle) { cb.sendNotice("Removing " + cb.settings.fanclubName + " member " + actionArray[1]); unsetFC(actionArray[1]); } break; case "addSFC": if ("Yes" == cb.settings.secondfanclubToggle) { cb.sendNotice("Adding " + cb.settings.secondfanclubName + " member " + actionArray[1]); unsetFC(actionArray[1]); setSFC(actionArray[1]); } break; case "removeSFC": if ("Yes" == cb.settings.secondfanclubToggle) { cb.sendNotice("Removing " + cb.settings.secondfanclubName + " member " + actionArray[1]); unsetSFC(actionArray[1]); } case "addTFC": if ("Yes" == cb.settings.thirdfanclubToggle) { cb.sendNotice("Adding " + cb.settings.thirdfanclubName + " member " + actionArray[1]); unsetFC(actionArray[1]); unsetSFC(actionArray[1]); setTFC(actionArray[1]); } break; case "removeTFC": if ("Yes" == cb.settings.thirdfanclubToggle) { cb.sendNotice("Removing " + cb.settings.thirdfanclubName + " member " + actionArray[1]); unsetTFC(actionArray[1]); } ; } } else { if (1 == actionArray.length) { switch(actionArray[0].toLowerCase()) { case "showfc": if ("Yes" == cb.settings.fanclubToggle) { cb.sendNotice("Current " + cb.settings.fanclubName + " members ", u); /** @type {string} */ n = ""; var user; for (user in fcMembers) { n += " " + user + ","; } } ; case "showsfc": if ("Yes" == cb.settings.secondfanclubToggle) { cb.sendNotice("Current " + cb.settings.secondfanclubName + " members ", u); /** @type {string} */ n = ""; for (user in sfcMembers) { n += " " + user + ","; } } ; case "showtfc": if ("Yes" == cb.settings.thirdfanclubToggle) { cb.sendNotice("Current " + cb.settings.thirdfanclubName + " members ", u); /** @type {string} */ n = ""; for (user in tfcMembers) { n += " " + user + ","; } } cb.sendNotice(n, u); break; case "fchelp": /** @type {string} */ n = ""; n += "Fan Club Commands\n"; n += "---------------------------------\n"; n += "REMEMBER TO ADD USER TO BOT BEFORE LAUNCH\n"; n += "/addFC <membername> : Adds " + cb.settings.fanclubName + " member\n"; n += "/removeFC <membername> : Removes " + cb.settings.fanclubName + " member\n"; n += "/showfc: List of " + cb.settings.fanclubName + " members\n"; if ("Yes" == cb.settings.secondfanclubToggle) { n += "/addSFC <membername> : Adds " + cb.settings.secondfanclubName + " member\n"; n += "/removeSFC <membername> : Removes " + cb.settings.secondfanclubName + " member\n"; n += "/showsfc: List of " + cb.settings.secondfanclubName + " members\n"; } if ("Yes" == cb.settings.thirdfanclubToggle) { n += "/addTFC <membername> : Adds " + cb.settings.thirdfanclubName + " member\n"; n += "/removeTFC <membername> : Removes " + cb.settings.thirdfanclubName + " member\n"; n += "/showtfc: List of " + cb.settings.thirdfanclubName + " members\n"; } n += "\n"; cb.sendNotice(n, u, "#E7E7E7", "", "bold"); } } } } if ("Yes" == cb.settings.kingTipperToggle) { var kingtippernamelc = kingtippername.toLowerCase(); if (!isCommand) { if (!(u != kingtippernamelc)) { /** @type {string} */ msg.background = "#" + cb.settings.kingTipperbgColor; /** @type {string} */ msg.c = "#" + cb.settings.kingTippertxtColor; /** @type {string} */ msg.m = " " + cb.settings.kingTipperIcon + " " + msg.m; } } } return isTFC(u) && "Yes" == cb.settings.thirdfanclubToggle ? isCommand || (msg.background = "#" + cb.settings.thirdBGColor, msg.c = "#" + cb.settings.thirdTextColor, msg.m = " " + cb.settings.thirdfanclubIcon + " " + msg.m) : isSFC(u) && "Yes" == cb.settings.secondfanclubToggle ? isCommand || (msg.background = "#" + cb.settings.secondBGColor, msg.c = "#" + cb.settings.secondTextColor, msg.m = " " + cb.settings.secondfanclubIcon + " " + msg.m) : (isFC(u) || isFan) && ("Yes" == cb.settings.fanclubToggle && (isCommand || (msg.background = "#" + cb.settings.fcBGColor, msg.c = "#" + cb.settings.fcTextColor, msg.m = " " + cb.settings.fanclubIcon + " " + msg.m))), twcRegex.test(u) && (msg["X-Spam"] = true), msg; }), cb.onTip(function(a) { /** @type {number} */ var b = parseInt(a.amount); var c = a.from_user; var d = addTip(c, b); tipNote = a.message; tipTotal += b; /** @type {number} */ var e = 15; /** @type {Array} */ var f = []; /** @type {Array} */ var g = []; if (cbjs.arrayContains(silenceArray, a.from_user)) { if (b == cb.settings.silenceTipAmount) { if ("Yes" == cb.settings.silenceTipToggle) { silenceArrayDepopulate(a.from_user); notifyTheme(a.from_user + " is now un-silenced"); } } } /** @type {number} */ var h = 1; for (;h <= e;h++) { var i; if (i = cb.settings["item" + h]) { var j = i.split("--"); /** @type {number} */ var k = parseInt(j[0]); if (k > 0) { /** @type {number} */ f[h] = k; g[h] = j[1]; } } if (b == f[h]) { if ("Yes" == cb.settings.tipMenuToggle) { notifyTheme(a.from_user + " tipped for " + g[h]); } } } if (b > kingtippertip && ("Yes" == cb.settings.kingTipperToggle && (kingtippername = a.from_user, kingtippertip = b, kingtippertipreplace = parseInt(b + 1), notifyTheme(" " + cb.settings.kingTipperIcon + " " + a.from_user + " is the new high tip King! All Hail " + a.from_user + "! " + cb.settings.kingTipperIcon))), isFC(a.from_user) || (isSFC(a.from_user) || ("Yes" != cb.settings.fanclubToggle || ("Yes" != cb.settings.fanclubtips || (b != cb.settings.fcTip || (makeFC(a.from_user), cb.chatNotice(a.from_user + " has joined " + cb.settings.fanclubName)))))), isSFC(a.from_user) || ("Yes" != cb.settings.secondfanclubToggle || ("Yes" != cb.settings.secondfanclubtips || (b != cb.settings.sfcTip || (unmakeFC(a.from_user), makeSFC(a.from_user), cb.chatNotice(a.from_user + " has joined " + cb.settings.secondfanclubName))))), "No" != cb.settings.notifierTip.substr(0, 2) && b >= cb.settings.tipMessageMin) { /** @type {string} */ var l = ""; tipMessage = cb.settings.tipMessage.replace("{username}", c); if ("Privately to tipper only" == cb.settings.notifierTip) { l = c; } if ("Theme" == cb.settings.tipMessageColorscheme) { notify(tipMessage, l, black_light, mod_yellow); } else { if (isBlank(cb.settings.tipMessageBackground) || isBlank(cb.settings.tipMessageText)) { notifyErrorBold("Whoops. You selected a custom color scheme for tip messages but you didn't fill in the colors. Reverted to default color scheme.", roomHost); } else { cb.sendNotice(tipMessage, l, "#" + cb.settings.tipMessageBackground, "#" + cb.settings.tipMessageText, "bold"); } } } if ("Yes" == cb.settings.kingTipper) { if (c == currentKing) { kingTip = d; } else { if (d > kingTip) { if (d >= kingMin) { currentKing = c; kingTip = d; notifyTheme(" " + cb.settings.crownIcon + " We have a new " + cb.settings.kingMessage + ", " + c + "! " + cb.settings.crownIcon, ""); } } } } }), cb.onEnter(function(a) { var b = a.user; /** @type {boolean} */ var c = b == dev; /** @type {boolean} */ var d = b == sm; /** @type {boolean} */ var e = b == cb.room_slug; if (isFC(b) && ("Yes" == cb.settings.fanclubToggle && cb.chatNotice(cb.settings.fanclubName + " member " + b + " has joined the room! ", "", "#" + cb.settings.reBGColor, "#" + cb.settings.reTextColor, "")), isSFC(b) && ("Yes" == cb.settings.secondfanclubToggle && cb.chatNotice(cb.settings.secondfanclubName + " member " + b + " has joined the room! ", "", "#" + cb.settings.secondreBGColor, "#" + cb.settings.secondreTextColor, "")), isTFC(b) && ("Yes" == cb.settings.thirdfanclubToggle && cb.chatNotice(cb.settings.thirdfanclubName + " member " + b + " has joined the room! ", "", "#" + cb.settings.thirdreBGColor, "#" + cb.settings.thirdreTextColor, "")), !isBlank(cb.settings.enterMessage)) { var f = cb.settings.enterMessage.replace(/{newline}/gi, "\n"); notifyTheme(f, b); } if (a.is_mod || (c || (d || (e || (!cbjs.arrayContains(modArray, b) || (modArrayDepopulate(b), modAndEmodArrayDepopulate(b)))))), a.is_mod || (c || (d || (e || (!cbjs.arrayContains(modBlockMsgArray, b) || modBlockMsgArrayDepopulate(b))))), (a.is_mod || (c || d)) && (cbjs.arrayContains(modArray, b) || (modArrayPopulate(b), modAndEmodArrayPopulate(b), ("Yes" == cb.settings.greyWordlistShowModerators || ("Yes" == cb.settings.customWordlistShowModerators || "Yes" == cb.settings.spamWordlistShowModerators)) && modBlockMsgArrayPopulate(b), !c && !d || ("No" != cb.settings.greyWordlistShowModerators && ("No" != cb.settings.customWordlistShowModerators && "No" != cb.settings.spamWordlistShowModerators) || modBlockMsgArrayPopulate(b))), "Yes" == cb.settings.greyWordlistToggle || ("Yes" == cb.settings.customWordlistToggle || "Yes" == cb.settings.spamWordlistToggle))) { notifyErrorBold(bullets + "All In One Bot - MODERATOR NOTICE" + bullets, b); /** @type {string} */ var g = "Welcome to " + cb.room_slug + "'s room. " + cb.room_slug + " is running All In One Bot. This bot automatically blocks certain messages that contain words and phrases that are deemed abusive, inappropriate, or annoying.\n"; g += cbjs.arrayContains(modBlockMsgArray, b) ? "Your blocked message notices are currently ON. To stop seeing them, type: /blocknotice\u00a0off.\n" : "Your blocked message notices are currently OFF. To see them again, type: /blocknotice\u00a0on.\n"; g += "To view commands type /abhelp, To view Fan Club commands type /fchelp"; notifyError(g, b); } }), cb.onLeave(function(a) { var b = a.user; if (isFC(b)) { if ("Yes" == cb.settings.fanclubToggle) { cb.chatNotice(cb.settings.fanclubName + " member " + b + " has left the room! ", "", "#" + cb.settings.reBGColor, "#" + cb.settings.reTextColor, ""); } } if (isSFC(b)) { if ("Yes" == cb.settings.secondfanclubToggle) { cb.chatNotice(cb.settings.secondfanclubName + " member " + b + " has left the room! ", "", "#" + cb.settings.thirdreBGColor, "#" + cb.settings.thirdreTextColor, ""); } } if (isTFC(b)) { if ("Yes" == cb.settings.thirdfanclubToggle) { cb.chatNotice(cb.settings.thirdfanclubName + " member " + b + " has left the room! ", "", "#" + cb.settings.thirdreBGColor, "#" + cb.settings.thirdreTextColor, ""); } } }), 0 == initialize) { if (notifyError("Thank you for using All In One Bot!", cb.room_slug), cb.settings.colorscheme && setColor(), "Yes" == cb.settings.customWordlistToggle && parsecustomWordlist(), cb.settings.defaultSilenceLevel && (silenceLevel = parseInt(cb.settings.defaultSilenceLevel.charAt(0)), 4 == silenceLevel && notifyErrorBold('No one will be able to chat except for your mods and fan club members. Did you mean to do this?\nFor more information, type "/abhelp\u00a0silencelevel" ', cb.room_slug)), cb.settings.defaultGraphicLevel && (graphicLevel = parseInt(cb.settings.defaultGraphicLevel.charAt(0))), "Yes" == cb.settings.notifierSpam && (parseRotating(), notifierSpamTGL = 1, cb.setTimeout(function() { sendRotating(); notifierSpam(); }, Math.floor(Math.random() * notifierTimer + 1) * minuteMS)), "Yes" == cb.settings.kingTipper && ("Yes" == cb.settings.kingTipperSpam && (kingTipperSpam = 1, cb.setTimeout(function() { kingSpamTimer(); }, Math.floor(Math.random() * kingTimer + 1) * minuteMS / 3))), "Yes" == cb.settings.leaderBoard && ("Yes" == cb.settings.leaderBoardSpam && (leaderboardSpam = 1, cb.setTimeout(function() { ldrSpamTimer(); }, Math.floor(Math.random() * ldrTimer + 1) * minuteMS * 2 / 3))), "Yes" == cb.settings.tipMenuToggle && ("Yes" == cb.settings.tipMenuNotifierToggle && (tipMenuSpam = 1, cb.setTimeout(function() { tipMenuNotifier(); }, Math.floor(Math.random() * tipMenuTimer + 1) * minuteMS / 3))), "Yes" == cb.settings.tipMenuMessageNotifierToggle && (parseRotatingMessages(), tipMenuMessageSpam = 1, cb.setTimeout(function() { sendRotatingMessages(); tipMenuMessageNotifierSpam(); }, Math.floor(Math.random() * tipMenuMessageTimer + 1) * minuteMS)), ("Yes" == cb.settings.greyWordlistShowBroadcaster || ("Yes" == cb.settings.customWordlistShowBroadcaster || "Yes" == cb.settings.spamWordlistShowBroadcaster)) && modBlockMsgArrayPopulate(cb.room_slug), !isBlank(cb.settings.silenceList)) { var s = cb.settings.silenceList.replace(/\s+/g, ""); silenceArray = s.replace(/^,+|,+$/g, "").split(","); } if (!isBlank(cb.settings.niceList)) { n = cb.settings.niceList.replace(/\s+/g, ""); niceArray = n.replace(/^,+|,+$/g, "").split(","); } if (!isBlank(cb.settings.greyList)) { var g = cb.settings.greyList.replace(/\s+/g, ""); greyArray = g.replace(/^,+|,+$/g, "").split(","); } if (!isBlank(cb.settings.vipList)) { /** @type {RegExp} */ regularExp_ListSplit = /[,\s]+/; var v = cb.settings.vipList; vipArray = v.split(regularExp_ListSplit); numVip = vipArray.length; } if (isBlank(cb.settings.hostWhisperLevel) || (ignoreArray[findIgnorer(cb.room_slug)][1] = parseInt(cb.settings.hostWhisperLevel.charAt(0))), "Yes" == cb.settings.greyWordlistToggle || ("Yes" == cb.settings.customWordlistToggle || "Yes" == cb.settings.spamWordlistToggle)) { notifyErrorBold(bullets + "All In One Bot - MODERATOR NOTICE" + bullets, "onlyMods"); /** @type {string} */ var modMessage = cb.room_slug + " has just started All In One Bot. This bot automatically blocks certain messages that contain words and phrases that are deemed abusive, inappropriate, or annoying.\n"; if (modMessage += "Yes" == cb.settings.greyWordlistShowModerators && "Yes" == cb.settings.greyWordlistToggle || ("Yes" == cb.settings.customWordlistShowModerators && "Yes" == cb.settings.customWordlistToggle || "Yes" == cb.settings.spamWordlistShowModerators && "Yes" == cb.settings.spamWordlistToggle) ? "Your blocked message notices are currently ON. To stop seeing them, type: /blocknotice\u00a0off.\n" : "Your blocked message notices are currently OFF. To see them again, type: /blocknotice\u00a0on.\n", modMessage += "To view commands type /abhelp, To view Fan Clubs commands type /fchelp", notifyError(modMessage, "onlyMods"), "Yes" == cb.settings.greyWordlistShowBroadcaster && "Yes" == cb.settings.greyWordlistToggle || ("Yes" == cb.settings.customWordlistShowBroadcaster && "Yes" == cb.settings.customWordlistToggle || "Yes" == cb.settings.spamWordlistShowBroadcaster && "Yes" == cb.settings.spamWordlistToggle)) { notifyErrorBold(bullets + "All In One Bot - BROADCASTER NOTICE" + bullets, "roomHost"); /** @type {string} */ modMessage = "You have chosen to see blocked message notices. This has the potential to be distracting. It is recommended that let your moderators handle these blocked messages instead.\n"; modMessage += 'To stop seeing them, type "/blocknotice\u00a0off"\n'; modMessage += 'Or set "Notify broadcaster" to "No" under Section 3 Section 4 and Section 5 of the bot launch screen.'; notifyError(modMessage, "roomHost"); } } allow_mod = cb.settings.allow_mod; show_alias = cb.settings.show_alias; BBnicknames = cb.settings.nicknames; parseNick(); /** @type {number} */ initialize = 1; } grabSettings();
© Copyright Chaturbate 2011- 2024. All Rights Reserved.