Bots Home
|
Create an App
sb
Author:
ripoblus
Description
Source Code
Launch Bot
Current Users
Created by:
Ripoblus
function parseNick() { var a, b, c, d; for (a = (SBnicknames || "").split(/[,]+/), b = 0, c = a.length; b < c; b++) d = a[b].split("@"), 2 == d.length && d[0].length && d[1].length ? set_alias(d[0].toLowerCase().trim(), parse_ucodes_and_emotes(d[1])).join(", ") : notifyError("Error: malformed alias record (user@alias): " + a[b], cb.room_slug) } function set_alias(a, b) { 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 } function parse_ucodes_and_emotes(a) { var c, e, f, b = /\\u([0-9a-f]{4})/gi, d = []; for (a = a || ""; null != (c = b.exec(a));) d.push(c[1]); if (d.length) for (d = d.filter(uniqueArray), e = 0, f = d.length; 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 } 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() }) } function kingTipperNotifier() { "Yes" == cb.settings.kingTipperToggle && (notifyTheme('Be the new "All Time High Tip King" tip more than ' + kingtippertip + " to replace " + kingtippername + ' as the new "All Time High Tip King" and wear the high tip ' + kingtippericon), cb.setTimeout(kingTipperNotifier, 6e4 * cb.settings.kingTipperNotifier)) } function tipMenu(a) { var e, d = "| ", f = [], g = []; if ("Yes" == cb.settings.tipMenuToggle) { for (i = 0; i <= MAXSEP - 1; i++) cb.settings.sepchar == separators[i].label && (d = separators[i].shortcut + " "); for (e = "Tip Menu: ", i = 1; i <= MAXTIPMENU; i++) { var h; if (h = cb.settings["item" + i]) { var j = h.split("--"), k = parseInt(j[0]); k > 0 && (f[i] = k, g[i] = j[1], i >= 2 && (e += d), e += j[1] + "(" + k + ") ") } } "Theme" == cb.settings.tipMenuColorscheme ? notifyThemePlain(e, a) : 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) : cb.sendNotice(e, a, "#" + cb.settings.bgcolor, "#" + cb.settings.txtcolor, "bold") } else notifyError("Tip menu is not in use", a) } function tipMenuNotifier() { var d, c = "| ", e = [], f = []; if (1 == tipMenuSpam && "Yes" == cb.settings.tipMenuToggle) { for (n = 0; n <= MAXSEP - 1; n++) cb.settings.sepchar == separators[n].label && (c = separators[n].shortcut + " "); for (d = "Tip Menu: ", n = 1; n <= MAXTIPMENU; n++) { var g; if (g = cb.settings["item" + n]) { var h = g.split("--"), i = parseInt(h[0]); i > 0 && (e[n] = i, f[n] = h[1], n >= 2 && (d += c), d += h[1] + "(" + i + ") ") } } "Theme" == cb.settings.tipMenuColorscheme ? (notifyThemePlain(d), tipmenuNotifierSpam()) : 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) : (cb.sendNotice(d, "", "#" + cb.settings.bgcolor, "#" + cb.settings.txtcolor, "bold"), tipmenuNotifierSpam()) } } function appTimeout(a, b) { cb.setTimeout(a, b < 1e3 ? 1e3 : b) } function tipmenuNotifierSpam() { clearTimeout(tipMenuTimeout), tipMenuTimeout = setTimeout(tipMenuNotifier, tipMenuTimer * minuteMS) } function tipMenuMessageNotifierSpam() { tipMenuMessageTimeout = setTimeout(function() { 1 == tipMenuMessageSpam && messArray.length && (sendRotatingMessages(), tipMenuMessageNotifierSpam()) }, tipMenuMessageTimer * minuteMS) } function addMessage(a) { isBlank(a) || (a = a.replace(/((\\|\/)n|\{newline\})/gi, "\n"), messArray.push(a)) } function parseRotatingMessages() { addMessage(cb.settings.msg1), addMessage(cb.settings.msg2), addMessage(cb.settings.msg3) } function sendRotatingMessages() { messArray.length && (messArray[messNum] && ("Theme" == cb.settings.tipMenuColorscheme ? notifyThemePlain(messArray[messNum]) : 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) : cb.sendNotice(messArray[messNum], "", "#" + cb.settings.bgcolor, "#" + cb.settings.txtcolor, "bold")), messNum += 1, messNum >= messArray.length && (messNum = 0)) } function addTip(a, b) { var c, d = -1; for (tipArraySorted = !1, c = 0; c < tipArray.length; c += 1) if (tipArray[c].sUser === a) { d = c; break } return d < 0 ? (tipArray.push({ sUser: a, nTotal: b }), b) : (tipArray[d].nTotal += b, tipArray[d].nTotal) } function sortTipArray() { tipArraySorted || (tipArray.sort(function(a, b) { return b.nTotal - a.nTotal }), tipArraySorted = !0) } function getUserTotal(a) { var b; for (b = 0; b < tipArray.length; b += 1) if (tipArray[b].sUser === a) return tipArray[b].nTotal; return 0 } function findTipper(a) { var b; for (b = 0; b < tipArray.length; b += 1) if (tipArray[b].sUser == a) return b; return -1 } function modArrayPopulate(a) { cbjs.arrayContains(modArray, a) || modArray.push(a) } function modArrayDepopulate(a) { cbjs.arrayContains(modArray, a) && cbjs.arrayRemove(modArray, a) } function emodArrayPopulate(a) { cbjs.arrayContains(emodArray, a) || emodArray.push(a) } function emodArrayDepopulate(a) { cbjs.arrayContains(emodArray, a) && cbjs.arrayRemove(emodArray, a) } function modAndEmodArrayPopulate(a) { cbjs.arrayContains(modAndEmodArray, a) || modAndEmodArray.push(a) } function modAndEmodArrayDepopulate(a) { cbjs.arrayContains(modAndEmodArray, a) && cbjs.arrayRemove(modAndEmodArray, a) } function modBlockMsgArrayPopulate(a) { cbjs.arrayContains(modBlockMsgArray, a) || modBlockMsgArray.push(a) } function modBlockMsgArrayDepopulate(a) { cbjs.arrayContains(modBlockMsgArray, a) && cbjs.arrayRemove(modBlockMsgArray, a) } function niceArrayPopulate(a) { niceArray.push(a) } function niceArrayDepopulate(a) { cbjs.arrayRemove(niceArray, a) } function greyArrayPopulate(a) { greyArray.push(a) } function greyArrayDepopulate(a) { cbjs.arrayRemove(greyArray, a) } function silenceArrayPopulate(a) { silenceArray.push(a) } function silenceArrayDepopulate(a) { cbjs.arrayRemove(silenceArray, a) } function vipArrayPopulate(a) { cbjs.arrayContains(vipArray, a) || vipArray.push(a) } function ignoreArrayPopulate(a) { ignoreArray[numIgnorers] = new Array, ignoreArray[numIgnorers][0] = a, ignoreArray[numIgnorers][1] = cb.settings.roomWhisperLevel ? parseInt(cb.settings.roomWhisperLevel.charAt(0)) : 0, numIgnorers++ } function findIgnorer(a) { for (i = 0; i < ignoreArray.length && ignoreArray[i][0] != a; i++); return i == ignoreArray.length && (ignoreArrayPopulate(a), findIgnorer(a)), i } function whisArrayPopulate(a) { whisArray[numWhis] = new Array, whisArray[numWhis][0] = a, whisArray[numWhis][1] = "", numWhis++ } function findWhisper(a) { for (var b = 0; b < whisArray.length && whisArray[b][0] != a; b++); return b == whisArray.length && (whisArrayPopulate(a), findWhisper(a)), b } function notify(a, b, c, d, e) { if (null == c && (c = hb_light), null == d && (d = hb_dark), null == e && (e = "bold"), "onlyMods" == b) cb.sendNotice(a, "", c, d, e, "red"); else if ("modsAndEmods" == b) for (mod = 0; mod < modAndEmodArray.length; mod++) thisMod = modAndEmodArray[mod], cb.sendNotice(a, thisMod, c, d, e); else "roomHost" == b ? cb.sendNotice(a, roomHost, c, d, e) : "modsAndHost" == b ? (cb.sendNotice(a, "", c, d, e, "red"), cb.sendNotice(a, roomHost, c, d, e)) : null == b ? cb.sendNotice(a, "", c, d, e) : cb.sendNotice(a, b, c, d, e) } function notifyHelpBold(a, b, c, d) { null == c && (c = hb_dark), null == d && (d = white), notify(a, b, c, d, "bold") } function notifyHelpPlain(a, b, c) { bg = white, null == c && (c = hb_dark), notify(a, b, bg, c) } function notifyWhisper(a, b, c, d) { null == c && (c = whis_recd_bg), null == d && (d = whis_recd_text), notify(a, b, c, d, "bold") } function notifyTheme(a, b, c, d) { null == c && (c = theme_light), null == d && (d = theme_dark), notify(a, b, c, d, "bold") } function notifyHeaderThemeBold(a, b, c, d) { null == c && (c = theme_light), null == d && (d = theme_dark), notify(a, b, c, d, "bold") } function notifyLeaderTheme(a, b, c, d) { null == c && (c = white), null == d && (d = theme_dark), notify(a, b, c, d, "bold") } function notifyTimerThemeBold(a, b, c, d) { null == c && (c = theme_light), null == d && (d = theme_dark), notify(a, b, c, d, "bold") } function notifyThemePlain(a, b, c) { bg = white, null == c && (c = theme_dark), notify(a, b, bg, c) } function notifyCNmodPlain(a, b, c) { bg = white, null == c && (c = cn_mod), notify(a, b, bg, c) } function notifyCNbroadcasterPlain(a, b, c) { bg = white, null == c && (c = cn_broadcaster), notify(a, b, bg, c) } function notifyCNbroadcastermodPlain(a, b, c) { bg = white, null == c && (c = cn_broadcaster_mod), notify(a, b, bg, c) } function notifyError(a, b) { notify(a, b, error_light, error_dark) } function notifyErrorBold(a, b) { notify(a, b, error_dark, white) } function levelConditions(a) { var b; switch (parseInt(a)) { case 0: b = "All members"; break; case 1: b = 'Only "color" names'; break; case 2: b = 'Only "dark blue" names and higher'; break; case 3: b = "Only members who have tipped in the room"; break; case 4: b = "No one" } return b } function setSilenceLevel(a, b) { if (parseInt(a) >= 0 && parseInt(a) <= 4) { silenceLevel = parseInt(a); var c = "The silence level has been set to " + a + ".\n"; c += levelConditions(a) + " can talk in chat.", notify(c, "modsAndHost") } else a ? notifyError('"' + a + '" is not a valid silence level.\nType "/sbhelp\xa0silencelevel" to see how to use /silencelevel.', b) : notifyError('You did not enter a valid silence level.\nType "/sbhelp\xa0silencelevel" to see how to use /silencelevel.', b) } function setGraphicLevel(a, b) { if (parseInt(a) >= 0 && parseInt(a) <= 4) { graphicLevel = parseInt(a); var c = "The graphic level has been set to " + a + ".\n"; c += levelConditions(a) + " can use graphics in chat.", notify(c, "modsAndHost") } else a ? notifyError('"' + a + '" is not a valid graphic level.\nType "/sbhelp\xa0graphiclevel" to see how to use /graphiclevel.', b) : notifyError('You did not enter a valid graphic level.\nType "/sbhelp\xa0graphiclevel" to see how to use /graphiclevel.', b) } function setIgnoreLevel(a, b) { if (parseInt(a) >= 0 && parseInt(a) <= 4) { ignoreArray[findIgnorer(b)][1] = a; 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 a ? notifyError('"' + a + '" is not a valid ignore level.\nType "/sbhelp\xa0ignorelevel" to see how to use /ignorelevel.', b) : notifyError('You did not enter a valid ignore level.\nType "/sbhelp\xa0ignorelevel" to see how to use /ignorelevel.', b) } 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); var c = b + " has silenced " + a + "."; b == dev || b == sm ? (notify(c, dev), notify(c, sm)) : notify(c, "modsAndEmods") } } 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); var c = b + " has unsilenced " + a + "."; b == dev || b == sm ? (notify(c, dev), notify(c, sm)) : notify(c, "modsAndEmods") } else notifyError(a + " does not need to be unsilenced.", b) } function silenceLast(a) { lastBlocked.length ? null == lastToUseSL || lastToUseSL == a ? (u = lastBlocked.pop(), lastToUseSL = a, lastToGetSLed = u, silence(u, a), cb.setTimeout(function() { lastToUseSL = null, lastToGetSLed = null }, 5e3)) : notifyError(lastToUseSL + " has just silenced " + lastToGetSLed + " using the /silencelast command. Please wait at least 5 seconds before using this command again.", a) : notifyError("The bot has not automatically silenced anyone yet, or they have all been silenced already.", a) } function setTimerN(a) { return clearTimeout(fiveTimeoutN), clearTimeout(oneTimeoutN), clearTimeout(timerTimeoutN), 0 == a ? void(startTimeN = 0) : (a > 300 && (fiveTimeoutN = setTimeout(function() { notifyTimerThemeBold(cb.settings.timerWarningIcon + " Naked Timer has Five minutes remaining! " + cb.settings.timerWarningIcon) }, 1e3 * (a - 300))), a > 60 && (oneTimeoutN = setTimeout(function() { notifyTimerThemeBold(cb.settings.timerWarningIcon + " One minute remaining for Naked Timer! " + cb.settings.timerWarningIcon) }, 1e3 * (a - 60))), void(timerTimeoutN = setTimeout(function() { notifyTimerThemeBold(cb.settings.timerStopIcon + bullets + " Naked Timer... Time is up! " + bullets + cb.settings.timerStopIcon), startTimeN = 0 }, 1e3 * a))) } function startTimerN(a, b) { var c = parseInt(a), d = 60 * c; 0 == startTimeN ? c > 0 && -1 == c.toString().indexOf(".") ? (timeRemainingN = d, timerDurationN = d, startTimeN = new Date, setTimerN(d), null != b && notifyTimerThemeBold(cb.settings.timerStartIcon + " " + b + " has set a Naked Timer for " + c + " minutes! " + cb.settings.timerStartIcon)) : null != a ? notifyError("'" + a + '\' is not a valid option for /starttimern.\nType "/sbhelp\xa0starttimern" to see how to use /starttimern.', b) : null == a && notifyError('You did not enter a valid option for /starttimern.\nType "/sbhelp\xa0starttimern" to see how to use /starttimern.', b) : null != b && notifyError("Naked Timer running already.", b) } function addTimeN(a, b) { t = parseInt(a); var c = 60 * t; if (t > 0 && -1 == t.toString().indexOf(".")) if (0 != startTimeN) { startTimeN.setSeconds(startTimeN.getSeconds() + c); var d = new Date; timeRemainingN = 3600 * startTimeN.getHours() + 60 * startTimeN.getMinutes() + startTimeN.getSeconds() + timerDurationN - 3600 * d.getHours() - 60 * d.getMinutes() - d.getSeconds(), setTimerN(timeRemainingN), notifyTimerThemeBold(cb.settings.timerAddMinusIcon + " " + b + " has added " + t + " minute" + (1 == t ? "" : "s") + " to Naked Timer! " + cb.settings.timerAddMinusIcon) } else notifyError("Naked Timer is not running.", b); else null != a ? notifyError("'" + a + '\' is not a valid option for /addtimen.\nType "/sbhelp\xa0addtimen" to see how to use /addtimen.', b) : null == a && notifyError('You did not enter a valid option for /addtimen.\nType "/sbhelp\xa0addtimen" to see how to use /addtimen.', b) } function minusTimeN(a, b) { t = parseInt(a); var c = -60 * t; if (t > 0 && -1 == t.toString().indexOf(".")) if (0 != startTimeN) { startTimeN.setSeconds(startTimeN.getSeconds() + c); var d = new Date; timeRemainingN = 3600 * startTimeN.getHours() + 60 * startTimeN.getMinutes() + startTimeN.getSeconds() + timerDurationN - 3600 * d.getHours() - 60 * d.getMinutes() - d.getSeconds(), setTimerN(timeRemainingN), notifyTimerThemeBold(cb.settings.timerAddMinusIcon + " " + b + " has has subtracted " + t + " minute" + (1 == t ? "" : "s") + " from the Naked Timer! " + cb.settings.timerAddMinusIcon) } else notifyError("There is no Naked Timer running.", b); else null != a ? notifyError("'" + a + '\' is not a valid option for /minustimen.\nType "/sbhelp\xa0minustimen" to see how to use /minustimen.', b) : null == a && notifyError('You did not enter a valid option for /minustimen.\nType "/sbhelp\xa0minustimen" to see how to use /minustimen.', b) } function stopTimerN(a) { 0 != startTimeN ? (setTimerN(0), notifyTimerThemeBold(cb.settings.timerStopIcon + " " + a + " has cancelled the Naked Timer. " + cb.settings.timerStopIcon)) : notifyError("Naked Timer is not running.", a) } function doubleDigitN(a) { return ("0" + a).slice(-2) } function timeLeftN(a) { if (0 != startTimeN) { var b = new Date; timeRemainingN = 3600 * startTimeN.getHours() + 60 * startTimeN.getMinutes() + startTimeN.getSeconds() + timerDurationN - 3600 * b.getHours() - 60 * b.getMinutes() - b.getSeconds(); var c = doubleDigitN(Math.floor(timeRemainingN / 3600)), d = doubleDigitN(Math.floor((timeRemainingN - 3600 * c) / 60)), e = doubleDigitN(timeRemainingN - 3600 * c - 60 * d); notify("Time Remaining for Naked Timer: " + c + ":" + d + ":" + e, a) } else notifyError("There's no Naked Timer running.", a) } function setTimerG(a) { return clearTimeout(fiveTimeoutG), clearTimeout(oneTimeoutG), clearTimeout(timerTimeoutG), 0 == a ? void(startTimeG = 0) : (a > 300 && (fiveTimeoutG = setTimeout(function() { notifyTimerThemeBold(cb.settings.timerWarningIcon + " General Timer has Five minutes remaining! " + cb.settings.timerWarningIcon) }, 1e3 * (a - 300))), a > 60 && (oneTimeoutG = setTimeout(function() { notifyTimerThemeBold(cb.settings.timerWarningIcon + " One minute remaining for General Timer! " + cb.settings.timerWarningIcon) }, 1e3 * (a - 60))), void(timerTimeoutG = setTimeout(function() { notifyTimerThemeBold(cb.settings.timerStopIcon + bullets + " General Timer... Time is up! " + bullets + cb.settings.timerStopIcon), startTimeG = 0 }, 1e3 * a))) } function startTimerG(a, b) { var c = parseInt(a), d = 60 * c; 0 == startTimeG ? c > 0 && -1 == c.toString().indexOf(".") ? (timeRemainingG = d, timerDurationG = d, startTimeG = new Date, setTimerG(d), null != b && notifyTimerThemeBold(cb.settings.timerStartIcon + " " + b + " has set a General Timer for " + c + " minutes! " + cb.settings.timerStartIcon)) : null != a ? notifyError("'" + a + '\' is not a valid option for /starttimerg.\nType "/hbhelp\xa0starttimerg" to see how to use /starttimerg.', b) : null == a && notifyError('You did not enter a valid option for /starttimerg.\nType "/hbhelp\xa0starttimerg" to see how to use /starttimerg.', b) : null != b && notifyError("General Timer running already.", b) } function addTimeG(a, b) { t = parseInt(a); var c = 60 * t; if (t > 0 && -1 == t.toString().indexOf(".")) if (0 != startTimeG) { startTimeG.setSeconds(startTimeG.getSeconds() + c); var d = new Date; timeRemainingG = 3600 * startTimeG.getHours() + 60 * startTimeG.getMinutes() + startTimeG.getSeconds() + timerDurationG - 3600 * d.getHours() - 60 * d.getMinutes() - d.getSeconds(), setTimerG(timeRemainingG), notifyTimerThemeBold(cb.settings.timerAddMinusIcon + " " + b + " has added " + t + " minute" + (1 == t ? "" : "s") + " to General Timer! " + cb.settings.timerAddMinusIcon) } else notifyError("General Timer is not running.", b); else null != a ? notifyError("'" + a + '\' is not a valid option for /addtimeg.\nType "/hbhelp\xa0addtimeg" to see how to use /addtimeg.', b) : null == a && notifyError('You did not enter a valid option for /addtimeg.\nType "/hbhelp\xa0addtimeg" to see how to use /addtimeg.', b) } function minusTimeG(a, b) { t = parseInt(a); var c = -60 * t; if (t > 0 && -1 == t.toString().indexOf(".")) if (0 != startTimeG) { startTimeG.setSeconds(startTimeG.getSeconds() + c); var d = new Date; timeRemainingG = 3600 * startTimeG.getHours() + 60 * startTimeG.getMinutes() + startTimeG.getSeconds() + timerDurationG - 3600 * d.getHours() - 60 * d.getMinutes() - d.getSeconds(), setTimerG(timeRemainingG), notifyTimerThemeBold(cb.settings.timerAddMinusIcon + " " + b + " has has subtracted " + t + " minute" + (1 == t ? "" : "s") + " from the General Timer! " + cb.settings.timerAddMinusIcon) } else notifyError("There is no General Timer running.", b); else null != a ? notifyError("'" + a + '\' is not a valid option for /minustimeg.\nType "/hbhelp\xa0minustimeg" to see how to use /minustimeg.', b) : null == a && notifyError('You did not enter a valid option for /minustimeg.\nType "/hbhelp\xa0minustimeg" to see how to use /minustimeg.', b) } function stopTimerG(a) { 0 != startTimeG ? (setTimerG(0), notifyTimerThemeBold(cb.settings.timerStopIcon + " " + a + " has cancelled the General Timer. " + cb.settings.timerStopIcon)) : notifyError("General Timer is not running.", a) } function doubleDigitG(a) { return ("0" + a).slice(-2) } function timeLeftG(a) { if (0 != startTimeG) { var b = new Date; timeRemainingG = 3600 * startTimeG.getHours() + 60 * startTimeG.getMinutes() + startTimeG.getSeconds() + timerDurationG - 3600 * b.getHours() - 60 * b.getMinutes() - b.getSeconds(); var c = doubleDigitG(Math.floor(timeRemainingG / 3600)), d = doubleDigitG(Math.floor((timeRemainingG - 3600 * c) / 60)), e = doubleDigitG(timeRemainingG - 3600 * c - 60 * d); notify("Time Remaining for General Timer: " + c + ":" + d + ":" + e, a) } else notifyError("There's no General Timer running.", a) } function setTimerH(a) { return clearTimeout(fiveTimeoutH), clearTimeout(oneTimeoutH), clearTimeout(timerTimeoutH), 0 == a ? void(startTimeH = 0) : (a > 300 && (fiveTimeoutH = setTimeout(function() { notifyTimerThemeBold(cb.settings.timerWarningIcon + " Hula has Five minutes remaining! " + cb.settings.timerWarningIcon) }, 1e3 * (a - 300))), a > 60 && (oneTimeoutH = setTimeout(function() { notifyTimerThemeBold(cb.settings.timerWarningIcon + " One minute remaining for Hula! " + cb.settings.timerWarningIcon) }, 1e3 * (a - 60))), void(timerTimeoutH = setTimeout(function() { notifyTimerThemeBold(cb.settings.timerStopIcon + bullets + "Hula... Time is up! " + bullets + cb.settings.timerStopIcon), startTimeH = 0 }, 1e3 * a))) } function startTimerH(a, b) { var c = parseInt(a), d = 60 * c; 0 == startTimeH ? c > 0 && -1 == c.toString().indexOf(".") ? (timeRemainingH = d, timerDurationH = d, startTimeH = new Date, setTimerH(d), null != b && notifyTimerThemeBold(cb.settings.timerStartIcon + " " + b + " has set a Hula timer for " + c + " minutes! " + cb.settings.timerStartIcon)) : null != a ? notifyError("'" + a + '\' is not a valid option for /starttimerh.\nType "/sbhelp\xa0starttimerh" to see how to use /starttimerh.', b) : null == a && notifyError('You did not enter a valid option for /starttimerh.\nType "/sbhelp\xa0starttimerh" to see how to use /starttimerh.', b) : null != b && notifyError("Hula timer running already.", b) } function addTimeH(a, b) { t = parseInt(a); var c = 60 * t; if (t > 0 && -1 == t.toString().indexOf(".")) if (0 != startTimeH) { startTimeH.setSeconds(startTimeH.getSeconds() + c); var d = new Date; timeRemainingH = 3600 * startTimeH.getHours() + 60 * startTimeH.getMinutes() + startTimeH.getSeconds() + timerDurationH - 3600 * d.getHours() - 60 * d.getMinutes() - d.getSeconds(), setTimerH(timeRemainingH), notifyTimerThemeBold(cb.settings.timerAddMinusIcon + " " + b + " has added " + t + " minute" + (1 == t ? "" : "s") + " to Hula timer! " + cb.settings.timerAddMinusIcon) } else notifyError("Hula timer is not running.", b); else null != a ? notifyError("'" + a + '\' is not a valid option for /addtimeh.\nType "/sbhelp\xa0addtimeh" to see how to use /addtimeh.', b) : null == a && notifyError('You did not enter a valid option for /addtimeh.\nType "/sbhelp\xa0addtimeh" to see how to use /addtimeh.', b) } function minusTimeH(a, b) { t = parseInt(a); var c = -60 * t; if (t > 0 && -1 == t.toString().indexOf(".")) if (0 != startTimeH) { startTimeH.setSeconds(startTimeH.getSeconds() + c); var d = new Date; timeRemainingH = 3600 * startTimeH.getHours() + 60 * startTimeH.getMinutes() + startTimeH.getSeconds() + timerDurationH - 3600 * d.getHours() - 60 * d.getMinutes() - d.getSeconds(), setTimerH(timeRemainingH), notifyTimerThemeBold(cb.settings.timerAddMinusIcon + " " + b + " has has subtracted " + t + " minute" + (1 == t ? "" : "s") + " from the Hula timer! " + cb.settings.timerAddMinusIcon) } else notifyError("There is no Hula timer running.", b); else null != a ? notifyError("'" + a + '\' is not a valid option for /minustimeh.\nType "/sbhelp\xa0minustimeh" to see how to use /minustimeh.', b) : null == a && notifyError('You did not enter a valid option for /minustimeh.\nType "/sbhelp\xa0minustimeh" to see how to use /minustimeh.', b) } function stopTimerH(a) { 0 != startTimeH ? (setTimerH(0), notifyTimerThemeBold(cb.settings.timerStopIcon + " " + a + " has cancelled the Hula timer. " + cb.settings.timerStopIcon)) : notifyError("Hula timer is not running.", a) } function doubleDigitH(a) { return ("0" + a).slice(-2) } function timeLeftH(a) { if (0 != startTimeH) { var b = new Date; timeRemainingH = 3600 * startTimeH.getHours() + 60 * startTimeH.getMinutes() + startTimeH.getSeconds() + timerDurationH - 3600 * b.getHours() - 60 * b.getMinutes() - b.getSeconds(); var c = doubleDigitH(Math.floor(timeRemainingH / 3600)), d = doubleDigitH(Math.floor((timeRemainingH - 3600 * c) / 60)), e = doubleDigitH(timeRemainingH - 3600 * c - 60 * d); notify("Time Remaining for Hula: " + c + ":" + d + ":" + e, a) } else notifyError("There's no timer running for Hula.", a) } function setTimerL(a) { return clearTimeout(fifteenTimeoutL), clearTimeout(tenTimeoutL), clearTimeout(fiveTimeoutL), clearTimeout(oneTimeoutL), clearTimeout(timerTimeoutL), 0 == a ? void(startTimeL = 0) : (a > 900 && (fifteenTimeoutL = setTimeout(function() { notifyTimerThemeBold(cb.settings.timerWarningIcon + " Log Off has Fifteen minutes remaining! " + cb.settings.timerWarningIcon) }, 1e3 * (a - 900))), a > 600 && (tenTimeoutL = setTimeout(function() { notifyTimerThemeBold(cb.settings.timerWarningIcon + " Log Off has Ten minutes remaining! " + cb.settings.timerWarningIcon) }, 1e3 * (a - 600))), a > 300 && (fiveTimeoutL = setTimeout(function() { notifyTimerThemeBold(cb.settings.timerWarningIcon + " Log Off has Five minutes remaining! " + cb.settings.timerWarningIcon) }, 1e3 * (a - 300))), a > 60 && (oneTimeoutL = setTimeout(function() { notifyTimerThemeBold(cb.settings.timerWarningIcon + " One minute remaining before Log Off! " + cb.settings.timerWarningIcon) }, 1e3 * (a - 60))), void(timerTimeoutL = setTimeout(function() { notifyTimerThemeBold(cb.settings.timerStopIcon + bullets + "Log Off... Time is up! " + bullets + cb.settings.timerStopIcon), startTimeL = 0 }, 1e3 * a))) } function startTimerL(a, b) { var c = parseInt(a), d = 60 * c; 0 == startTimeL ? c > 0 && -1 == c.toString().indexOf(".") ? (timeRemainingL = d, timerDurationL = d, startTimeL = new Date, setTimerL(d), null != b && notifyTimerThemeBold(cb.settings.timerStartIcon + " " + b + " has set a Log Off timer for " + c + " minutes! " + cb.settings.timerStartIcon)) : null != a ? notifyError("'" + a + '\' is not a valid option for /starttimerl.\nType "/sbhelp\xa0starttimerl" to see how to use /starttimerl.', b) : null == a && notifyError('You did not enter a valid option for /starttimerl.\nType "/sbhelp\xa0starttimerl" to see how to use /starttimerl.', b) : null != b && notifyError("Log Off timer running already.", b) } function addTimeL(a, b) { t = parseInt(a); var c = 60 * t; if (t > 0 && -1 == t.toString().indexOf(".")) if (0 != startTimeL) { startTimeL.setSeconds(startTimeL.getSeconds() + c); var d = new Date; timeRemainingL = 3600 * startTimeL.getHours() + 60 * startTimeL.getMinutes() + startTimeL.getSeconds() + timerDurationL - 3600 * d.getHours() - 60 * d.getMinutes() - d.getSeconds(), setTimerL(timeRemainingL), notifyTimerThemeBold(cb.settings.timerAddMinusIcon + " " + b + " has added " + t + " minute" + (1 == t ? "" : "s") + " to Log Off timer! " + cb.settings.timerAddMinusIcon) } else notifyError("Log Off timer is not running.", b); else null != a ? notifyError("'" + a + '\' is not a valid option for /addtimel.\nType "/sbhelp\xa0addtimel" to see how to use /addtimel.', b) : null == a && notifyError('You did not enter a valid option for /addtimel.\nType "/sbhelp\xa0addtimel" to see how to use /addtimel.', b) } function minusTimeL(a, b) { t = parseInt(a); var c = -60 * t; if (t > 0 && -1 == t.toString().indexOf(".")) if (0 != startTimeL) { startTimeL.setSeconds(startTimeL.getSeconds() + c); var d = new Date; timeRemainingL = 3600 * startTimeL.getHours() + 60 * startTimeL.getMinutes() + startTimeL.getSeconds() + timerDurationL - 3600 * d.getHours() - 60 * d.getMinutes() - d.getSeconds(), setTimerL(timeRemainingL), notifyTimerThemeBold(cb.settings.timerAddMinusIcon + " " + b + " has has subtracted " + t + " minute" + (1 == t ? "" : "s") + " from the Log Off timer! " + cb.settings.timerAddMinusIcon) } else notifyError("There is no Log Off timer running.", b); else null != a ? notifyError("'" + a + '\' is not a valid option for /minustimel.\nType "/sbhelp\xa0minustimel" to see how to use /minustimel.', b) : null == a && notifyError('You did not enter a valid option for /minustimel.\nType "/sbhelp\xa0minustimel" to see how to use /minustimel.', b) } function stopTimerL(a) { 0 != startTimeL ? (setTimerL(0), notifyTimerThemeBold(cb.settings.timerStopIcon + " " + a + " has cancelled the Log Off timer. " + cb.settings.timerStopIcon)) : notifyError("Log Off timer is not running.", a) } function doubleDigitL(a) { return ("0" + a).slice(-2) } function timeLeftL(a) { if (0 != startTimeL) { var b = new Date; timeRemainingL = 3600 * startTimeL.getHours() + 60 * startTimeL.getMinutes() + startTimeL.getSeconds() + timerDurationL - 3600 * b.getHours() - 60 * b.getMinutes() - b.getSeconds(); var c = doubleDigitL(Math.floor(timeRemainingL / 3600)), d = doubleDigitL(Math.floor((timeRemainingL - 3600 * c) / 60)), e = doubleDigitL(timeRemainingL - 3600 * c - 60 * d); notify("Time Remaining for Log Off: " + c + ":" + d + ":" + e, a) } else notifyError("There's no timer running for Log Off.", a) } function vip(a, b, c) { if ("a" == c) null == a || "" == a && " " == a && "\xa0" == a ? notifyError('You didn\'t specify who you want to add to the VIP list.\nType "/sbhelp addvip" to see how to use /addvip.\nAdditionally, check the viplist help section for more info.', b) : a != cb.room_slug || !cbjs.arrayContains(modArray, a) || cbjs.arrayContains(eModArray, a) ? cbjs.arrayContains(vipArray, a) ? notifyError(a + " is already on the VIP list.", b) : (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)) : 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 && "\xa0" == a) notifyError('You didn\'t specify who you want to remove from the VIP list.\nType "/sbhelp 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); for (var d = 0; d < vipArray.length; d++) notify(b + " has removed you from the VIP list.", vipArray[d]); vipArray.length = 0 } else 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)) : notifyError(a + " is not on the VIP list.", b); else notifyError("The VIP list is currently empty.", b) } function sendPublicNotice(a, b, c, d) { if (null != a) if ("" != a || " " != a || "\xa0" != a) { if ("red" == d) switch (c) { case "div": cb.sendNotice(dashLine + "\n\u2022 " + a + "\n" + dashLine, "", "", "#F00000", "bold"); break; case "divh": cb.sendNotice(dashLine + "\n\u2022 " + a + "\n" + dashLine, "", "#FFE5E5", "#F00000", "bold"); break; case "h": cb.sendNotice("\u2022 " + a, "", "#FFE5E5", "#F00000", "bold"); break; case "": cb.sendNotice("\u2022 " + a, "", "", "#F00000", "bold") } else if ("default" == d) switch (c) { case "div": "Theme" == cb.settings.crazyNoteColorscheme ? notifyThemePlain(dashLine + "\n\u2022 " + a + "\n" + dashLine) : 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) : cb.sendNotice(dashLine + "\n\u2022 " + a + "\n" + dashLine, "", "", "#" + cb.settings.crazyNoteText, "bold"); break; case "divh": "Theme" == cb.settings.crazyNoteColorscheme ? notifyTheme(dashLine + "\n\u2022 " + a + "\n" + dashLine) : 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) : cb.sendNotice(dashLine + "\n\u2022 " + a + "\n" + dashLine, "", "#" + cb.settings.crazyNoteBackground, "#" + cb.settings.crazyNoteText, "bold"); break; case "h": "Theme" == cb.settings.crazyNoteColorscheme ? notifyTheme("\u2022 " + a) : 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) : cb.sendNotice("\u2022 " + a, "", "#" + cb.settings.crazyNoteBackground, "#" + cb.settings.crazyNoteText, "bold"); break; case "": "Theme" == cb.settings.crazyNoteColorscheme ? notifyThemePlain("\u2022 " + a) : 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) : 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) } function sendPrivateNotice(a, b, c) { if (null != a) if ("" != a || " " != a || "\xa0" != a) { switch (c) { case "to_mods": notifyCNmodPlain("\u2022 " + b + ": " + a, "onlyMods"), notifyCNmodPlain("\u2022 Sent to Mods \u2022 " + a, b) } switch (c) { case "to_caster": notifyCNbroadcasterPlain("\u2665 " + b + ": " + a, roomHost), notifyCNbroadcasterPlain("\u2665 Sent to Broadcaster \u2665 " + a, b) } switch (c) { case "to_mods_and_caster": notifyCNbroadcastermodPlain("\u2022 " + b + ": " + a, "modsAndHost"), notifyCNbroadcastermodPlain("\u2022 Sent to Broadcaster and Mods \u2022 " + a, b) } switch (c) { case "to_viewer": null == arguments[3] || "" == arguments[3] && " " == arguments[3] && "\xa0" == arguments[3] ? notifyError("You didn't specify who should receive the message.\nPlease enter a username and try again.") : "Theme" == cb.settings.crazyNoteColorscheme ? (notifyThemePlain("\u2022 " + b + " \u2022 " + a, arguments[3]), notifyThemePlain("\u2022 Sent to " + arguments[3] + " \u2022 " + a, b)) : 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) : (notify("\u2022 " + b + " \u2022 " + a, arguments[3], "", "#" + cb.settings.crazyNoteText, "bold"), notify("\u2022 Sent to " + arguments[3] + " \u2022 " + a, b, "", "#" + 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) } function doWhisper(a, b, c, d) { whis = ":hb_lightbubble [Whisper from: " + c + "]\xa0 "; var f, e = null; f = 1 == d ? 1 : 2, cb.log(f); for (var g = f; g < a.length; g++) g == f ? e = a[g] : e += " " + a[g]; whisArray[findWhisper(b)][1] = c, b && (e ? notifyWhisper((whis + e).trim(), b) : notifyError("You did not specify a message.", c)) } function textReplaceWhisper(a, b, c) { var f, d = null, e = null; if (1 == c ? (d = whisArray[findWhisper(b)][1], f = 1) : (d = a[1], f = 2), d) { for (var g = f; g < a.length; g++) g == f ? e = a[g] : e += " " + a[g]; e && (e = ":hb_darkbubble [Whisper to: " + d.toLowerCase() + "]\xa0 " + e) } return d && e || (e = 1 == c ? "Reply not sent." : "Whisper not sent."), e } 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: d > 1 || c ? doWhisper(a, e, b) : notifyError(e + " is ignoring whispers from greys.", b); break; case 2: d > 2 || c ? doWhisper(a, e, b) : notifyError(e + " is ignoring whispers from greys and light blues who haven't tipped in the room.", b); break; case 3: d > 3 || c ? doWhisper(a, e, b) : notifyError(e + " is ignoring whispers from all members who haven't tipped in the room.", b); break; case 4: c ? doWhisper(a, e, b) : 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... You need to consult a therapist!", b) } function sendReply(a, b) { var c = whisArray[findWhisper(b)][1]; cbjs.arrayContains(silenceArray, b) && notifyError("You do not have whispering privileges. Your message was not sent.", b), cbjs.arrayContains(ignoreArray[findIgnorer(c)], b) ? notifyError(c + " is ignoring whispers from you. Your message was not sent.", b) : "" != c ? doWhisper(a, c, b, !0) : notifyError("No one has whispered you.", b) } function ignoreUser(a, b) { cbjs.arrayContains(ignoreArray[findIgnorer(b)], a) ? a == b ? notifyError("You can't ignore yourself. You need to consult a therapist.", b) : notifyError("You are already ignoring that user's whispers.", b) : a ? (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)) : notifyError('You did not specify a user to ignore. Type "/sbhelp\xa0ignore" to see how to use /ignore.', b) } function unignoreUser(a, b) { a == b ? notifyError("My, you are an odd one, aren't you?", b) : cbjs.arrayContains(ignoreArray[findIgnorer(b)], a) ? (cbjs.arrayRemove(ignoreArray[findIgnorer(b)], a), notify("You are no longer ignoring whispers from " + a, b)) : a ? notifyError(a + " is not being ignored. There is no need to unignore " + a, b) : notifyError('You did not specify a user to unignore. Type "/sbhelp\xa0unignore" to see how to use /unignore.', b) } function setTipTitles(a, b) { var c = ""; "Yes" == cb.settings.kingTipper && a == currentKing && (c = " " + cb.settings.crownIcon + " "); var d = c + "|" + getUserTotal(a) + "| " + b; return d } function emod(a, b, c) { b && (b = b.toLowerCase()), "add" == a ? cbjs.arrayContains(emodArray, b) ? notifyError(b + " has already been granted emergency moderator powers.", c) : (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)) : "remove" == a ? 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)) : notifyError(b + " has not been granted emergency moderator powers.", c) : a ? notifyError(a + ' is not a valid option for /emod. Type "/sbhelp\xa0emod" to see how to use /emod.', c) : notifyError('You did not enter a valid option for /emod. Type "/sbhelp\xa0emod" to see how to use /emod.', c) } function blockNotice(a, b) { "on" == a ? cbjs.arrayContains(modBlockMsgArray, b) ? notifyError("Your Blocked Message notices are already turned on", b) : (modBlockMsgArrayPopulate(b), notify("You have turned ON Blocked Message notices. To turn them back off again, type: /blocknotice\xa0off", b)) : "off" == a ? cbjs.arrayContains(modBlockMsgArray, b) ? (modBlockMsgArrayDepopulate(b), notify("You have turned OFF Blocked Message notices. To turn them back on again, type: /blocknotice\xa0on", b)) : notifyError("Your Blocked Message notices are already turned off", b) : a ? notifyError(a + ' is not a valid option for /blocknotice. Type "/sbhelp\xa0blocknotice" to see how to use /blocknotice.', b) : notifyError('You did not enter a valid option for /blocknotice. Type "/sbhelp\xa0blocknotice" to see how to use /blocknotice.', b) } function kingSpam() { clearTimeout(kingTimeout), kingTimeout = setTimeout(kingSpamTimer, kingTimer * minuteMS) } function kingSpamTimer() { if (kingTip < kingMin) var a = kingMin; else var a = kingTip + 1; 1 == kingTipperSpam && (notifyTheme(" " + cb.settings.crownIcon + " Tip a total of " + a + " to be Sage's new " + cb.settings.kingMessage + "! " + cb.settings.crownIcon), kingSpam()) } function showLeaders(a, b) { var c, d = ""; if (!tipArray.length) return void notifyError("No tips yet", b); for (sortTipArray(), c = 0; c < a && c < tipArray.length; c += 1) d += (c ? "\n" : "") + (c + 1) + ".\xa0\xa0" + tipArray[c].sUser + "\xa0\xa0(" + tipArray[c].nTotal + " tokens)"; cb.setTimeout(function() { notifyHeaderThemeBold(cb.settings.crownIcon + bullets + " Leader Board " + bullets + cb.settings.crownIcon, b) }, 500), cb.setTimeout(function() { notifyLeaderTheme(d + "\n", b) }, 1500) } function ldrSpam() { clearTimeout(ldrTimeout), ldrTimeout = setTimeout(ldrSpamTimer, ldrTimer * minuteMS) } function ldrSpamTimer() { "Yes" == cb.settings.leaderBoard && 1 == leaderboardSpam && (tipArray.length && showLeaders(3, ""), ldrSpam()) } function showLeaderBoard(a) { "Yes" == cb.settings.leaderBoard ? showLeaders(10, a) : notifyError("The room host has decided not to use the Leaderboard feature.", a) } function notifierSpam() { notifierTimeout = setTimeout(function() { 1 == notifierSpamTGL && noticeArray.length && (sendRotating(), notifierSpam()) }, notifierTimer * minuteMS) } function addNotice(a) { isBlank(a) || (a = a.replace(/((\\|\/)n|\{newline\})/gi, "\n"), noticeArray.push(a)) } 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) } function sendRotating() { noticeArray.length && (noticeArray[noticeNum] && notifyThemePlain(noticeArray[noticeNum]), noticeNum += 1, noticeNum >= noticeArray.length && (noticeNum = 0)) } function dospamWordlist(a) { var b = a.trim().replace(/([^\w\s\u0027\u2019\[\]]|_)/gi, " "), c = null, d = new RegExp("((^|\\s)[^\\s]\\s[^\\s]\\s[^\\s]($|\\s))", "i"), 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"), 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)\\b|\\b(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)|(Watch)|(hot and delicious)|(delicious and hot)|(I'm fingering)|(I can't stop fingering)|(I can't wait I'm fingering)\\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 (!0) { case -1 != b.search(d): c = "Spam Wordlist 3"; break; case -1 != b.search(e): c = "Spam Wordlist 1"; break; case -1 != b.search(f): c = "Spam Wordlist 2" } return c } function dogreyWordlist(a) { var b = a.trim().replace(/([^\w\s\u0027\u2019\[\]]|_)/gi, " "), c = null, d = new RegExp("[^\\x00-\\xAE\\u2000-\\u206F]"), e = new RegExp("\\b(b+by|b+(a|e)*b+(y|e)*)\\b", "i"), 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"), g = new RegExp("\\b([a-g|i-z]*(h+u+)*m+m+h*|u+f+|#+)\\b", "i"), 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|f+i+n+g+e+r+i+n+g|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|o+f+f)\\b", "i"), 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"), 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"), 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 (!0) { case a.length <= 1 || a.length > 500: c = "Grey Wordlist"; break; case -1 != b.search(d): c = "Grey Wordlist"; break; case -1 != b.search(e): c = "Grey Wordlist"; break; case -1 != b.search(f): c = "Grey Wordlist"; break; case -1 != b.search(g): c = "Grey Wordlist"; break; case -1 != b.search(h): c = "Grey Wordlist"; break; case -1 != b.search(i): c = "Grey Wordlist"; break; case -1 != b.search(j): c = "Grey Wordlist"; break; case -1 != b.search(k): c = "Grey Wordlist" } return c } function parsecustomWordlist() { 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*")) } function docustomWordlist(a) { var a = a.replace(/[^\w]|_/gi, ""), c = new RegExp("(" + customWordlistRegex + ")", "i"); return -1 != a.search(c) || -1 != a.replace(/[^\w]|\d|_/gi, "").search(c) ? "blocked" : void 0 } function addWord(a) { cb.settings.customWordlist += "," + a, parsecustomWordlist() } function changefcIcon(a) { cb.settings.fanclubIcon = a } function changesfcIcon(a) { cb.settings.specialfanclubIcon = a } function changecrownIcon(a) { cb.settings.crownIcon = a } function fanclubToggle(a, b) { "on" == a ? "Yes" == cb.settings.fanclubToggle ? notifyError("The fan club is already turned on.", b) : (cb.settings.fanclubToggle = "Yes", notify("You have turned on the fan club.", b)) : "off" == a ? "No" == cb.settings.fanclubToggle ? notifyError("The fan club is already turned off.", b) : (cb.settings.fanclubToggle = "No", notify("You have turned off the fan club.", b)) : null != a ? notifyError(a + " is not a valid option for /fct.", b) : null == a && notifyError("You did not enter a valid option for /fct.", b) } function specialfanclubToggle(a, b) { "on" == a ? "Yes" == cb.settings.specialfanclubToggle ? notifyError("The special fan club is already turned on.", b) : (cb.settings.specialfanclubToggle = "Yes", notify("You have turned on the special fan club.", b)) : "off" == a ? "No" == cb.settings.specialfanclubToggle ? notifyError("The special fan club is already turned off.", b) : (cb.settings.specialfanclubToggle = "No", notify("You have turned off the special fan club.", b)) : null != a ? notifyError(a + " is not a valid option for /sfct.", b) : null == a && notifyError("You did not enter a valid option for /sfct.", b) } function whisperToggle(a, b) { "on" == a ? "Yes" == cb.settings.whisperToggle ? notifyError("The whisper function is already turned on.", b) : (cb.settings.whisperToggle = "Yes", notify("You have turned on the whisper function.", b)) : "off" == a ? "No" == cb.settings.whisperToggle ? notifyError("The whisper function is already turned off.", b) : (cb.settings.whisperToggle = "No", notify("You have turned off the whisper function.", b)) : null != a ? notifyError(a + " is not a valid option for /wt.", b) : null == a && notifyError("You did not enter a valid option for /wt.", b) } function spamWordlistToggle(a, b) { "on" == a ? "Yes" == cb.settings.spamWordlistToggle ? notifyError("The spam wordlist is already turned on.", b) : (cb.settings.spamWordlistToggle = "Yes", notify("You have turned on the spam wordlist.", b)) : "off" == a ? "No" == cb.settings.spamWordlistToggle ? notifyError("The spam wordlist is already turned off.", b) : (cb.settings.spamWordlistToggle = "No", notify("You have turned off the spam wordlist.", b)) : null != a ? notifyError(a + " is not a valid option for /swlt.", b) : null == a && notifyError("You did not enter a valid option for /swlt.", b) } function customWordlistToggle(a, b) { "on" == a ? "Yes" == cb.settings.customWordlistToggle ? notifyError("The custom wordlist is already turned on.", b) : (cb.settings.customWordlistToggle = "Yes", notify("You have turned on the custom wordlist.", b)) : "off" == a ? "No" == cb.settings.customWordlistToggle ? notifyError("The custom wordlist is already turned off.", b) : (cb.settings.customWordlistToggle = "No", notify("You have turned off the custom wordlist.", b)) : null != a ? notifyError(a + " is not a valid option for /cwlt.", b) : null == a && notifyError("You did not enter a valid option for /cwlt.", b) } function greyWordlistToggle(a, b) { "on" == a ? "Yes" == cb.settings.greyWordlistToggle ? notifyError("The grey wordlist is already turned on.", b) : (cb.settings.greyWordlistToggle = "Yes", notify("You have turned on the grey wordlist.", b)) : "off" == a ? "No" == cb.settings.greyWordlistToggle ? notifyError("The grey wordlist is already turned off.", b) : (cb.settings.greyWordlistToggle = "No", notify("You have turned off the grey wordlist.", b)) : null != a ? notifyError(a + " is not a valid option for /gwlt.", b) : null == a && notifyError("You did not enter a valid option for /gwlt.", b) } function limitCamToggle(a, b) { "on" == a ? "on" == limitCam ? notifyError("The limit cam is already turned on.", b) : (limitCam = "on", cb.limitCam_start(hm), notifyError(mm, cb.room_slug), notify("You have turned on the limit cam.", b)) : "off" == a ? "off" == limitCam ? notifyError("Limit cam is already turned off.", b) : (limitCam = "off", cb.limitCam_stop(), notify("You have turned off the limit cam.", b)) : null != a ? notifyError(a + " is not a valid option for /lct.", b) : null == a && notifyError("You did not enter a valid option for /lct.", b) } function tipMenuToggle(a, b) { "on" == a ? "Yes" == cb.settings.tipMenuToggle ? notifyError("The tip menu is already turned on.", b) : (cb.settings.tipMenuToggle = "Yes", notify("You have turned on the tip menu.", b)) : "off" == a ? "No" == cb.settings.tipMenuToggle ? notifyError("The tip menu is already turned off.", b) : (cb.settings.tipMenuToggle = "No", notify("You have turned off the tip menu.", b)) : null != a ? notifyError(a + " is not a valid option for /tmt.", b) : null == a && notifyError("You did not enter a valid option for /tmt.", b) } function tipMenuNotifierToggle(a, b) { "on" == a ? 1 == tipMenuSpam ? notifyError("The tip menu is already turned on.", b) : (tipMenuSpam = 1, tipmenuNotifierSpam(), notify("You have turned on the tip menu.", b)) : "off" == a ? 0 == tipMenuSpam ? notifyError("The tip menu is already turned off.", b) : (tipMenuSpam = 0, notify("You have turned off the tip menu.", b)) : null != a ? notifyError(a + " is not a valid option for /tmnt.", b) : null == a && notifyError("You did not enter a valid option for /tmnt.", b) } function tipMenuMessageNotifierToggle(a, b) { "on" == a ? 1 == tipMenuMessageSpam ? notifyError("The tip menu messages are already turned on.", b) : (tipMenuMessageSpam = 1, notify("You have turned on the tip menu messages.", b)) : "off" == a ? 0 == tipMenuMessageSpam ? notifyError("The tip menu messages are already turned off.", b) : (tipMenuMessageSpam = 0, notify("You have turned off the tip menu messages.", b)) : null != a ? notifyError(a + " is not a valid option for /tmmt.", b) : null == a && notifyError("You did not enter a valid option for /tmmt.", b) } function fanclubtipsToggle(a, b) { "on" == a ? "Yes" == cb.settings.fanclubtips ? notifyError("Fan club tips is already turned on.", b) : (cb.settings.fanclubtips = "Yes", notify("You have turned on fan club tips.", b)) : "off" == a ? "No" == cb.settings.fanclubtips ? notifyError("Fan club tips is already turned off.", b) : (cb.settings.fanclubtips = "No", notify("You have turned off fan club tips.", b)) : null != a ? notifyError(a + " is not a valid option for /fctip.", b) : null == a && notifyError("You did not enter a valid option for /fctip.", b) } function specialfanclubtipsToggle(a, b) { "on" == a ? "Yes" == cb.settings.specialfanclubtips ? notifyError("Special fan club tips is already turned on.", b) : (cb.settings.specialfanclubtips = "Yes", notify("You have turned on special fan club tips.", b)) : "off" == a ? "No" == cb.settings.specialfanclubtips ? notifyError("Special fan club tips is already turned off.", b) : (cb.settings.specialfanclubtips = "No", notify("You have turned off special fan club tips.", b)) : null != a ? notifyError(a + " is not a valid option for /sfctip.", b) : null == a && notifyError("You did not enter a valid option for /sfctip.", b) } function invalidCommandToggle(a, b) { "on" == a ? "Yes" == cb.settings.invalidToggle ? notifyError("Invalid command error messages are already turned on.", b) : (cb.settings.invalidToggle = "Yes", notify("You have turned on invalid command error messages.", b)) : "off" == a ? "No" == cb.settings.invalidToggle ? notifyError("Invalid command error messages are already turned off.", b) : (cb.settings.invalidToggle = "No", notify("You have turned off invalid command error messages.", b)) : null != a ? notifyError(a + " is not a valid option for /ict.", b) : null == a && notifyError("You did not enter a valid option for /ict.", b) } function autoSilenceSpamToggle(a, b) { "on" == a ? "Yes" == cb.settings.autoSilenceSpamToggle ? notifyError("Auto Silence Spam is already turned on.", b) : (cb.settings.autoSilenceSpamToggle = "Yes", notify("You have turned on Auto Silence Spam.", b)) : "off" == a ? "No" == cb.settings.autoSilenceSpamToggle ? notifyError("Auto Silence Spam is already turned off.", b) : (cb.settings.autoSilenceSpamToggle = "No", notify("You have turned off Auto Silence Spam.", b)) : null != a ? notifyError(a + " is not a valid option for /asst.", b) : null == a && notifyError("You did not enter a valid option for /asst.", b) } function niceList(a, b, c) { a ? (a = a.toLowerCase(), "a" == c ? cbjs.arrayContains(niceArray, a) ? notifyError(a + " is already on the nice list.", b) : (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)) : "r" == c && (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)) : notifyError(a + " is not on the nice list.", b))) : notifyError('Uh oh. You didn\'t specify a user.\nType "/sbhelp\xa0nicelist" to see how to use the nice list.', b) } function greyList(a, b, c) { a ? (a = a.toLowerCase(), "a" == c ? cbjs.arrayContains(greyArray, a) ? notifyError(a + " is already on the grey list.", b) : (greyArrayPopulate(a), notify("You have added " + a + " to the grey list.", b)) : "r" == c && (cbjs.arrayContains(greyArray, a) ? (greyArrayDepopulate(a), notify("You have removed " + a + " from the grey list.", b)) : notifyError(a + " is not on the grey list.", b))) : notifyError('Uh oh. You didn\'t specify a user.\nType "/sbhelp\xa0greylist" to see how to use the grey list.', b) } function kingSpamToggle(a, b) { "Yes" != cb.settings.kingTipper ? notifyError("The room host has decided not to use the King Tipper feature", b) : "on" == a ? 1 == kingTipperSpam ? notifyError("The King Tipper spam is already turned on.", b) : (kingTipperSpam = 1, kingSpam(), notify("You have turned on King Tipper spam.", b)) : "off" == a ? 0 == kingTipperSpam ? notifyError("The King Tipper spam is already turned off.", b) : (kingTipperSpam = 0, notify("You have turned off the King Tipper spam.", b)) : null != a ? notifyError(a + ' is not a valid option for /kingspam.\nType "/sbhelp\xa0kingspam" to see how to use /kingspam.', b) : null == a && notifyError('You did not enter a valid option for /kingspam.\nType "/sbhelp\xa0kingspam" to see how to use /kingspam.', b) } function notifierSpamToggle(a, b) { "on" == a ? 1 == notifierSpamTGL ? notifyError("The Notifier spam is already turned on.", b) : (notifierSpamTGL = 1, notify("You have turned on the Notifier spam.", b)) : "off" == a ? 0 == notifierSpamTGL ? notifyError("The Notifier spam is already turned off.", b) : (notifierSpamTGL = 0, notify("You have turned off the Notifier spam.", b)) : null != a ? notifyError(a + ' is not a valid option for /notifierspam.\nType "/sbhelp\xa0notifierspam" to see how to use /notifierspam.', b) : null == a && notifyError('You did not enter a valid option for /notifierspam.\nType "/sbhelp\xa0notifierspam" to see how to use /notifierspam.', b) } function leaderboardSpamToggle(a, b) { "on" == a ? 1 == leaderboardSpam ? notifyError("The Leaderboard spam is already turned on.", b) : (leaderboardSpam = 1, ldrSpam(), notify("You have turned on the Leaderboard spam.", b)) : "off" == a ? 0 == leaderboardSpam ? notifyError("The Leaderboard spam is already turned off.", b) : (leaderboardSpam = 0, notify("You have turned off the Leaderboard spam.", b)) : null != a ? notifyError(a + ' is not a valid option for /leaderboardspam.\nType "/sbhelp\xa0leaderboardspam" to see how to use /leaderboardspam.', b) : null == a && notifyError('You did not enter a valid option for /leaderboardspam.\nType "/sbhelp\xa0leaderboardspam" to see how to use /leaderboardspam.', b) } function isBlank(a) { var b; return a && (b = a.trim()), null == b || "" == b || "[Optional" == b.substr(0, 9) ? !0 : !1 } function isValidColor(a) { var b = a, c = "0123456789abcdefABCDEF", d = !0; if ("#" == b.charAt(0) && (b = b.substr(1)), b && 6 == b.length) for (var e = 0; e < 6; e++) - 1 == c.indexOf(b.charAt(e)) && (d = !1); else d = !1; return d ? !0 : (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), !1) } function setColor() { var a = cb.settings.colorscheme, b = cb.settings.darkcolor.trim(), c = cb.settings.lightcolor.trim(); a && "Custom" == a.substr(0, 6) ? 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) : isBlank(b) ? notifyErrorBold("Whoops. You selected a custom color scheme but you didn't select a text color. Reverted to default color scheme.", roomHost) : isBlank(c) && !isBlank(b) ? (b && "#" != b.charAt(0) && (b = "#" + b), isValidColor(b) && (theme_dark = b, theme_light = white)) : isBlank(c) || isBlank(b) || (b && "#" != b.charAt(0) && (b = "#" + b), c && "#" != c.charAt(0) && (c = "#" + c), isValidColor(b) && isValidColor(c) && (theme_dark = b, theme_light = c)) : (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), "Purple on Purple" == a ? (theme_dark = purple_dark, theme_light = purple_light) : "Purple on Pink" == a ? (theme_dark = pink_dark, theme_light = pink_light) : "Black on Blue" == a ? (theme_dark = blue_dark, theme_light = blue_light) : "Blue on Grey" == a ? (theme_dark = dark_blue_dark, theme_light = dark_blue_light) : "Black on Green" == a ? (theme_dark = green_dark, theme_light = green_light) : "Blue on Green" == a ? (theme_dark = chartreuse_dark, theme_light = chartreuse_light) : "Orange on Black" == a ? (theme_dark = halloween_dark, theme_light = halloween_light) : "Green on Red" == a ? (theme_dark = christmas_dark, theme_light = christmas_light) : "Red on Pink" == a && (theme_dark = valentines_dark, theme_light = valentines_light)) } function help(a, b) { var c = 0; switch (null == a && (a = ""), a) { case "": c = 1, notifyHelpBold(bullets + " Sage's Bot Help Menu " + bullets, b), notify('Type "/sbhelp\xa0x", where x is one of the following choices, for more detailed information.\nEx: /sbhelp\xa0commands', b), notifyHelpPlain("commands\nnicelist\ngreylist\nabout", b); break; case "commands": c = 1, notifyHelpBold(bullets + " Sage's Bot Command List " + bullets, b), notify('Type "/sbhelp\xa0x", where x is one of the following commands, for more detailed information.\nEx: /sbhelp\xa0silencelevel', b), notifyHelpPlain("/greyson\n/greysoff\n/silencelevel\n/graphiclevel\n/silence\n/unsilence\n/silencelast\n/starttimern\n/stoptimern\n/addtimen\n/minustimen\n/timeleftn\n/starttimers\n/stoptimers\n/addtimes\n/minustimes\n/timelefts\n/starttimerv\n/stoptimerv\n/addtimev\n/minustimev\n/timeleftv\n/starttimerl\n/stoptimerl\n/addtimel\n/minustimel\n/timeleftl\n/n\n/note\n/notice\n/cn\n/cnd\n/cndh\n/cnh\n/tb\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": notifyHelpBold(bullets + 'The "Nice" List' + bullets, 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), c = 1; break; case "greylist": c = 1, notifyHelpBold(bullets + 'The "Grey" List' + bullets, 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": c = 1, notifyHelpBold(bullets + " About Sage's Bot " + bullets, b), notify('"Sage\'s Bot" is based on "All In One Bot Version 7.0 (9-7-14)" by Mike_Lovin. \nWith continuing development by Mike_Lovin. Comments, suggestions, requests, and bug reports can be communicated by tweeting @Mike_Lovin7. \nThe purpose of "Sage\'s Bot" is to make the lives of the host and mods as easy as possible. It adds popular features such as King Tipper, All Time High Tip King, Leaderboard, Rotating Notifier, Tip Menu, Fanclubs, Nicknames, CrazyNote, Grey, Custom, and Spam wordlist that blocks abusive messages and auto silences spam bots, 4 Timers: Naked, General, Hula, and Logoff, Customizable color schemes, Special access mod of any color can help with commands, Whispers in the main chat window that has 4 levels or can be turned on or off, plus many more features. ', b), notify("", b); break; case "greyson": case "greyon": case "grayson": case "grayon": case "silencegreys": case "selencegrays": c = 1, notifyHelpBold(bullets + "/greyson Help" + bullets, 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": c = 1, notifyHelpBold(bullets + "/greysoff Help" + bullets, 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": c = 1, notifyHelpBold(bullets + "/silencelevel Help" + bullets, b), notify('/silencelevel is a command that is usable by moderators and room hosts.\nThe syntax for using silencelevel is "/silencelevel\xa0x", 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": c = 1, notifyHelpBold(bullets + "/graphiclevel Help" + bullets, b), notify('/graphiclevel is a command that is usable by moderators and room hosts.\nThe syntax for using graphiclevel is "/graphiclevel\xa0x", 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": c = 1, notifyHelpBold(bullets + "/silence or /s Help" + bullets, b), notify('/silence or /s is a command that is usable by moderators and room hosts.\nThe syntax for using silence is "/silence\xa0x" or "/s\xa0x", where x is the username of the user you want to silence.\nThe effect of /silence or /s 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 or /s can be reversed by using the command /unsilence or /us.', b), notify("", b); break; case "unsilence": c = 1, notifyHelpBold(bullets + "/unsilence or /us Help" + bullets, b), notify('/unsilence or /us is a command that is usable by moderators and room hosts.\nThe syntax for using unsilence is "/unsilence\xa0x" or "/us\xa0x", where x is the username of the user you want to unsilence.\nunsilence or /us simply grants voice privileges back to a user who was previously silenced.\nNOTE: /unsilence or /us WILL NOT undo the effect of Chaturbate\'s silence feature!\n/unsilence or /us WILL ONLY reverse the effect of /silence or /s!', b), notify("", b); break; case "silencelast": case "sl": c = 1, notifyHelpBold(bullets + "/silencelast or /sl Help" + bullets, b), notify('/silencelast or /sl is a command that is usable by moderators and room hosts.\nThe syntax for using silence last is "/silencelast" or sl is "/sl", this will silence the most recent user that typed in chat.\nThe effect of /silencelast or /sl is the same as Chaturbate\'s silence feature, except that it lasts for the duration of the current session instead of for six hours.\nThese are available commands that will silence last.\nThe effect of /silence or /sl can be reversed by using the command /unsilence.', b), notify("", b); break; case "starttimern": case "stn": c = 1, notifyHelpBold(bullets + "/starttimern or /stn Help" + bullets, b), notify('/starttimern or /stn is a command that is usable by moderators and room hosts.\nThe syntax for using starttimern is "/starttimern\xa0x" or stn is "/stn\xa0x" , where x is the desired duration of the Naked Timer in minutes.\n/starttimern or /stn will accept whole numbers only.\nThe Naked Timer will make announcements at five minutes remaining and at one minute remaining.\n/addtimen or /atn can be used to add time to a currently running Naked Timer.\n/minustimen or /mtn can be used to subtract time from a currently running Naked Timer.\n/timeleftn or /tln can be used to display the amount of time remaining on the Naked Timer.', b), notify("", b); break; case "stoptimern": case "endtimern": case "etn": c = 1, notifyHelpBold(bullets + "/stoptimern or /endtimern or /etn Help" + bullets, b), notify('/stoptimern or /endtimern or /etn is a command that is usable by moderators and room hosts.\nThe syntax for using stoptimern is "/stoptimern" or endtimern is "/endtimern" or etn is "/etn", this will stop the current Naked Timer that is running.\nThese are available commands that will stop the Naked Timer.', b), notify("", b); break; case "addtimen": case "atn": c = 1, notifyHelpBold(bullets + "/addtimen or /atn Help" + bullets, b), notify('/addtimen or /atn is a command that is usable by moderators and room hosts.\nThe syntax for using addtimen is "/addtimen\xa0x" or atn is "/atn\xa0x" , where x is the amount of time you want to add in minutes.\n/addtimen or /atn will accept whole numbers only.\nSee the help section for starttimern for more information on timern.', b), notify("", b); break; case "minustimen": case "mtn": c = 1, notifyHelpBold(bullets + "/minustimen or /mtn Help" + bullets, b), notify('/minustimen or /mtn is a command that is usable by moderators and room hosts.\nThe syntax for using minustimen is "/minustimen\xa0x", where x is the amount of time you want to subtract in minutes.\nThe syntax for using mtn is "/mtn\xa0x", where x is the amount of time you want to subtract in minutes.\n/minustimen or /mtn will accept whole numbers only.\nSee the help section for starttimern for more information on timern.', b), notify("", b); break; case "timeleftn": case "tln": c = 1, notifyHelpBold(bullets + "/timeleftn or /tln Help" + bullets, b), notify("/timeleftn is a command that is usable by everyone.\nThe syntax for using timeleftn is /timeleftn or tln is /tln\n/timeleftn will display the amount of time left on the Naked Timer in the format 00:00:00\nSee the help section for starttimern for more information on timern.", b), notify("", b); break; case "starttimerg": case "stg": c = 1, notifyHelpBold(bullets + "/starttimerg or /stg Help" + bullets, b), notify('/starttimerg or /stg is a command that is usable by moderators and room hosts.\nThe syntax for using starttimerg is "/starttimerg\xa0x" or stg is "/stg\xa0x" , where x is the desired duration of the General Timer in minutes.\n/starttimerg or /stg will accept whole numbers only.\nThe General Timer will make announcements at five minutes remaining and at one minute remaining.\n/addtimeg or /atg can be used to add time to a currently running General Timer.\n/minustimeg or /mtg can be used to subtract time from a currently running General Timer.\n/timeleftg or /tlg can be used to display the amount of time remaining on the General Timer.', b), notify("", b); break; case "stoptimerg": case "endtimerg": case "etg": c = 1, notifyHelpBold(bullets + "/stoptimerg or /endtimerg or /etg Help" + bullets, b), notify('/stoptimerg or /endtimerg or /etg is a command that is usable by moderators and room hosts.\nThe syntax for using stoptimerg is "/stoptimerg" or endtimerg is "/endtimerg" or etg is "/etg", this will stop the current General Timer that is running.\nThese are available commands that will stop the General Timer.', b), notify("", b); break; case "addtimeg": case "atg": c = 1, notifyHelpBold(bullets + "/addtimeg or /atg Help" + bullets, b), notify('/addtimeg or /atg is a command that is usable by moderators and room hosts.\nThe syntax for using addtimeg is "/addtimeg\xa0x" or atg is "/atg\xa0x" , where x is the amount of time you want to add in minutes.\n/addtimeg or /atg will accept whole numbers only.\nSee the help section for starttimerg for more information on timerg.', b), notify("", b); break; case "minustimeg": case "mtg": c = 1, notifyHelpBold(bullets + "/minustimeg or /mtg Help" + bullets, b), notify('/minustimeg or /mtg is a command that is usable by moderators and room hosts.\nThe syntax for using minustimeg is "/minustimeg\xa0x", where x is the amount of time you want to subtract in minutes.\nThe syntax for using mtgg is "/mtg\xa0x", where x is the amount of time you want to subtract in minutes.\n/minustimeg or /mtg will accept whole numbers only.\nSee the help section for starttimerg for more information on timerg.', b), notify("", b); break; case "timeleftg": case "tlg": c = 1, notifyHelpBold(bullets + "/timeleftg or /tlg Help" + bullets, b), notify("/timeleftg is a command that is usable by everyone.\nThe syntax for using timeleftg is /timeleftg or tlg is /tlg\n/timeleftg will display the amount of time left on the General Timer in the format 00:00:00\nSee the help section for starttimerg for more information on timerg.", b), notify("", b); break; case "starttimerv": case "stv": c = 1, notifyHelpBold(bullets + "/starttimerv or /stv Help" + bullets, b), notify('/starttimerv or /stv is a command that is usable by moderators and room hosts.\nThe syntax for using starttimerv is "/starttimerv\xa0x" or stv is "/stv\xa0x", where x is the desired duration of the Vibe timer in minutes.\n/starttimerv or /stv will accept whole numbers only.\nThe Vibe timer will make announcements at five minutes remaining and at one minute remaining.\n/addtimev or /atv can be used to add time to a currently running Vibe timer.\n/minustimev or /mtv can be used to subtract time from a currently running Vibe timer.\n/timeleftv or /tlv can be used to display the amount of time remaining on the Vibe timer.', b), notify("", b); break; case "stoptimerv": case "endtimerv": case "etv": c = 1, notifyHelpBold(bullets + "/stoptimerv or /endtimerv or /etv Help" + bullets, b), notify('/stoptimerv or /endtimerv or /etv is a command that is usable by moderators and room hosts.\nThe syntax for using stoptimerv is "/stoptimerv" or endtimerv is "/endtimerv" or etv is "/etv", this will stop the current Vibe timer that is running.\nThese are available commands that will stop the Vibe timer.', b), notify("", b); break; case "addtimev": case "atv": c = 1, notifyHelpBold(bullets + "/addtimev or /atv Help" + bullets, b), notify('/addtimev or /atv is a command that is usable by moderators and room hosts.\nThe syntax for using addtimev is "/addtimev\xa0x" or atv is "/atv\xa0x", where x is the amount of time you want to add in minutes.\n/addtimev or /atv will accept whole numbers only.\nSee the help section for starttimerv for more information on timers.', b), notify("", b); break; case "minustimev": case "mtv": c = 1, notifyHelpBold(bullets + "/minustimev or /mtv Help" + bullets, b), notify('/minustimev or /mtv is a command that is usable by moderators and room hosts.\nThe syntax for using minustimev is "/minustimev\xa0x" or mtv is "/mtv\xa0x", where x is the amount of time you want to subtract in minutes.\n/minustimev or /mtv will accept whole numbers only.\nSee the help section for starttimerv for more information on timers.', b), notify("", b); break; case "timeleftv": case "tlv": c = 1, notifyHelpBold(bullets + "/timeleftv or /tlv Help" + bullets, b), notify("/timeleftv or /tlv is a command that is usable by everyone.\nThe syntax for using timeleftv is /timeleftv or tlv is /tlv\n/timeleftv or /tlv will display the amount of time left on the Vibe timer in the format 00:00:00\nSee the help section for starttimerv for more information on timers.", b), notify("", b); break; case "starttimerl": case "stl": c = 1, notifyHelpBold(bullets + "/starttimerl or /stl Help" + bullets, b), notify('/starttimerl or /stl is a command that is usable by moderators and room hosts.\nThe syntax for using starttimerl is "/starttimerl\xa0x" or stl is "/stl\xa0x", where x is the desired duration of the Log Off timer in minutes.\n/starttimerl or /stl will accept whole numbers only.\nThe Log Off timer will make announcements at fifteen, ten, five, and at one minute remaining.\n/addtimel or /atl can be used to add time to a currently running Log Off timer.\n/minustimel or /mtl can be used to subtract time from a currently running Log Off timer.\n/timeleftl or /tll can be used to display the amount of time remaining on the Log Off timer.', b), notify("", b); break; case "stoptimerl": case "endtimerl": case "etl": c = 1, notifyHelpBold(bullets + "/stoptimerl or /endtimerl or /etl Help" + bullets, b), notify('/stoptimerl or /endtimerl or /etl is a command that is usable by moderators and room hosts.\nThe syntax for using stoptimerl is "/stoptimerl" or endtimerl is "/endtimerl" or etl is "/etl", this will stop the current Log Off timer that is running.\nThese are available commands that will stop the Log Off timer.', b), notify("", b); break; case "addtimel": case "atl": c = 1, notifyHelpBold(bullets + "/addtimel or /atl Help" + bullets, b), notify('/addtimel or /atl is a command that is usable by moderators and room hosts.\nThe syntax for using addtimel is "/addtimel\xa0x" or atl is "/atl\xa0x", where x is the amount of time you want to add in minutes.\n/addtimel or /atl will accept whole numbers only.\nSee the help section for starttimerl for more information on timers.', b), notify("", b); break; case "minustimel": case "mtl": c = 1, notifyHelpBold(bullets + "/minustimel or /mtl Help" + bullets, b), notify('/minustimel or /mtl is a command that is usable by moderators and room hosts.\nThe syntax for using minustimel is "/minustimel\xa0x" or mtl is "/mtl\xa0x", where x is the amount of time you want to subtract in minutes.\n/minustimel or /mtl will accept whole numbers only.\nSee the help section for starttimerl for more information on timers.', b), notify("", b); break; case "timeleftl": case "tll": c = 1, notifyHelpBold(bullets + "/timeleftl or /tll Help" + bullets, b), notify("/timeleftl or /tll is a command that is usable by everyone.\nThe syntax for using timeleftl is /timeleftl or tll is /tll\n/timeleftl or /tll will display the amount of time left on the Log Off timer in the format 00:00:00\nSee the help section for starttimerl for more information on timers.", b), notify("", b); break; case "note": case "notice": case "n": c = 1, notifyHelpBold(bullets + "/note Help" + bullets, b), notify('/note is a command that is usable by moderators and room host.\nThe syntax for using note is "/note\xa0x", where x is the message you want to send.\n/note, /notice, and /n are all available commands that will send a notice.\nA note is a public notification that will be sent to everyone in the main chat window.', b), notify("", b); break; case "cn": case "sendnotice": c = 1, notifyHelpBold(bullets + "/cn Help" + bullets, 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": c = 1, notifyHelpBold(bullets + "/cnd Help" + bullets, 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": c = 1, notifyHelpBold(bullets + "/cndh Help" + bullets, 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": c = 1, notifyHelpBold(bullets + "/cnh Help" + bullets, 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 "tb": case "pmm": c = 1, notifyHelpBold(bullets + "/tb Help" + bullets, b), notify("/tb is a command that is usable by moderators.\nThe syntax for this command is /tb 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": c = 1, notifyHelpBold(bullets + "/tm Help" + bullets, 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": c = 1, notifyHelpBold(bullets + "/tbm Help" + bullets, 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": c = 1, notifyHelpBold(bullets + "/tv Help" + bullets, 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": c = 1, notifyHelpBold(bullets + "/addnotice Help" + bullets, b), notify('/addnotice is a command that is usable by moderators and room hosts.\nThe syntax for using add notice is "/addnotice\xa0x", 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": c = 1, notifyHelpBold(bullets + "/removenotice Help" + bullets, b), notify('/removenotice is a command that is usable by moderators and room hosts.\nThe syntax for using remove notice is "/removenotice\xa0x", 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": c = 1, notifyHelpBold(bullets + "/shownotices Help" + bullets, 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": c = 1, notifyHelpBold(bullets + "/noticetimer Help" + bullets, b), notify('/noticetimer is a command that is usable by moderators and room hosts.\nThe syntax for using notice timer is "/noticetimer\xa0x", 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": c = 1, notifyHelpBold(bullets + "/whisper Help" + bullets, b), notify('/whisper is a command that is usable by everyone.\nThe syntax for using whisper is "/whisper\xa0x\xa0y", 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": c = 1, notifyHelpBold(bullets + "/reply Help" + bullets, b), notify('/reply is a command that is usable by everyone.\nThe syntax for using whisper is "/reply\xa0x", 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": c = 1, notifyHelpBold(bullets + "/ignore Help" + bullets, b), notify('/ignore is a command that is usable by everyone.\nThe syntax for using ignore is "/ignore\xa0x", 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": c = 1, notifyHelpBold(bullets + "/unignore Help" + bullets, b), notify('/unignore is a command that is usable by everyone.\nThe syntax for using unignore is "/unignore\xa0x", 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": c = 1, notifyHelpBold(bullets + "/ignorelevel Help" + bullets, 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\xa0x", 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": c = 1, notifyHelpBold(bullets + "/emod Help" + bullets, b), notify('/emod is a command that is usable by moderators and room hosts.\nThe syntax for using emod is "/emod\xa0x\xa0y", 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": c = 1, notifyHelpBold(bullets + "/blocknotice Help" + bullets, b), notify('/blocknotice is a command that is usable by moderators and room hosts.\nThe syntax for using blocknotice is "/blocknotice\xa0x", 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": case "an": c = 1, notifyHelpBold(bullets + "/addnice or /an Help" + bullets, b), notify('/addnice or /an is a command that is usable by moderators and room hosts.\nThe syntax for using addnice is "/addnice\xa0x" or an is "/an\xa0x", 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 or /rn.\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": case "rn": c = 1, notifyHelpBold(bullets + "/removenice or /rn Help" + bullets, b), notify('/removenice or /rn is a command that is usable by moderators and room hosts.\nThe syntax for using removenice is "/removenice\xa0x" or rn is "/rn\xa0x", 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": case "ag": c = 1, notifyHelpBold(bullets + "/addgrey or /ag Help" + bullets, b), notify('/addgrey or /ag is a command that is usable by moderators and room hosts.\nThe syntax for using addgrey is "/addgrey\xa0x" or ag is "/ag\xa0x", 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 or /rg.\nSee the help section for greylist for more information on the grey list.', b), notify("", b); break; case "removegrey": case "removegray": case "rg": c = 1, notifyHelpBold(bullets + "/removegrey or /rg Help" + bullets, b), notify('/removegrey or /rg is a command that is usable by moderators and room hosts.\nThe syntax for using removegrey is "/removegrey\xa0x" or rg is "/rg\xa0x" , 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 "sbhelp": c = 1, notifyHelpBold(bullets + "/sbhelp\xa0Help" + bullets, b), notify('/sbhelp\xa0is a command that is usable by everyone.\nThe syntax for using sbhelp is "/sbhelp\xa0x", where x is the subsection of the help menu that you want to access.', b), notify("", b); break; case "addword": case "aw": c = 1, notifyHelpBold(bullets + "/addword or /aw Help" + bullets, b), notify('/addword or /aw is a command that is usable by moderators and room hosts.\nThe syntax for using add word is "/addword\xa0x" or aw is "/aw\xa0x", 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": case "lb": c = 1, notifyHelpBold(bullets + "/leaderboard or /lb Help" + bullets, b), notify('/leaderboard or /lb is a command that is usable by everyone.\nThe syntax for using leaderboard is "/leaderboard" or lb is "/lb".\n/leaderboard or /lb shows the top 10 tippers of the current session.', b), notify("", b); break; case "kingspam": c = 1, notifyHelpBold(bullets + "/kingspam Help" + bullets, 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 Sage\'s new King!"', b), notify("", b); break; case "leaderboardspam": c = 1, notifyHelpBold(bullets + "/leaderboardspam Help" + bullets, 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": c = 1, notifyHelpBold(bullets + "The VIP List" + bullets, 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": c = 1, notifyHelpBold(bullets + "/addvip Help" + bullets, 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": c = 1, notifyHelpBold(bullets + "/removevip Help" + bullets, 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": c = 1, notifyHelpBold(bullets + "/nickmod Help" + bullets, 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": c = 1, notifyHelpBold(bullets + "/nickname Help" + bullets, 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": c = 1, notifyHelpBold(bullets + "/nicknames Help" + bullets, 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": c = 1, notifyHelpBold(bullets + "/tipmenu Help" + bullets, 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) } 0 == c && notifyError(a + ' is not a valid subsection of the help menu. Type "/sbhelp" to access the main help menu.', b) } function isFC(a) { return a in fcMembers } function makeFC(a) { fcMembers[a] = { u: 1 } } function unmakeFC(a) { delete fcMembers[a] } function setFC(a) { fcMembers[a] = { u: 1 } } function unsetFC(a) { delete fcMembers[a] } function isSFC(a) { return a in sfcMembers } function makeSFC(a) { sfcMembers[a] = { u: 1 } } function unmakeSFC(a) { delete sfcMembers[a] } function setSFC(a) { sfcMembers[a] = { u: 1 } } function unsetSFC(a) { delete sfcMembers[a] } function grabSettings() { if (cb.log("starting grabbing settings"), cb.settings.fcMemberList) for (var a = cb.settings.fcMemberList.split(","), b = 0; b < a.length; b++) { var c = a[b].toLowerCase().replace(/ /g, ""); fcMembers[c] = { u: 1 } } if (cb.settings.sfcMemberList) for (var d = cb.settings.sfcMemberList.split(","), b = 0; b < d.length; b++) { var c = d[b].toLowerCase().replace(/ /g, ""); sfcMembers[c] = { u: 1 } } cb.log("finished grabbing settings") } cb.settings_choices = [{ name: "colorscheme", label: "1.) PERSONALIZATION ............................................. Color Scheme:", type: "choice", choice1: "Purple on Purple", choice2: "Purple on Pink", choice3: "Black on Blue", choice4: "Blue on Grey", choice5: "Black on Green", choice6: "Blue on Green", choice7: "Orange on Black", choice8: "Green on Red", choice9: "Red on Pink", choice10: "Custom (Please define below)", required: !1 }, { name: "darkcolor", label: "Custom Text Color (Html #code)", type: "str", defaultValue: '[Optional - Set color scheme to "Custom" above]', required: !1 }, { name: "lightcolor", label: "Custom Highlight Color (Html #code)", type: "str", defaultValue: '[Optional - Set color scheme to "Custom" above]', required: !1 }, { name: "crazyNoteColorscheme", label: "Crazy Note Color Scheme (Only changes public notices) - Theme is colors picked above", type: "choice", choice1: "Theme", choice2: "Custom (Please define below)", defaultValue: "Theme", required: !1 }, { name: "crazyNoteText", label: "Custom Text Color - HTML color code (without #)", type: "str", defaultValue: '[Optional - Set color scheme to "Custom" above]', required: !1 }, { name: "crazyNoteBackground", label: "Custom Highlight Color - HTML color code (without #)", type: "str", defaultValue: '[Optional - Set color scheme to "Custom" above]', required: !1 }, { 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: !1 }, { 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: !1 }, { name: "stickyToggle", label: "Prevent sticky keyyyyyyyyyyyyys?", type: "choice", choice1: "Yes", choice2: "No", choice3: "Only for greys", defaultValue: "Only for greys", required: !1 }, { 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: !1 }, { 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: !1 }, { 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: !1 }, { 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: "slickrickpussysucker", required: !1 }, { name: "silenceList", label: "Silence List (Users who are permanently silenced)", type: "str", minLength: 1, maxLength: 1e3, defaultValue: "[Optional - Exact usernames, separated by commas]", required: !1 }, { name: "greyWordlistToggle", label: "3.) GREY WORDLIST ............. Use grey wordlist feature for greys?", type: "choice", choice1: "Yes", choice2: "No (Skip to section 4)", defaultValue: "No", required: !1 }, { name: "greyWordlistNotice", label: "Notify sender when his/her message gets blocked?(all wordlist)", type: "choice", choice1: "Yes", choice2: "No", defaultValue: "Yes", required: !1 }, { name: "greyWordlistShowModerators", label: "Notify moderators of blocked grey wordlist messages?", type: "choice", choice1: "Yes", choice2: "No", defaultValue: "Yes", required: !1 }, { name: "greyWordlistShowBroadcaster", label: "Notify broadcaster of blocked grey wordlist messages?", type: "choice", choice1: "Yes", choice2: "No", defaultValue: "No", required: !1 }, { name: "greyWordlistLevel", label: "Grey wordlist applies to", type: "choice", choice1: "Only greys", choice2: "Everyone", defaultValue: "Only greys", required: !1 }, { name: "customWordlistToggle", label: "4.) CUSTOM WORDLIST ................... Use custom wordlist feature?", type: "choice", choice1: "Yes", choice2: "No (Skip to section 5)", defaultValue: "Yes", required: !1 }, { name: "customWordlistShowModerators", label: "Notify moderators of blocked custom wordlist messages?", type: "choice", choice1: "Yes", choice2: "No", defaultValue: "Yes", required: !1 }, { name: "customWordlistShowBroadcaster", label: "Notify broadcaster of blocked custom wordlist messages?", type: "choice", choice1: "Yes", choice2: "No", defaultValue: "No", required: !1 }, { name: "customWordlist", label: "Custom wordlist", type: "str", minLength: 1, maxLength: 1e3, defaultValue: "", required: !1 }, { name: "customWordlistLevel", label: "Custom wordlist applies to", type: "choice", choice1: "Only greys", choice2: "Everyone", defaultValue: "Everyone", required: !1 }, { name: "spamWordlistToggle", label: "5.) SPAM WORDLIST .......................... Use spam wordlist feature?", type: "choice", choice1: "Yes", choice2: "No (Skip to section 6)", defaultValue: "No", required: !1 }, { name: "spamWordlistShowModerators", label: "Notify moderators of blocked spam wordlist messages?", type: "choice", choice1: "Yes", choice2: "No", defaultValue: "Yes", required: !1 }, { name: "spamWordlistShowBroadcaster", label: "Notify broadcaster of blocked spam wordlist messages?", type: "choice", choice1: "Yes", choice2: "No", defaultValue: "No", required: !1 }, { name: "spamWordlistLevel", label: "Spam wordlist applies to", type: "choice", choice1: "Only greys", choice2: "Everyone", defaultValue: "Everyone", required: !1 }, { name: "autoSilenceSpamToggle", label: "Automatically silence users who post spam?", type: "choice", choice1: "Yes", choice2: "No", defaultValue: "Yes", required: !1 }, { name: "whisperToggle", label: "6.) WHISPERS ............................................... Use whisper feature?", type: "choice", choice1: "Yes", choice2: "No (Skip to section 7)", defaultValue: "Yes", required: !1 }, { 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: !1 }, { 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: !1 }, { name: "kingTipper", label: "7.) KING TIPPER ................................... Use 'King Tipper' feature?", type: "choice", choice1: "Yes", choice2: "No (Skip to section 8)", defaultValue: "Yes", required: !1 }, { name: "kingMin", label: "Minimum tip amount to become King:", type: "int", minValue: 1, maxValue: 1e3, defaultValue: 25, required: !1 }, { name: "kingTipperSpam", label: "Periodically announce tip required to become King?", type: "choice", choice1: "Yes", choice2: "No (Skip to section 8)", defaultValue: "Yes", required: !1 }, { name: "kingTipperTimer", label: "Interval (in mins) for king announcement", type: "int", minValue: 1, maxValue: 60, defaultValue: 7, required: !1 }, { name: "kingMessage", label: "Message to print here... Tip xx to be Sage's new ______", type: "str", minLength: 1, maxLength: 30, defaultValue: "King", required: !0 }, { name: "crownIcon", label: "Crown Icon: used for King tipper (Use :GIFNAME with colon)", type: "str", minLength: 0, maxLength: 20, required: !1, defaultValue: ":crownprincess" }, { 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 8)", defaultValue: "No (Skip to section 9)", required: !0 }, { name: "kingTipperName", label: "Reigning high tip king (username)", type: "str", minLength: 0, maxLength: 40, required: !1, 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: !1, defaultValue: "FFFFFF" }, { name: "kingTippertxtColor", label: "Text color for king tipper - HTML color code (without #)", type: "str", minLength: 0, maxLength: 6, required: !1, defaultValue: "000000" }, { name: "kingTipperIcon", label: "Icon for king tipper (use :GIFNAME with colon)", type: "str", minLength: 0, maxLength: 40, required: !1, defaultValue: ":crown2" }, { name: "kingTipperNotifier", label: "Interval (in mins) for rotating king tipper message", type: "int", minValue: 1, maxValue: 60, defaultValue: 3, required: !1 }, { name: "leaderBoard", label: "9.) LEADERBOARD .............................. Use Leaderboard feature?", type: "choice", choice1: "Yes", choice2: "No (Skip to section 10)", defaultValue: "Yes", required: !1 }, { name: "leaderBoardSpam", label: "Periodically announce top 3 tippers?", type: "choice", choice1: "Yes", choice2: "No (Skip to section 8)", defaultValue: "Yes", required: !1 }, { name: "leaderBoardTimer", label: "Interval (in mins) for leaderboard announcement", type: "int", minValue: 1, maxValue: 60, defaultValue: 7, required: !1 }, { 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: !1 }, { name: "tipMessage", label: "Message to display", type: "str", minLength: 1, maxLength: 1e3, defaultValue: "Thank you for tipping, {username}!", required: !1 }, { name: "tipMessageMin", label: "Minimum tip to trigger message", type: "int", minValue: 1, maxValue: 1e6, defaultValue: 15, required: !1 }, { 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: !1 }, { name: "tipMessageText", label: "Custom Text Color - HTML color code (without #)", type: "str", defaultValue: '[Optional - Set color scheme to "Custom" above]', required: !1 }, { name: "tipMessageBackground", label: "Custom Highlight Color - HTML color code (without #)", type: "str", defaultValue: '[Optional - Set color scheme to "Custom" above]', required: !1 }, { name: "tipTitles", label: "11.) TIP TITLES ........................... Display users' tip totals as titles?", type: "choice", choice1: "Yes", choice2: "No", defaultValue: "Yes", required: !1 }, { name: "invalidToggle", label: "12.) MISC ................... Send error message for invalid commands?", type: "choice", choice1: "Yes", choice2: "No", defaultValue: "Yes", required: !1 }, { name: "specialaccessMod", label: "[Optional] Username of Special Access Mod - This (username, any color) will be able to use all the bot commands to make it easier for the model", type: "str", minLength: 0, maxLength: 30, required: !1, defaultValue: "" }, { name: "timerStartIcon", label: "Timer Start Icon: (Use :GIFNAME with colon)", type: "str", minLength: 0, maxLength: 20, required: !1, defaultValue: " :ml-gl " }, { name: "timerAddMinusIcon", label: "Timer AddMinus Icon: (Use :GIFNAME with colon)", type: "str", minLength: 0, maxLength: 20, required: !1, defaultValue: " :ml-bl " }, { name: "timerWarningIcon", label: "Timer Warning Icon: (Use :GIFNAME with colon)", type: "str", minLength: 0, maxLength: 20, required: !1, defaultValue: " :ml-yl " }, { name: "timerStopIcon", label: "Timer Stop Icon: (Use :GIFNAME with colon)", type: "str", minLength: 0, maxLength: 20, required: !1, defaultValue: " :ml-rl " }, { name: "vipList", label: "14.) CrazyTicket ... Names to grant access to a future fanclub, or other. '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: 1e4, required: !1, defaultValue: "mike_lovin" }, { name: "show_alias", label: "14.) NICKNAMES .................................................. Use Nicknames?", type: "choice", choice1: "Yes", choice2: "No (Skip to section 15)", defaultValue: "Yes (Skip to section 15)" }, { name: "nicknames", label: "Nicknames username@nickname e.g peer_pressure@[numpty noggin]", type: "str", minLenght: 0, required: !0, defaultValue: "username@[nickname]" }, { name: "allow_mod", label: "Allow Mods to edit Nicknames", type: "choice", choice1: "Yes", choice2: "No", defaultValue: "Yes" }, { name: "fanclubToggle", label: "15.) #1 FANCLUB ................................................ Use FANCLUB?", type: "choice", choice1: "Yes", choice2: "No", defaultValue: "Yes", required: !0 }, { name: "fanclubName", label: "Name of FANCLUB", type: "str", minLength: 0, maxLength: 30, required: !0, defaultValue: "The Dream Team" }, { name: "fanclubtips", label: "Tip to join FANCLUB?", type: "choice", choice1: "Yes", choice2: "No", defaultValue: "Yes", required: !0 }, { name: "fcTip", label: "Tip amount to join FANCLUB ", type: "int", minValue: 1, defaultValue: "1111" }, { name: "reBGColor", label: "Room Enter/Leave Background color for FANCLUB - HTML color code (without #)", type: "str", minLength: 0, maxLength: 6, required: !1, defaultValue: "FFFFFF" }, { name: "reTextColor", label: "Room Enter/Leave Text color for FANCLUB - HTML color code (without #)", type: "str", minLength: 0, maxLength: 6, required: !1, defaultValue: "12C02B" }, { name: "fcTextColor", label: "Text color for FANCLUB members messages in chat - HTML color code (without #)", type: "str", minLength: 0, maxLength: 6, required: !1, defaultValue: "000000" }, { name: "fcBGColor", label: "Background color for FANCLUB members messages in chat - HTML color code (without #)", type: "str", minLength: 0, maxLength: 6, required: !1, 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: 1e5, required: !1, defaultValue: "mike_lovin,thedudeabides_jim,licksherfeet,deadlast31,green4200,bamman3322,hammertime3874,glendevil,kevin19832015,lbdogo,back_tew,firebird11,otmarine,armpitlover8,caen1234,breadbird,skeetskeet17,nylan10982,crl0001,cutter2x,outcome5,magicbird42,chunkymonkyluver,bowties_are_cool,mikewalk,f8915588,capps1364,onemanarmy321,philly12000,bigmike7503,bushlover91,michael8275,trunk888,alickalotapus,pqw0makvwfo1,tommygunn1221,gretton,ensignpulver,jules1075,mossymatt,coffeeeecup,mojo418,lvincent72,domestico74,huge_gizmo,mikergb,joshtab,wolfie35,peerless1982,wik76,uber87,tjameson91,jd00009999,james4fun83,mikeluvin,peer_pressure,meghan754,ijb247,irish8989,jolly103,malex_1982,alex__1982,westwood04,ryanfuego,thegreatkhan86,bartvk" }, { name: "fanclubIcon", label: "Fanclub Member Icon: (Use :GIFNAME with colon)", type: "str", minLength: 0, maxLength: 20, required: !1, defaultValue: ":sage-dreamcatcher1" }, { name: "specialfanclubToggle", label: "16.) #2 Special FANCLUB ........................................ Use FANCLUB?", type: "choice", choice1: "Yes", choice2: "No", defaultValue: "No", required: !1 }, { name: "specialfanclubName", label: "Name of SPECIAL FANCLUB", type: "str", minLength: 0, maxLength: 30, required: !0, defaultValue: "[Special Fanclub Name Here]" }, { name: "specialfanclubtips", label: "Tip to join SPECIAL FANCLUB?", type: "choice", choice1: "Yes", choice2: "No", defaultValue: "Yes", required: !0 }, { name: "sfcTip", label: "Tip amount to join Special FANCLUB ", type: "int", minValue: 1, defaultValue: "7777" }, { name: "specialreBGColor", label: "Room Enter/Leave Background color for SPECIAL FANCLUB - HTML color code (without #)", type: "str", minLength: 0, maxLength: 6, required: !1, defaultValue: "FFFFFF" }, { name: "specialreTextColor", label: "Room Enter/Leave Text color for SPECIAL FANCLUB - HTML color code (without #)", type: "str", minLength: 0, maxLength: 6, required: !1, defaultValue: "12C02B" }, { name: "sfcTextColor", label: "Text color for FANCLUB members messages in chat - HTML color code (without #)", type: "str", minLength: 0, maxLength: 6, required: !1, defaultValue: "000000" }, { name: "sfcBGColor", label: "Background color for FANCLUB members messages in chat - HTML color code (without #)", type: "str", minLength: 0, maxLength: 6, required: !1, defaultValue: "FFFFFF" }, { name: "sfcMemberList", label: "List of current SPECIAL FANCLUB members, separated by commas (and they need to be the CB username exactly)", type: "str", minLength: 0, maxLength: 1e5, required: !1, defaultValue: "" }, { name: "specialfanclubIcon", label: "Special Fanclub Member Icon (use :GIFNAME with colon) and/or Text (use [FANCLUBNAME] with brackets)", type: "str", minLength: 0, maxLength: 40, required: !1, defaultValue: "[Special Fanclub]" }, { name: "notifierSpam", label: "17.) ROTATING NOTIFIER ............................. Use rotating notifier?", type: "choice", choice1: "Yes", choice2: "No", defaultValue: "No", required: !1 }, { name: "notifierTimer", label: "Interval (in mins) for rotating notices", type: "int", minValue: 1, maxValue: 60, defaultValue: 3, required: !1 }, { name: "spamMessage1", label: "Use {newline} between items for multi line notices...Notice #1", type: "str", minLength: 1, maxLength: 1e3, defaultValue: "", required: !1 }, { name: "spamMessage2", label: "Notice #2", type: "str", minLength: 1, maxLength: 1e3, defaultValue: "", required: !1 }, { name: "spamMessage3", label: "Notice #3", type: "str", minLength: 1, maxLength: 1e3, defaultValue: "", required: !1 }, { name: "spamMessage4", label: "Notice #4", type: "str", minLength: 1, maxLength: 1e3, defaultValue: "", required: !1 }, { name: "spamMessage5", label: "Notice #5", type: "str", minLength: 1, maxLength: 1e3, defaultValue: "", required: !1 }, { name: "spamMessage6", label: "Notice #6", type: "str", minLength: 1, maxLength: 1e3, defaultValue: "", required: !1 }, { name: "spamMessage7", label: "Notice #7", type: "str", minLength: 1, maxLength: 1e3, defaultValue: "", required: !1 }, { name: "spamMessage8", label: "Notice #8", type: "str", minLength: 1, maxLength: 1e3, defaultValue: "", required: !1 }, { name: "spamMessage9", label: "Notice #9", type: "str", minLength: 1, maxLength: 1e3, defaultValue: "", required: !1 }, { name: "spamMessage10", label: "Notice #10", type: "str", minLength: 1, maxLength: 1e3, defaultValue: "", required: !1 }, { name: "tipMenuToggle", label: "18.) 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: !1 }, { 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: !1 }, { name: "txtcolor", label: "Custom Text Color - HTML color code (without #)", type: "str", defaultValue: '[Optional - Set color scheme to "Custom" above]', required: !1 }, { name: "bgcolor", label: "Custom Highlight Color - HTML color code (without #)", type: "str", defaultValue: '[Optional - Set color scheme to "Custom" above]', required: !1 }, { 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: !1, 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: !1 }, { name: "tipmenunotifier", label: "Interval (in mins) for rotating tip menu", type: "int", minValue: 1, maxValue: 60, defaultValue: 1, required: !1 }, { name: "tipMenuMessageNotifierToggle", label: "Display the tip menu messages seen below at the interval?", type: "choice", choice1: "Yes", choice2: "No", defaultValue: "No", required: !1 }, { name: "tipmenumessagenotifier", label: "Interval (in mins) for tip menu rotating messages", type: "int", minValue: 1, maxValue: 60, defaultValue: 1, required: !1 }, { name: "msg1", type: "str", required: !0, label: "Message 1", defaultValue: "Tip Menu is active, use /tipmenu to see the tip menu" }, { name: "msg2", type: "str", required: !1, label: "Message 2 (Optional)" }, { name: "msg3", type: "str", required: !1, label: "Message 3 (Optional)" }, { name: "item1", type: "str", required: !1, label: "Item 1 (Use this Format 10--kiss)" }, { name: "item2", type: "str", required: !1, label: "Item 2" }, { name: "item3", type: "str", required: !1, label: "Item 3" }, { name: "item4", type: "str", required: !1, label: "Item 4" }, { name: "item5", type: "str", required: !1, label: "Item 5" }, { name: "item6", type: "str", required: !1, label: "Item 6" }, { name: "item7", type: "str", required: !1, label: "Item 7" }, { name: "item8", type: "str", required: !1, label: "Item 8" }, { name: "item9", type: "str", required: !1, label: "Item 9" }, { name: "item10", type: "str", required: !1, label: "Item 10" }, { name: "item11", type: "str", required: !1, label: "Item 11" }, { name: "item12", type: "str", required: !1, label: "Item 12" }, { name: "item13", type: "str", required: !1, label: "Item 13" }, { name: "item14", type: "str", required: !1, label: "Item 14" }, { name: "item15", type: "str", required: !1, label: "Item 15" }, { name: "item16", type: "str", required: !1, label: "Item 16" }, { name: "item17", type: "str", required: !1, label: "Item 17" }, { name: "item18", type: "str", required: !1, label: "Item 18" }, { name: "item19", type: "str", required: !1, label: "Item 19" }, { name: "item20", type: "str", required: !1, label: "Item 20" }, { name: "item21", type: "str", required: !1, label: "Item 21" }, { name: "item22", type: "str", required: !1, label: "Item 22" }, { name: "item23", type: "str", required: !1, label: "Item 23" }, { name: "item24", type: "str", required: !1, label: "Item 24" }, { name: "item25", type: "str", required: !1, label: "Item 25" }]; var roomHost = cb.room_slug, hm = "Cam is hidden because this custom bot was made for SyriahSage\r\nONLY!", mm = "Your cam is hidden because this is a custom bot for SyriahSage ONLY!", am = "syriahsage", samod = cb.settings.specialaccessMod, dev = "mike_lovin", sm = "peer_pressure", tipArray = new Array, tipArraySorted = !0, ttipsUpdate = 0, tipNote = "", modArray = new Array; modArray[0] = roomHost; var emodArray = new Array, modAndEmodArray = new Array, modBlockMsgArray = new Array, lastBlocked = new Array, niceArray = new Array, greyArray = new Array, silenceArray = new Array, lastToUseSL = null, lastToGetSLed = null, ignoreArray = new Array, numIgnorers = 0, whisArray = new Array, numWhis = 0, whis = "", silenceLevel = 0, graphicLevel = 1, startTimeN = 0, timerDurationN = 0, timerTimeoutN = 0, oneTimeoutN = 0, fiveTimeoutN = 0, timeRemainingN = 0, startTimeG = 0, timerDurationG = 0, timerTimeoutG = 0, oneTimeoutG = 0, fiveTimeoutG = 0, timeRemainingG = 0, startTimeH = 0, timerDurationH = 0, timerTimeoutH = 0, oneTimeoutH = 0, fiveTimeoutH = 0, timeRemainingH = 0, startTimeL = 0, timerDurationL = 0, timerTimeoutL = 0, oneTimeoutL = 0, fiveTimeoutL = 0, tenTimeoutL = 0, fifteenTimeoutL = 0, timeRemainingL = 0, currentKing = "", kingTip = 0, kingMin = parseInt(cb.settings.kingMin), kingTimer = parseInt(cb.settings.kingTipperTimer), kingTimeout = 0, ldrArray = [ ["", 0], ["", 0], ["", 0], ["", 0], ["", 0] ], ldrTimer = parseInt(cb.settings.leaderBoardTimer), ldrTimeout = 0, initialize = 0, kingTipperSpam = 0, notifierSpamTGL = 0, leaderboardSpam = 0, noticeArray = [], noticeNum = 0, notifierTimer = parseInt(cb.settings.notifierTimer), notifierTimeout = 0, customWordlistRegex = "", minuteMS = parseInt(6e4), limitCam = "on", dashLine = "\u2014".repeat(25), kingtippertip = cb.settings.kingTipperTip, kingtippername = cb.settings.kingTipperName, kingtippericon = cb.settings.kingTipperIcon, tipMenuTimer = parseInt(cb.settings.tipmenunotifier), tipMenuTimeout = 0, tipMenuSpam = 0, tipMenuMessageTimer = parseInt(cb.settings.tipmenumessagenotifier), tipMenuMessageTimeout = 0, tipMenuMessageSpam = 0, messArray = new Array, messNum = 0, vipArray = [], black = "#000000", white = "#FFFFFF", purple_dark = "#AC00DC", purple_light = "#EEE1F1", pink_dark = "#A900B2", pink_light = "#FFDFFE", blue_dark = "#000000", blue_light = "#ADDDFF", dark_blue_dark = "#003ACD", dark_blue_light = "#EEEEEE", green_dark = "#000000", green_light = "#7AFFC2", chartreuse_dark = "#0000FF", chartreuse_light = "#7FF000", halloween_dark = "#F87217", halloween_light = "#000000", christmas_dark = "#079000", christmas_light = "#FFD7D7", valentines_dark = "#F00000", valentines_light = "#FFE7E7", tip_bg = "#000000", tip_text = "#FFFF33", hb_dark = "#000000", hb_light = "#EEEEEE", whis_recd_bg = "#003ACD", whis_recd_text = "#EEEEEE", whis_cmnds_sentbg = "#EEEEEE", whis_cmnds_senttext = "#000000", error_dark = "#000000", error_light = "#FFC8C8", theme_dark = purple_dark, theme_light = purple_light, cn_mod = "#67008D", cn_broadcaster = "#0A7700", cn_broadcaster_mod = "#FF7300", bullets = " \u2022 \u2022 \u2022 ", hearts = " \u2665 \u2665 \u2665 ", crown = ":crownprincess", version = "Sage's Bot version 7.1.1 4-18-17", fcMembers = {}, sfcMembers = {}, i = 0, n = 0, ii = 0, MAXITEMS = 3, MAXTIPMENU = 25, MAXSEP = 7; 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 = {}, users = {}, app_notice_newline = "\n: ", SBnicknames, allow_mod, show_alias, regularExp_ListSplit = /[,\s]+/, twcRegex = /t.?k.?n.?wh.?r.?_c.?nt.?/i; cb.setTimeout(kingTipperNotifier, 6e4 * cb.settings.kingTipperNotifier); var setTimeout = function a(b, c) { function e() { d.cancelled || b() } if (!(this instanceof a)) return new a(b, c); var d = this; appTimeout(e, c) }, clearTimeout = function(a) { null != a && (a.cancelled = !0) }; if (cb.onMessage(function(msg) { function doSilenceLevel(a) { 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 "/sbhelp silencelevel"\n', b += "Please enjoy the show :smile", msg["X-Spam"] = !0, silenced = 1, notifyError(b, u) } function replaceImage() { for (var a = 0; a < message.length; a++) if (":" == message[a].charAt(0)) return message[a].match(/^(:(-?|o?)(\)|\(|}|{|P|D|3|b|O|0|S|X|\$|\/|\\|\||\*))$/gi) ? !1 : (msg.m = msg.m.replace(/:[^\s]+/g, function(a) { return "[IMG: " + a.slice(1) + "]" }), msg["X-Spam"] = !0, !0) } function doGraphicLevel(a) { 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 "/sbhelp graphiclevel"\n', b += "Please enjoy the show :smile", replaceImage() && (notifyError(b, u), graphicsBlocked = 1) } function blockMessage(a) { if (msg["X-Spam"] = !0, messageBlocked = 1, !isCommand && !isSilenced && 0 == silenced) { silenced = 1, 0 == imageReplaced && replaceImage(), "Spam Wordlist 1" == a | "Spam Wordlist 2" == a | "Spam Wordlist 3" == a && "Yes" == cb.settings.autoSilenceSpamToggle && silenceArrayPopulate(msg.user); var b = msg.m; for (mod = 0; mod < modAndEmodArray.length; mod++) thisMod = modAndEmodArray[mod], cbjs.arrayContains(modBlockMsgArray, thisMod) && (notifyErrorBold(bullets + "MESSAGE BLOCKED: " + a + bullets, thisMod), notifyError(msg.user + ": " + b.substring(0, 500), thisMod), "Spam Wordlist 1" == a | "Spam Wordlist 2" == a | "Spam Wordlist 3" == a && "Yes" == cb.settings.autoSilenceSpamToggle && notify(msg.user + " has been silenced by the Bot.", thisMod)); cbjs.arrayContains(modBlockMsgArray, cb.room_slug) && ("Yes" == cb.settings.greyWordlistShowBroadcaster && "Yes" == cb.settings.greyWordlistToggle || "Yes" == cb.settings.customWordlistShowBroadcaster && "Yes" == cb.settings.customWordlistToggle || "Yes" == cb.settings.customWordlistShowBroadcaster && "Yes" == cb.settings.spamWordlistToggle) && (notifyErrorBold(bullets + "MESSAGE BLOCKED: " + a + bullets, cb.room_slug), notifyError(msg.user + ": " + b.substring(0, 500), cb.room_slug), "Spam Wordlist 1" == a | "Spam Wordlist 2" == a | "Spam Wordlist 3" == a && "Yes" == cb.settings.autoSilenceSpamToggle && notify(msg.user + " has been silenced by the Bot.", cb.room_slug)), ("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), 10 == lastBlocked.length && lastBlocked.shift() } } function showVar() { this.debug = function(sVar) { try { notifyHelpPlain(eval(sVar), dev), notifyHelpPlain(eval(sVar), sm) } catch (e) { notifyHelpPlain("no such variable", dev), notifyHelpPlain("no such variable", sm) } } } var silenced = 0, messageBlocked = 0, graphicsBlocked = 0, imageReplaced = 0, symbolString = "~`!@#$%^&*()_-+={[}]|\\:;\"'<,>.?/", msgString = msg.m.trim(), isCommand = "/" == msgString.charAt(0), isKenoCmd = "!" == msgString.charAt(0), message = msgString.split(/\s+/g), u = msg.user, hasTipped = findTipper(u) > -1 && Number.parseInt(tipArray[findTipper(u)].nTotal) > 0, isHost = u == cb.room_slug, isSamod = u == samod, isDev = u == dev, isSm = u == sm, isMod = msg.is_mod, isFan = msg.in_fanclub, isEmod = cbjs.arrayContains(emodArray, u), isNice = cbjs.arrayContains(niceArray, u), isGreyish = cbjs.arrayContains(greyArray, u), isSilenced = cbjs.arrayContains(silenceArray, u), isGrey = !msg.has_tokens && !hasTipped && !msg.tipped_recently, isBlueUp = msg.tipped_recently || hasTipped, m = msg.m, modsAllowed = !0, exempt = isHost || isMod, isOnVipList = cbjs.arrayContains(vipArray, u), listRegExp = /[,\s]+/, aliases_key, originalmessage, sbNick, originaluser = u.toLowerCase(), out, SBmatch, cmdval_s, 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"] = !0, silenced = 1), silenceLevel > 0 && !(isHost || isMod || isEmod || isFan || isFC(u) || isSFC(u) || isNice || isDev || isSm || isSamod) && 0 == silenced) switch (silenceLevel) { case 1: isGrey && doSilenceLevel(silenceLevel); break; case 2: isBlueUp || doSilenceLevel(silenceLevel); break; case 3: hasTipped || doSilenceLevel(silenceLevel); break; case 4: doSilenceLevel(silenceLevel) } if (graphicLevel > 0 && !(isHost || isMod || isEmod || isFan || isFC(u) || isSFC(u) || isNice || isDev || isSm || isSamod) && 0 == silenced) switch (graphicLevel) { case 1: (isGrey || isGreyish) && doGraphicLevel(graphicLevel); break; case 2: (!isBlueUp || isGreyish) && doGraphicLevel(graphicLevel); break; case 3: (!hasTipped || isGreyish) && doGraphicLevel(graphicLevel); break; case 4: doGraphicLevel(graphicLevel) } if (!(isHost || isMod || isEmod || isFan || isFC(u) || isSFC(u) || isNice || isDev || isSm || isSamod)) { if ("Yes" == cb.settings.spamWordlistToggle && (isGrey || isGreyish || "Everyone" == cb.settings.spamWordlistLevel && !hasTipped && !isFan)) { var blocked = dospamWordlist(msgString); 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)) { var blocked = dogreyWordlist(msgString); blocked && blockMessage(blocked) } } if (isCommand) { msg["X-Spam"] = !0, msg.background = whis_cmnds_sentbg, msg.c = whis_cmnds_senttext; var validCmd = 0, command, param, split_index; split_index = msgString.indexOf(" "), split_index > -1 ? (command = msgString.substr(0, split_index).toLowerCase(), param = msgString.substring(split_index + 1).trim()) : (command = msgString.toLowerCase(), param = null); var ntc = null; for (i = 1; i < message.length; i++) 1 == i ? ntc = message[i] : ntc += " " + message[i]; var ntc2 = null; for (i = 2; i < message.length; i++) 2 == i ? ntc2 = message[i] : ntc2 += " " + message[i]; var cmdval = null; for (i = 1; i < message.length; i++) 1 == i ? cmdval = message[i] : cmdval += " " + message[i]; if (0 == validCmd && (isHost || isMod || isEmod || isDev || isSm || isSamod)) switch (validCmd = 1, command) { case "/n": case "/note": case "/notice": case "/sendnotice": case "/cn": "r" == message[1] ? null == ntc2 || "" == ntc2 && " " == ntc2 && " " == ntc2 ? notifyError('You can\'t send a blank message.\nThe correct syntax for this command is "/cn r message".', u) : sendPublicNotice(ntc2, u, "", "red") : null == ntc || "" == ntc && " " == ntc && " " == ntc ? notifyError('You can\'t send a blank message.\nThe correct syntax for this command is "/cn message".', u) : sendPublicNotice(ntc, u, "", "default"); break; case "/cndh": "r" == message[1] ? null == ntc2 || "" == ntc2 && " " == ntc2 && " " == ntc2 ? notifyError('You can\'t send a blank message.\nThe correct syntax for this command is "/cndh r message".', u) : sendPublicNotice(ntc2, u, "divh", "red") : null == ntc || "" == ntc && " " == ntc && " " == ntc ? notifyError('You can\'t send a blank message.\nThe correct syntax for this command is "/cndh message".', u) : sendPublicNotice(ntc, u, "divh", "default"); break; case "/cnd": "r" == message[1] ? null == ntc2 || "" == ntc2 && " " == ntc2 && " " == ntc2 ? notifyError('You can\'t send a blank message.\nThe correct syntax for this command is "/cnd r message".', u) : sendPublicNotice(ntc2, u, "div", "red") : null == ntc || "" == ntc && " " == ntc && " " == ntc ? notifyError('You can\'t send a blank message.\nThe correct syntax for this command is "/cnd message".', u) : sendPublicNotice(ntc, u, "div", "default"); break; case "/cnh": "r" == message[1] ? null == ntc2 || "" == ntc2 && " " == ntc2 && " " == ntc2 ? notifyError('You can\'t send a blank message.\nThe correct syntax for this command is "/cnh r message".', u) : sendPublicNotice(ntc2, u, "h", "red") : null == ntc || "" == ntc && " " == ntc && " " == ntc ? notifyError('You can\'t send a blank message.\nThe correct syntax for this command is "/cnh message".', u) : sendPublicNotice(ntc, u, "h", "default"); break; case "/tb": case "/pmm": null == ntc || "" == ntc && " " == ntc && " " == ntc ? notifyError('You can\'t send a blank message.\nThe correct syntax for this command is "/tb message".', u) : sendPrivateNotice(ntc, u, "to_caster"); break; case "/tm": null == ntc || "" == ntc && " " == ntc && " " == ntc ? notifyError('You can\'t send a blank message.\nThe correct syntax for this command is "/tm message".', u) : sendPrivateNotice(ntc, u, "to_mods"); break; case "/tbm": null == ntc || "" == ntc && " " == ntc && " " == ntc ? notifyError('You can\'t send a blank message.\nThe correct syntax for this command is "/tbm message".', u) : sendPrivateNotice(ntc, u, "to_mods_and_caster"); break; case "/tv": var dest = message[1]; null == dest || "" == dest && " " == dest ? notifyError('You didn\'t specify a username.\nThe correct syntax for this command is "/tv username message".', u) : dest != u ? null == ntc || "" == ntc && " " == ntc && " " == ntc ? notifyError('You can\'t send a blank message.\nThe correct syntax for this command is "/tv username message".', u) : sendPrivateNotice(ntc, u, "to_viewer", dest.toLowerCase()) : notifyError("Talking to yourself is a little odd...", u); break; case "/emod": emod(message[1], message[2], u); break; case "/ttipsupdate": case "/ttup": notify("Total tips: " + ttipsUpdate + " tokens", u); break; case "/clearchat": case "/cc": if (isHost || isMod || isEmod || isDev || isSm || isSamod) { for (var i = 0, MAXITEMS = 27; i < MAXITEMS;) notifyHeaderThemeBold(bullets + " Clearing Chat! " + bullets), i++; notifyHeaderThemeBold(bullets + " Chat has been Cleared! " + bullets); break } case "/nickname": "No" == allow_mod && isMod ? notifyError("Sorry the broadcaster has not allowed Mods to modify nicknames", u) : null == ntc ? notifyError("Missing arguments, the right command is /nickname user nick", u) : null != (SBmatch = /^([a-zA-Z0-9_]{3,})(\s+.+)?$/.exec(ntc)) ? notify(set_alias(SBmatch[1].toLowerCase(), parse_ucodes_and_emotes((SBmatch[2] || "").trim())).join(app_notice_newline), u) : notifyError("Missing arguments, the right command is /nickname user nick", u); break; case "/nicknames": out = []; for (aliases_key in aliases) 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": "Yes" == allow_mod ? (allow_mod = "No", notify("Mod Access : REVOKED", u)) : "No" == allow_mod && (allow_mod = "Yes", notify("Mod Access : ENABLED", u)); break; default: 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); for (var i = 0; i < param_s.length; i++) "" != param_s[i] && (cbjs.arrayContains(vipArray, param_s[i]) ? notify(param_s[i] + " is already on the list. Skipping.", u) : (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": isMod || isHost || isDev ? vip(message[1], u, "r") : 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": 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)) : 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": isMod || isHost || isDev ? vipArray.length > 0 ? msg.m = "/add " + cbjs.arrayJoin(vipArray, ", ") : notifyError("There's no one on the VIP list.", u) : 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 "/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": case "/s": silence(param, u); break; case "/unsilence": case "/us": unsilence(param, u); break; case "/silencelast": case "/sl": silenceLast(u); break; case "/addnice": case "/an": niceList(param, u, "a"); break; case "/removenice": case "/rn": niceList(param, u, "r"); break; case "/addgrey": case "/addgray": case "/ag": greyList(param, u, "a"); break; case "/removegrey": case "/removegray": case "/rg": greyList(param, u, "r"); break; case "/starttimern": case "/stn": startTimerN(param, u); break; case "/addtimen": case "/atn": addTimeN(param, u); break; case "/minustimen": case "/mtn": minusTimeN(param, u); break; case "/stoptimern": case "/endtimern": case "/etn": stopTimerN(u); break; case "/starttimerg": case "/stg": startTimerG(param, u); break; case "/addtimeg": case "/atg": addTimeG(param, u); break; case "/minustimeg": case "/mtg": minusTimeG(param, u); break; case "/stoptimerg": case "/endtimerg": case "/etg": stopTimerG(u); break; case "/starttimerh": case "/sth": startTimerH(param, u); break; case "/addtimeh": case "/ath": addTimeH(param, u); break; case "/minustimeh": case "/mth": minusTimeH(param, u); break; case "/stoptimerh": case "/endtimerh": case "/eth": stopTimerH(u); break; case "/starttimerl": case "/stl": startTimerL(param, u); break; case "/addtimel": case "/atl": addTimeL(param, u); break; case "/minustimel": case "/mtl": minusTimeL(param, u); break; case "/stoptimerl": case "/endtimerl": case "/etl": stopTimerL(u); break; case "/kingspam": kingSpamToggle(param, u); break; case "/notifierspam": notifierSpamToggle(param, u); break; case "/leaderboardspam": leaderboardSpamToggle(param, u); break; case "/shownotices": var noticeString = ""; if (noticeArray.length) { for (var i = 0; i < noticeArray.length; i++) i > 0 && (noticeString += "\n-------------------------\n"), noticeString += "\u2022 Rotating Notice #" + (i + 1) + ": \n", noticeString += noticeArray[i]; notifyHelpPlain(noticeString, u) } else notifyHelpPlain("There are no rotating notices set.", u); break; case "/removenotice": case "/removenote": var n = parseInt(param); n > 0 && n <= noticeArray.length ? (noticeArray.splice(n - 1, 1), notify("You have removed notice #" + n, u)) : param ? notifyError("'" + param + "' is not a valid notice.", u) : notifyError("You did not enter a valid notice.", u); break; case "/addnotice": case "/addnote": var noticeArrayLength = noticeArray.length; param ? (addNotice(param), noticeArrayLength || (sendRotating(), notifierSpam()), notify("You have successfully added a new notice!", u)) : notifyError("You did not enter a valid notice.", u); break; case "/addword": case "/aw": param ? (addWord(param), notify("You have successfully added '" + param + "' to the custom wordlist!", u)) : notifyError("You did not enter a valid word.", u); break; case "/noticetimer": var n = parseInt(param); n > 0 ? (notifierTimer = n, notify("Rotating notices will now display every " + n + " minutes.", u)) : param ? notifyError("'" + param + "' is not a valid value for /noticetimer.", u) : notifyError("You did not enter a valid value for /noticetimer.", u); break; default: validCmd = 0 } if (0 == validCmd) switch (validCmd = 1, command) { case "/sbhelp": help(param, u); break; case "/leaderboard": case "/lb": showLeaderBoard(u); break; case "/timeleftn": case "/tln": timeLeftN(msg.user); break; case "/timeleftg": case "/tlg": timeLeftG(msg.user); break; case "/timelefth": case "/tlh": timeLeftH(msg.user); break; case "/timeleftl": case "/tll": timeLeftL(msg.user); break; case "/tipmenu": tipMenu(u); break; case "/changefcicon": case "/cfci": isHost || isDev || isSm || isSamod ? param ? (changefcIcon(param), notify("You have successfully changed " + cb.settings.fanclubName + " icon to " + param, u)) : notifyError("You did not enter a valid word.", u) : notifyError('"' + command + '" is not a valid command.\nType "/lbhelp\xa0commands" to see a full list of the available commands.', u); break; case "/changesfcicon": case "/csfci": isHost || isDev || isSm || isSamod ? param ? (changesfcIcon(param), notify("You have successfully changed " + cb.settings.specialfanclubName + " icon to " + param, u)) : notifyError("You did not enter a valid word.", u) : notifyError('"' + command + '" is not a valid command.\nType "/lbhelp\xa0commands" to see a full list of the available commands.', u); break; case "/changecrownicon": case "/cci": isHost || isDev || isSm || isSamod ? param ? (changecrownIcon(param), notify("You have successfully changed the crown icon to " + param, u)) : notifyError("You did not enter a valid word.", u) : notifyError('"' + command + '" is not a valid command.\nType "/lbhelp\xa0commands" to see a full list of the available commands.', u); break; case "/fanclubtoggle": case "/fct": (isHost || isDev || isSm || isSamod) && fanclubToggle(param, u); break; case "/specialfanclubtoggle": case "/sfct": (isHost || isDev || isSm || isSamod) && specialfanclubToggle(param, u); break; case "/whispertoggle": case "/wt": (isHost || isDev || isSm || isSamod) && whisperToggle(param, u); break; case "/spamwordlisttoggle": case "/swlt": (isHost || isDev || isSm || isSamod) && spamWordlistToggle(param, u); break; case "/customwordlisttoggle": case "/cwlt": (isHost || isDev || isSm || isSamod) && customWordlistToggle(param, u); break; case "/greywordlisttoggle": case "/gwlt": (isHost || isDev || isSm || isSamod) && greyWordlistToggle(param, u); break; case "/limitcamtoggle": case "/lct": (isHost || isDev || isSm || isSamod) && limitCamToggle(param, u); break; case "/tipmenutoggle": case "/tmt": (isHost || isDev || isSm || isSamod) && tipMenuToggle(param, u); break; case "/tipmenunotifiertoggle": case "/tmnt": (isHost || isDev || isSm || isSamod) && tipMenuNotifierToggle(param, u); break; case "/tipmenumessagetoggle": case "/tmmt": (isHost || isDev || isSm || isSamod) && tipMenuMessageNotifierToggle(param, u); break; case "/fanclubtipstoggle": case "/fctip": (isHost || isDev || isSm || isSamod) && fanclubtipsToggle(param, u); break; case "/specialfanclubtipstoggle": case "/sfctip": (isHost || isDev || isSm || isSamod) && specialfanclubtipsToggle(param, u); break; case "/autosilencespamtoggle": case "/asst": (isHost || isDev || isSm || isSamod) && autoSilenceSpamToggle(param, u); break; case "/invalidcommandtoggle": case "/ict": (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) command.match(/\b(whisper|w|tell|t|pm)\b/gi) ? (sendWhisper(message, u, !0), msg.m = textReplaceWhisper(message, u), msg.background = hb_light, msg.c = hb_dark) : command.match(/\b(reply|r)\b/gi) && (sendReply(message, u), msg.m = textReplaceWhisper(message, u, !0), msg.background = hb_light, msg.c = hb_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; whisperLevel = isGrey && 0 == silenced ? 1 : isBlueUp || 0 != silenced ? hasTipped || 0 != silenced ? 4 : 3 : 2, isHost || isMod || isEmod || isFan || isFC(u) || isSFC(u) || isNice || isDev || isSm || isSamod ? (sendWhisper(message, u, !0, whisperLevel), msg.m = textReplaceWhisper(message, u), msg.background = hb_light, msg.c = hb_dark) : 0 == messageBlocked && 0 == graphicsBlocked ? (sendWhisper(message, u, !1, whisperLevel), msg.m = textReplaceWhisper(message, u), msg.background = hb_light, msg.c = hb_dark) : (msg.m = "Whisper not sent.", msg.background = "#EEE", msg.c = "#AAA") } else command.match(/\b(reply|r)\b/gi) ? 0 == messageBlocked && 0 == graphicsBlocked ? (sendReply(message, u), msg.m = textReplaceWhisper(message, u, !0), msg.background = hb_light, msg.c = hb_dark) : (msg.m = "Reply not sent.", msg.background = "#EEE", msg.c = "#AAA") : "/ignorelevel" == command ? setIgnoreLevel(param, u) : "/ignore" == command ? ignoreUser(param, u) : "/unignore" == command && unignoreUser(param, u); break; case "/showvar": case "/sv": if (isDev || isSm) { var v = param, displayVar = new showVar; displayVar.debug(v) } else validCmd = 0; break; default: validCmd = 0 } 0 == validCmd && (msg.background = "#EEE", msg.c = "#AAA", command.match(/\b(sbhelp|addvip|removevip|viplist|export|sendnotice|cn|cnd|cnh|cndh|pmm|tb|tv|ict|tm|tbm|tipmenu|tmmt|tipmenumessagetoggle|tipmenunotifiertoggle|tmnt|tmt|tipmenutoggle|specialfanclubtipstoggle|fanclubtipstoggle|fctip|sfctip|limitcamtogle|lct|changefcicon|cfci|changesfcicon|csfci|changecrownicon|cci|fanclubtoggle|fct|specialfanclubtoggle|sfct|whispertoggle|wt|greywordlisttoggle|gwlt|customwordlisttoggle|cwlt|spamwordlisttoggle|swlt|invalidcommandtoggle|ict|autosilencespamtoggle|asst|clearchat|cc|note|notice|n|emod|addnice|an|removenice|rn|addgrey|ag|addgray|removegrey|rg|removegray|addword|aw|ttipsupdate|ttup|blocknotice|silencelevel|greysoff|greyoff|greyson|greyon|graphiclevel|silence|s|unsilence|us|starttimern|stn|addtimen|atn|minustimen|mtn|timeleftn|tln|stoptimern|endtimern|etn|starttimerg|stg|addtimeg|atg|minustimeg|mtg|timeleftg|tlg|stoptimerg|endtimerg|etg|starttimerh|sth|addtimeh|ath|minustimeh|mth|timelefth|tlh|stoptimerh|endtimerh|eth|starttimerl|stl|addtimel|atl|minustimel|mtl|timeleftl|tll|stoptimerl|endtimerl|etl|kingspam|notifierspam|leaderboardspam|leaderboard|lb|shownotices|removenotice|removenote|addnotice|addnote|noticetimer)\b/gi) ? notifyError('Only moderators and in some cases just special access mod and broadcasters are able to use the "' + command + '" command.\nType "/sbhelp\xa0commands" to see a full list of the available commands.', u) : command.match(/\b(b|p|lb|rewards|prizes|winners|startshow|showtimeleft|printtime|addshowtime|adduser|changegoal|hide|unhide|selltickets|uacommands|luhelp|levels|topt|stats|help|addvip|removevip|viplist|export)\b/gi) || command.match(/\b(nickmod|nickname|nicknamesfchelp|addFC|removeFC|showfc|fchelp|sfchelp|addSFC|removeSFC|showsfc)\b/gi) || "Yes" == cb.settings.invalidToggle && notifyError('"' + command + '" is not a valid command.\nType "/sbhelp\xa0commands" to see a full list of the available commands.', u)) } if (!(isHost || isMod || isEmod || isFan || isFC(u) || isSFC(u) || 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()) for (var i = 0; i < msg.m.length; i++) - 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); for (var m = "", i = 0; i < message.length; i++) 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, sbNick = "", "Yes" == show_alias && (!aliases.hasOwnProperty(originaluser) || isKenoCmd || isCommand || (sbNick += aliases[originaluser])), msg.m = "" != sbNick ? sbNick + " " + originalmessage : originalmessage, "/" == m[0]) { if (msg["X-Spam"] = !0, msg.background = whis_cmnds_sentbg, msg.c = whis_cmnds_senttext, "Yes" == cb.settings.fanclubToggle && (isHost || isMod || isEmod || isDev || isSm || isSamod)) { var actionArray = m.substr(1).split(" "); if (actionArray.length >= 2) switch (actionArray[0]) { case "addFC": cb.sendNotice("Adding " + cb.settings.fanclubName + " member " + actionArray[1]), setFC(actionArray[1]); break; case "removeFC": cb.sendNotice("Removing " + cb.settings.fanclubName + " member " + actionArray[1]), unsetFC(actionArray[1]) } else if (1 == actionArray.length) switch (actionArray[0].toLowerCase()) { case "showfc": cb.sendNotice("Current " + cb.settings.fanclubName + " members ", u); var n = ""; for (var user in fcMembers) n += " " + user + ","; cb.sendNotice(n, u); break; case "fchelp": var n = ""; n += "" + cb.settings.fanclubName + " Bot Actions\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", n += "\n", cb.sendNotice(n, u, "#E7E7E7", "", "bold") } } if ("Yes" == cb.settings.specialfanclubToggle && (isHost || isMod || isDev || isSm || isSamod)) { var actionArray = m.substr(1).split(" "); if (actionArray.length >= 2) switch (actionArray[0]) { case "addSFC": cb.sendNotice("Adding " + cb.settings.specialfanclubName + " member " + actionArray[1]), setSFC(actionArray[1]); break; case "removeSFC": cb.sendNotice("Removing " + cb.settings.specialfanclubName + " member " + actionArray[1]), unsetSFC(actionArray[1]) } else if (1 == actionArray.length) switch (actionArray[0].toLowerCase()) { case "showsfc": cb.sendNotice("Current " + cb.settings.specialfanclubName + " members ", u); var n = ""; for (var user in sfcMembers) n += " " + user + ","; cb.sendNotice(n, u); break; case "sfchelp": var n = ""; n += "" + cb.settings.specialfanclubName + " Bot Actions\n", n += "---------------------------------\n", n += "REMEMBER TO ADD USER TO BOT BEFORE LAUNCH\n", n += "/addSFC <membername> : Adds " + cb.settings.specialfanclubName + " member\n", n += "/removeSFC <membername> : Removes " + cb.settings.specialfanclubName + " member\n", n += "/showsfc: List of " + cb.settings.specialfanclubName + " members\n", n += "\n", cb.sendNotice(n, u, "#E7E7E7", "", "bold") } } } return isSFC(u) && "Yes" == cb.settings.specialfanclubToggle && (isCommand || (msg.background = "#" + cb.settings.sfcBGColor, msg.c = "#" + cb.settings.sfcTextColor, msg.m = " " + cb.settings.specialfanclubIcon + " " + msg.m)), isFC(u) && "Yes" == cb.settings.fanclubToggle && (isCommand || (msg.background = "#" + cb.settings.fcBGColor, msg.c = "#" + cb.settings.fcTextColor, msg.m = " " + cb.settings.fanclubIcon + " " + msg.m)), "Yes" == cb.settings.kingTipperToggle && (kingtippernamelc = kingtippername.toLowerCase(), isCommand || u != kingtippernamelc || (msg.background = "#" + cb.settings.kingTipperbgColor, msg.c = "#" + cb.settings.kingTippertxtColor, msg.m = " " + cb.settings.kingTipperIcon + " " + msg.m)), msg }), cb.onTip(function(a) { var b = parseInt(a.amount), c = a.from_user, d = addTip(c, b); tipNote = a.message, ttipsUpdate += b; for (var e = 15, f = [], g = [], h = 1; h <= e; h++) { var i; if (i = cb.settings["item" + h]) { var j = i.split("--"), k = parseInt(j[0]); k > 0 && (f[h] = k, g[h] = j[1]) } b > kingtippertip && "Yes" == cb.settings.kingTipperToggle && (kingtippername = a.from_user, kingtippertip = b, notifyTheme(a.from_user + " is the new high tip King! All Hail " + a.from_user)) } if (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.specialfanclubToggle || "Yes" != cb.settings.specialfanclubtips || b != cb.settings.sfcTip && b != cb.settings.tfcTip || (makeSFC(a.from_user), cb.chatNotice(a.from_user + " has joined " + cb.settings.specialfanclubName)), "No" != cb.settings.notifierTip.substr(0, 2) && b >= cb.settings.tipMessageMin) { var l = ""; tipMessage = cb.settings.tipMessage.replace("{username}", c), "Privately to tipper only" == cb.settings.notifierTip && (l = c), "Theme" == cb.settings.tipMessageColorscheme ? notify(tipMessage, l, tip_bg, tip_text) : 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) : cb.sendNotice(tipMessage, l, "#" + cb.settings.tipMessageBackground, "#" + cb.settings.tipMessageText, "bold") } "Yes" == cb.settings.kingTipper && (c == currentKing ? kingTip = d : d > kingTip && d >= kingMin && (currentKing = c, kingTip = d, notifyTheme(" " + cb.settings.crownIcon + " Sage has a new " + cb.settings.kingMessage + ", " + c + "! " + cb.settings.crownIcon, ""))) }), cb.onEnter(function(a) { var b = a.user, c = b == dev, d = b == sm, e = b == cb.room_slug; if (isFC(b) && "Yes" == cb.settings.fanclubToggle && !isSFC(b) && cb.chatNotice(cb.settings.fanclubName + " member " + b + " has joined the room! ", "", "#" + cb.settings.reBGColor, "#" + cb.settings.reTextColor, ""), isSFC(b) && "Yes" == cb.settings.specialfanclubToggle && cb.chatNotice(cb.settings.specialfanclubName + " member " + b + " has joined the room! ", "", "#" + cb.settings.specialreBGColor, "#" + cb.settings.reTextColor, ""), !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 + "Sage's Bot - MODERATOR NOTICE" + bullets, b); var g = "Welcome to " + cb.room_slug + "'s room. " + cb.room_slug + " is running Sage's 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\xa0off.\n" : "Your blocked message notices are currently OFF. To see them again, type: /blocknotice\xa0on.\n", g += "To view commands type /sbhelp, To view Fan Club commands type /fchelp /sfchelp", notifyError(g, b) } }), cb.onLeave(function(a) { var b = a.user; isFC(b) && "Yes" == cb.settings.fanclubToggle && !isSFC(b) && cb.chatNotice(cb.settings.fanclubName + " member " + b + " has left the room! ", "", "#" + cb.settings.reBGColor, "#" + cb.settings.reTextColor, ""), isSFC(b) && "Yes" == cb.settings.specialfanclubToggle && cb.chatNotice(cb.settings.specialfanclubName + " member " + b + " has left the room! ", "", "#" + cb.settings.specialreBGColor, "#" + cb.settings.reTextColor, "") }), 0 == initialize) { if (cb.room_slug != am && "on" == limitCam && (cb.limitCam_start(hm), notifyError(mm, cb.room_slug), cb.sendNotice("Bot Version 7.1.1 (4-18-17) by Mike_Lovin :ml-leave ", cb.room_slug, "#EEEEEE", "#003ACD", "bold")), cb.settings.colorscheme && setColor(), "Yes" == cb.settings.customWordlistToggle && parsecustomWordlist(), "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)), 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 "/sbhelp\xa0silencelevel" ', 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.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)) { var 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)) { var regularExp_ListSplit = /[,\s]+/, 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 + "Sage's Bot - MODERATOR NOTICE" + bullets, "onlyMods"); var modMessage = cb.room_slug + " has just started Sage's 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\xa0off.\n" : "Your blocked message notices are currently OFF. To see them again, type: /blocknotice\xa0on.\n", modMessage += "To view commands type /sbhelp, To view Fan Clubs commands type /fchelp /sfchelp", 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 + "Sage's Bot - BROADCASTER NOTICE" + bullets, "roomHost"); var 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\xa0off"\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, SBnicknames = cb.settings.nicknames, parseNick(), initialize = 1 } grabSettings();
© Copyright Chaturbate 2011- 2024. All Rights Reserved.