Apps Home
|
Create an App
all-in-one-2048
Author:
sguy5050test
Description
Source Code
Launch App
Current Users
Created by:
Sguy5050test
/* ourHardWorkByTheseWordsGuardedPleaseDoSteal * Extracted from All In One Bot by lund0894. * Cloudflare compatibility & additional changes by Chris0x2048 */ function parseNick() { var aHash; var i; var valsLength; var codeSegments; aHash = (BBnicknames || "").split(/[,]+/); i = 0; valsLength = aHash.length; for (;i < valsLength;i++) { codeSegments = aHash[i].split("@"); if (2 == codeSegments.length && (codeSegments[0].length && codeSegments[1].length)) { set_alias(codeSegments[0].toLowerCase().trim(), parse_ucodes_and_emotes(codeSegments[1])).join(", "); } else { notifyError("Error: malformed alias record (user@alias): " + aHash[i], cb.room_slug); } } } /** * @param {string} key * @param {string} name * @return {?} */ function set_alias(key, name) { var eventPath = []; return name.length ? (users.hasOwnProperty(name), key.length && (eventPath.push(key + "\u0027s alias \u0022" + name + "\u0022 added."), aliases[key] = name, users[name] = key)) : key.length && aliases.hasOwnProperty(key), eventPath; } /** * @param {string} value * @return {?} */ function parse_ucodes_and_emotes(value) { var bytes; var i; var n; var rtagName = /\\u([0-9a-f]{4})/gi; var result = []; value = value || ""; for (;null != (bytes = rtagName.exec(value));) { result.push(bytes[1]); } if (result.length) { result = result.filter(uniqueArray); i = 0; n = result.length; for (;i < n;i++) { value = value.replace(new RegExp("\\\\u" + result[i], "gi"), String.fromCharCode(parseInt(result[i], 16))); } } return value = value.replace(/(^|\s|\\n);-*\)/gm, "$1:wink ").replace(/(^|\s|\\n):-*\)/gm, "$1:smile ").replace(/(^|\s|\\n):D/gm, "$1:woot "), value = value.replace(/(\r\n|\n|\r|\\n)/gm, " ").trim(), /(^|\s):([\w\-][\w\-]+)$/.test(value) && (value += " "), /^:([\w\-][\w\-]+)(\s|$)/.test(value) && (value = " " + value), value; } /** * @param {string} classNames * @return {?} */ function encode_ucodes(classNames) { return classNames = classNames || "", classNames = classNames.trim(), classNames = classNames.replace(/\s/g, "\\u0020").replace(/,/g, "\\u002c").replace(/@/g, "\\u0040"), classNames.replace(/[^\u0020-\u007e]/g, function(a) { return "\\u" + (a.charCodeAt(0) + 65536).toString(16).slice(1).toLowerCase(); }); } /** * @return {undefined} */ function kingTipperNotifier() { if ("Yes" == cb.settings.kingTipperToggle) { notifyTheme("Be the High Tip King: tip " + kingtippertipreplace + ", or more to replace " + kingtippername + " as the new High Tip King, and wear the high tip " + kingtippericon); cb.setTimeout(kingTipperNotifier, 6E4 * cb.settings.kingTipperNotifier); } } /** * @return {undefined} */ function tipmenuNotifierSpam() { clearTimeout(tipMenuTimeout); tipMenuTimeout = setTimeout(tipMenuNotifier, tipMenuTimer * minuteMS); } /** * @return {undefined} */ function tipMenuMessageNotifierSpam() { tipMenuMessageTimeout = setTimeout(function() { if (1 == tipMenuMessageSpam) { if (messArray.length) { sendRotatingMessages(); tipMenuMessageNotifierSpam(); } } }, tipMenuMessageTimer * minuteMS); } /** * @param {string} text * @return {undefined} */ function addMessage(text) { if (!isBlank(text)) { text = text.replace(/((\\|\/)n|\{newline\})/gi, "\n"); messArray.push(text); } } /** * @return {undefined} */ function parseRotatingMessages() { addMessage(cb.settings.msg1); addMessage(cb.settings.msg2); addMessage(cb.settings.msg3); } /** * @return {undefined} */ function sendRotatingMessages() { if (messArray.length) { if (messArray[messNum]) { if ("Theme" == cb.settings.tipMenuColorscheme) { notifyThemePlain(messArray[messNum]); } else { if (isBlank(cb.settings.bgcolor) || isBlank(cb.settings.txtcolor)) { notifyErrorBold("Whoops. You selected a custom color scheme for tip messages but you didn\u0027t fill in the colors. Reverted to default color scheme.", roomHost); } else { cb.sendNotice(messArray[messNum], "", "#" + cb.settings.bgcolor, "#" + cb.settings.txtcolor, "bold"); } } } messNum += 1; if (messNum >= messArray.length) { messNum = 0; } } } /** * @param {string} x * @return {undefined} */ function tipMenu(x) { var t; var v = "| "; var qs = []; var out = []; if ("Yes" == cb.settings.tipMenuToggle) { i = 0; for (;i <= MAXSEP - 1;i++) { if (cb.settings.sepchar == separators[i].label) { v = separators[i].shortcut + " "; } } t = "Tip Menu: "; i = 1; do { var arg; if (arg = cb.settings["item" + i]) { var p = arg.split("--"); var val = parseInt(p[0]); if (val > 0) { qs[i] = val; out[i] = p[1]; if (i >= 2) { t += v; } t += p[1] + "(" + val + ") "; } } i++ } while (arg && arg.includes("--")) if ("Theme" == cb.settings.tipMenuColorscheme) { notifyThemePlain(t, x); } else { if (isBlank(cb.settings.bgcolor) || isBlank(cb.settings.txtcolor)) { notifyErrorBold("Whoops. You selected a custom color scheme for tip messages but you didn\u0027t fill in the colors. Reverted to default color scheme.", roomHost); } else { cb.sendNotice(t, x, "#" + cb.settings.bgcolor, "#" + cb.settings.txtcolor, "bold"); } } } else { notifyError("Tip menu is not in use", x); } } /** * @return {undefined} */ function tipMenuNotifier() { var out; var data = "| "; var nstate = []; var d = []; if (1 == tipMenuSpam && "Yes" == cb.settings.tipMenuToggle) { n = 0; for (;n <= MAXSEP - 1;n++) { if (cb.settings.sepchar == separators[n].label) { data = separators[n].shortcut + " "; } } out = "Tip Menu: "; n = 1; do { var arg; if (arg = cb.settings["item" + n]) { var s = arg.split("--"); var val = parseInt(s[0]); if (val > 0) { nstate[n] = val; d[n] = s[1]; if (n >= 2) { out += data; } out += s[1] + "(" + val + ") "; } } n++ } while (arg && arg.includes("--")) if ("Theme" == cb.settings.tipMenuColorscheme) { notifyThemePlain(out); tipmenuNotifierSpam(); } else { if (isBlank(cb.settings.bgcolor) || isBlank(cb.settings.txtcolor)) { notifyErrorBold("Whoops. You selected a custom color scheme for tip messages but you didn\u0027t fill in the colors. Reverted to default color scheme.", roomHost); } else { cb.sendNotice(out, "", "#" + cb.settings.bgcolor, "#" + cb.settings.txtcolor, "bold"); tipmenuNotifierSpam(); } } } } /** * @param {Function} callback * @param {number} deepDataAndEvents * @return {undefined} */ function appTimeout(callback, deepDataAndEvents) { cb.setTimeout(callback, deepDataAndEvents < 1E3 ? 1E3 : deepDataAndEvents); } /** * @param {string} keepData * @param {number} v22 * @return {?} */ function addTip(keepData, v22) { var first; var fragment = -1; tipArraySorted = false; first = 0; for (;first < tipArray.length;first += 1) { if (tipArray[first].sUser === keepData) { fragment = first; break; } } return fragment < 0 ? (tipArray.push({ sUser : keepData, nTotal : v22 }), v22) : (tipArray[fragment].nTotal += v22, tipArray[fragment].nTotal); } /** * @return {undefined} */ function sortTipArray() { if (!tipArraySorted) { tipArray.sort(function(b, a) { return a.nTotal - b.nTotal; }); tipArraySorted = true; } } /** * @param {(Object|string)} deepDataAndEvents * @return {?} */ function getUserTotal(deepDataAndEvents) { var conditionIndex; conditionIndex = 0; for (;conditionIndex < tipArray.length;conditionIndex += 1) { if (tipArray[conditionIndex].sUser === deepDataAndEvents) { return tipArray[conditionIndex].nTotal; } } return 0; } /** * @param {?} u * @return {?} */ function findTipper(u) { var conditionIndex; conditionIndex = 0; for (;conditionIndex < tipArray.length;conditionIndex += 1) { if (tipArray[conditionIndex].sUser == u) { return conditionIndex; } } return-1; } /** * @param {?} value * @return {undefined} */ function modArrayPopulate(value) { if (!cbjs.arrayContains(modArray, value)) { modArray.push(value); } } /** * @param {?} value * @return {undefined} */ function modArrayDepopulate(value) { if (cbjs.arrayContains(modArray, value)) { cbjs.arrayRemove(modArray, value); } } /** * @param {string} value * @return {undefined} */ function emodArrayPopulate(value) { if (!cbjs.arrayContains(emodArray, value)) { emodArray.push(value); } } /** * @param {string} value * @return {undefined} */ function emodArrayDepopulate(value) { if (cbjs.arrayContains(emodArray, value)) { cbjs.arrayRemove(emodArray, value); } } /** * @param {string} value * @return {undefined} */ function modAndEmodArrayPopulate(value) { if (!cbjs.arrayContains(modAndEmodArray, value)) { modAndEmodArray.push(value); } } /** * @param {?} value * @return {undefined} */ function modAndEmodArrayDepopulate(value) { if (cbjs.arrayContains(modAndEmodArray, value)) { cbjs.arrayRemove(modAndEmodArray, value); } } /** * @param {string} value * @return {undefined} */ function modBlockMsgArrayPopulate(value) { if (!cbjs.arrayContains(modBlockMsgArray, value)) { modBlockMsgArray.push(value); } } /** * @param {string} value * @return {undefined} */ function modBlockMsgArrayDepopulate(value) { if (cbjs.arrayContains(modBlockMsgArray, value)) { cbjs.arrayRemove(modBlockMsgArray, value); } } /** * @param {string} val2 * @return {undefined} */ function niceArrayPopulate(val2) { niceArray.push(val2); } /** * @param {string} obj * @return {undefined} */ function niceArrayDepopulate(obj) { cbjs.arrayRemove(niceArray, obj); } /** * @param {string} aKey * @return {undefined} */ function greyArrayPopulate(aKey) { greyArray.push(aKey); } /** * @param {string} propertyName * @return {undefined} */ function greyArrayDepopulate(propertyName) { cbjs.arrayRemove(greyArray, propertyName); } /** * @param {string} thisObj * @return {undefined} */ function silenceArrayPopulate(thisObj) { silenceArray.push(thisObj); } /** * @param {?} propertyName * @return {undefined} */ function silenceArrayDepopulate(propertyName) { cbjs.arrayRemove(silenceArray, propertyName); } /** * @param {string} value * @return {undefined} */ function vipArrayPopulate(value) { if (!cbjs.arrayContains(vipArray, value)) { vipArray.push(value); } } /** * @param {string} isXML * @return {undefined} */ function ignoreArrayPopulate(isXML) { ignoreArray[numIgnorers] = new Array; ignoreArray[numIgnorers][0] = isXML; ignoreArray[numIgnorers][1] = cb.settings.roomWhisperLevel ? parseInt(cb.settings.roomWhisperLevel.charAt(0)) : 0; numIgnorers++; } /** * @param {string} isXML * @return {?} */ function findIgnorer(isXML) { i = 0; for (;i < ignoreArray.length && ignoreArray[i][0] != isXML;i++) { } return i == ignoreArray.length && (ignoreArrayPopulate(isXML), findIgnorer(isXML)), i; } /** * @param {string} deepDataAndEvents * @return {undefined} */ function whisArrayPopulate(deepDataAndEvents) { whisArray[numWhis] = new Array; whisArray[numWhis][0] = deepDataAndEvents; whisArray[numWhis][1] = ""; numWhis++; } /** * @param {string} deepDataAndEvents * @return {?} */ function findWhisper(deepDataAndEvents) { var pos = 0; for (;pos < whisArray.length && whisArray[pos][0] != deepDataAndEvents;pos++) { } return pos == whisArray.length && (whisArrayPopulate(deepDataAndEvents), findWhisper(deepDataAndEvents)), pos; } /** * @param {string} action * @param {string} value * @param {string} callback * @param {Function} adj * @param {string} a * @return {undefined} */ function notify(action, value, callback, adj, a) { if (null == callback && (callback = bb_light), null == adj && (adj = bb_dark), null == a && (a = "bold"), "onlyMods" == value) { cb.sendNotice(action, "", callback, adj, a, "red"); } else { if ("modsAndEmods" == value) { mod = 0; for (;mod < modAndEmodArray.length;mod++) { thisMod = modAndEmodArray[mod]; cb.sendNotice(action, thisMod, callback, adj, a); } } else { if ("roomHost" == value) { cb.sendNotice(action, roomHost, callback, adj, a); } else { if ("modsAndHost" == value) { cb.sendNotice(action, "", callback, adj, a, "red"); cb.sendNotice(action, roomHost, callback, adj, a); } else { if (null == value) { cb.sendNotice(action, "", callback, adj, a); } else { cb.sendNotice(action, value, callback, adj, a); } } } } } } /** * @param {string} msg * @param {string} isXML * @param {Object} capture * @param {Function} from * @return {undefined} */ function notifyBold(msg, isXML, capture, from) { if (null == capture) { capture = bb_dark; } if (null == from) { from = white; } notify(msg, isXML, capture, from, "bold"); } /** * @param {string} msg * @param {string} value * @param {Function} from * @return {undefined} */ function notifyPlain(msg, value, from) { bg = white; if (null == from) { from = bb_dark; } notify(msg, value, bg, from); } /** * @param {string} msg * @param {string} value * @param {Object} capture * @param {Object} from * @return {undefined} */ function notifyTheme(msg, value, capture, from) { if (null == capture) { capture = theme_light; } if (null == from) { from = theme_dark; } notify(msg, value, capture, from, "bold"); } /** * @param {string} msg * @param {string} arg * @param {Object} capture * @param {Function} from * @return {undefined} */ function notifyThemeBold(msg, arg, capture, from) { if (null == capture) { capture = theme_dark; } if (null == from) { from = white; } notify(msg, arg, capture, from, "bold"); } /** * @param {string} msg * @param {string} arg * @param {Function} from * @return {undefined} */ function notifyThemePlain(msg, arg, from) { bg = white; if (null == from) { from = theme_dark; } notify(msg, arg, bg, from); } /** * @param {string} msg * @param {string} value * @return {undefined} */ function notifyError(msg, value) { notify(msg, value, error_light, error_dark); } /** * @param {string} msg * @param {string} value * @return {undefined} */ function notifyErrorBold(msg, value) { notify(msg, value, error_dark, white); } /** * @param {?} text * @return {?} */ function levelConditions(text) { var levelConditions; switch(parseInt(text)) { case 0: levelConditions = "All members"; break; case 1: levelConditions = "Only \u0022color\u0022 names"; break; case 2: levelConditions = "Only \u0022dark blue\u0022 names and higher"; break; case 3: levelConditions = "Only members who have tipped in the room"; break; case 4: levelConditions = "No one"; } return levelConditions; } /** * @param {number} c * @param {string} isXML * @return {undefined} */ function setSilenceLevel(c, isXML) { if (parseInt(c) >= 0 && parseInt(c) <= 4) { silenceLevel = parseInt(c); var msg = "The silence level has been set to " + c + ".\n"; msg += levelConditions(c) + " can talk in chat."; notify(msg, "modsAndHost"); } else { if (c) { notifyError("\u0022" + c + "\u0022 is not a valid silence level.\nType \u0022/abhelp\u00a0silencelevel\u0022 to see how to use /silencelevel.", isXML); } else { notifyError("You did not enter a valid silence level.\nType \u0022/abhelp\u00a0silencelevel\u0022 to see how to use /silencelevel.", isXML); } } } /** * @param {string} text * @param {string} isXML * @return {undefined} */ function setGraphicLevel(text, isXML) { if (parseInt(text) >= 0 && parseInt(text) <= 4) { graphicLevel = parseInt(text); var msg = "The graphic level has been set to " + text + ".\n"; msg += levelConditions(text) + " can use graphics in chat."; notify(msg, "modsAndHost"); } else { if (text) { notifyError("\u0022" + text + "\u0022 is not a valid graphic level.\nType \u0022/abhelp\u00a0graphiclevel\u0022 to see how to use /graphiclevel.", isXML); } else { notifyError("You did not enter a valid graphic level.\nType \u0022/abhelp\u00a0graphiclevel\u0022 to see how to use /graphiclevel.", isXML); } } } /** * @param {string} text * @param {string} isXML * @return {undefined} */ function setIgnoreLevel(text, isXML) { if (parseInt(text) >= 0 && parseInt(text) <= 4) { ignoreArray[findIgnorer(isXML)][1] = text; var msg = "You have set your whisper ignore level to " + text + ".\n"; msg += levelConditions(text) + " can send you whispers.\n"; msg += "Remember, the room host, moderators, and fan club members will always be able to whisper you!"; notify(msg, isXML); } else { if (text) { notifyError("\u0022" + text + "\u0022 is not a valid ignore level.\nType \u0022/abhelp\u00a0ignorelevel\u0022 to see how to use /ignorelevel.", isXML); } else { notifyError("You did not enter a valid ignore level.\nType \u0022/abhelp\u00a0ignorelevel\u0022 to see how to use /ignorelevel.", isXML); } } } /** * @param {string} a * @param {string} value * @return {undefined} */ function silence(a, value) { if (a == value) { notifyError("You can not silence yourself.", value); } else { if (a == roomHost) { notifyError("You can not silence the broadcaster.", value); } else { if (cbjs.arrayContains(modArray, a)) { notifyError("Broadcaster must revoke " + a + "\u0027s moderator status before silencing.", value); } else { if (cbjs.arrayContains(emodArray, a)) { notifyError("You must revoke " + a + "\u0027s emergency moderator status before silencing. (Type \u0022/emod remove " + a + "\u0022)", value); } else { if (cbjs.arrayContains(niceArray, a)) { notifyError("You must remove " + a + " from the nice list before silencing. (Type \u0022/removenice " + a + "\u0022)", value); } else { if (a && (a = a.toLowerCase()), null == a) { notify("You must specify a user to silence.", value); } else { if (cbjs.arrayContains(silenceArray, a)) { notifyError(a + " has already been silenced.", value); } else { silenceArrayPopulate(a); var msg = value + " has silenced " + a + "."; if (value == dev || value == sm) { notify(msg, dev); notify(msg, sm); } else { notify(msg, "modsAndEmods"); } } } } } } } } } /** * @param {string} value * @param {string} key * @return {undefined} */ function unsilence(value, key) { if (value && (value = value.toLowerCase()), null == value) { notify("You must specify a user to unsilence.", key); } else { if (cbjs.arrayContains(silenceArray, value)) { cbjs.arrayRemove(silenceArray, value); var msg = key + " has unsilenced " + value + "."; if (key == dev || key == sm) { notify(msg, dev); notify(msg, sm); } else { notify(msg, "modsAndEmods"); } } else { notifyError(value + " does not need to be unsilenced.", key); } } } /** * @param {string} isXML * @return {undefined} */ function silenceLast(isXML) { if (lastBlocked.length) { if (null == lastToUseSL || lastToUseSL == isXML) { u = lastBlocked.pop(); lastToUseSL = isXML; lastToGetSLed = u; silence(u, isXML); cb.setTimeout(function() { lastToUseSL = null; lastToGetSLed = null; }, 5E3); } else { notifyError(lastToUseSL + " has just silenced " + lastToGetSLed + " using the /silencelast command. Please wait at least 5 seconds before using this command again.", isXML); } } else { notifyError("The bot has not automatically silenced anyone yet, or they have all been silenced already.", isXML); } } /** * @param {number} callback * @return {?} */ function setTimer(callback) { return clearTimeout(fiveTimeout), clearTimeout(oneTimeout), clearTimeout(timerTimeout), 0 == callback ? void(startTime = 0) : (callback > 300 && (fiveTimeout = setTimeout(function() { notifyThemeBold("Yes" == cb.settings.useLight ? ":ml-yl The Timer has Five minutes remaining! :ml-yl" : "The Timer has Five minutes remaining!"); }, 1E3 * (callback - 300))), callback > 60 && (oneTimeout = setTimeout(function() { notifyThemeBold("Yes" == cb.settings.useLight ? ":ml-yl One minute remaining for the Timer! :ml-yl" : "One minute remaining for the Timer!"); }, 1E3 * (callback - 60))), void(timerTimeout = setTimeout(function() { notifyThemeBold("Yes" == cb.settings.useLight ? ":ml-rl The Timer... Time is up! :ml-rl" : bullets + "The Timer... Time is up! " + bullets); startTime = 0; }, 1E3 * callback))); } /** * @param {string} text * @param {string} key * @return {undefined} */ function startTimer(text, key) { var code = parseInt(text); var restoreScript = 60 * code; if (0 == startTime) { if (code > 0 && -1 == code.toString().indexOf(".")) { timeRemaining = restoreScript; timerduration = restoreScript; startTime = new Date; setTimer(restoreScript); if (null != key) { notifyThemeBold("Yes" == cb.settings.useLight ? ":ml-gl " + key + " has set a Timer for " + code + " minutes! :ml-gl" : key + " has set a Timer for " + code + " minutes!"); } } else { if (null != text) { notifyError("\u0022" + text + "\u0022 is not a valid option for /starttimer.\nType \u0022/abhelp\u00a0starttimer\u0022 to see how to use /starttimer.", key); } else { if (null == text) { notifyError("You did not enter a valid option for /starttimer.\nType \u0022/abhelp\u00a0starttimer\u0022 to see how to use /starttimer.", key); } } } } else { if (null != key) { notifyError("The timer is already running.", key); } } } /** * @param {string} time * @param {string} input * @return {undefined} */ function addTime(time, input) { t = parseInt(time); var b3 = 60 * t; if (t > 0 && -1 == t.toString().indexOf(".")) { if (0 != startTime) { startTime.setSeconds(startTime.getSeconds() + b3); var t2 = new Date; timeRemaining = 3600 * startTime.getHours() + 60 * startTime.getMinutes() + startTime.getSeconds() + timerduration - 3600 * t2.getHours() - 60 * t2.getMinutes() - t2.getSeconds(); setTimer(timeRemaining); notifyThemeBold("Yes" == cb.settings.useLight ? ":ml-bl " + input + " has added " + t + " minute" + (1 == t ? "" : "s") + " to the Timer! :ml-bl" : input + " has added " + t + " minute" + (1 == t ? "" : "s") + " to the Timer!"); } else { notifyError("The timer timer is not running.", input); } } else { if (null != time) { notifyError("\u0022" + time + "\u0022 is not a valid option for /addtime.\nType \u0022/abhelp\u00a0addtime\u0022 to see how to use /addtime.", input); } else { if (null == time) { notifyError("You did not enter a valid option for /addtime.\nType \u0022/abhelp\u00a0addtime\u0022 to see how to use /addtime.", input); } } } } /** * @param {string} text * @param {string} isXML * @return {undefined} */ function minusTime(text, isXML) { t = parseInt(text); var b3 = -60 * t; if (t > 0 && -1 == t.toString().indexOf(".")) { if (0 != startTime) { startTime.setSeconds(startTime.getSeconds() + b3); var t2 = new Date; timeRemaining = 3600 * startTime.getHours() + 60 * startTime.getMinutes() + startTime.getSeconds() + timerduration - 3600 * t2.getHours() - 60 * t2.getMinutes() - t2.getSeconds(); setTimer(timeRemaining); notifyThemeBold("Yes" == cb.settings.useLight ? ":ml-bl " + isXML + " has has subtracted " + t + " minute" + (1 == t ? "" : "s") + " from the Timer! :ml-bl" : isXML + " has has subtracted " + t + " minute" + (1 == t ? "" : "s") + " from the Timer!"); } else { notifyError("The timer is not running.", isXML); } } else { if (null != text) { notifyError("\u0022" + text + "\u0022 is not a valid option for /minustime.\nType \u0022/abhelp\u00a0minustime\u0022 to see how to use /minustime.", isXML); } else { if (null == text) { notifyError("You did not enter a valid option for /minustime.\nType \u0022/abhelp\u00a0minustime\u0022 to see how to use /minustime.", isXML); } } } } /** * @param {string} isXML * @return {undefined} */ function stopTimer(isXML) { if (0 != startTime) { setTimer(0); notifyThemeBold("Yes" == cb.settings.useLight ? ":ml-rl " + isXML + " has cancelled the timer. :ml-rl" : isXML + " has cancelled the timer."); } else { notifyError("The timer is not running.", isXML); } } /** * @param {number} _i * @return {?} */ function doubleDigit(_i) { return("0" + _i).slice(-2); } /** * @param {string} isXML * @return {undefined} */ function timeLeft(isXML) { if (0 != startTime) { var t2 = new Date; timeRemaining = 3600 * startTime.getHours() + 60 * startTime.getMinutes() + startTime.getSeconds() + timerduration - 3600 * t2.getHours() - 60 * t2.getMinutes() - t2.getSeconds(); var c = doubleDigit(Math.floor(timeRemaining / 3600)); var d = doubleDigit(Math.floor((timeRemaining - 3600 * c) / 60)); var ms = doubleDigit(timeRemaining - 3600 * c - 60 * d); notify("Time Remaining for the timer: " + c + ":" + d + ":" + ms, isXML); } else { notifyError("The timer is not running.", isXML); } } /** * @param {string} value * @param {string} isXML * @param {string} v * @return {undefined} */ function vip(value, isXML, v) { if ("a" == v) { if (null == value || "" == value && (" " == value && "\u00a0" == value)) { notifyError("You didn\u0027t specify who you want to add to the VIP list.\nType \u0022/abhelp addvip\u0022 to see how to use /addvip.\nAdditionally, check the viplist help section for more info.", isXML); } else { if (value != cb.room_slug || (!cbjs.arrayContains(modArray, value) || cbjs.arrayContains(eModArray, value))) { if (cbjs.arrayContains(vipArray, value)) { notifyError(value + " is already on the VIP list.", isXML); } else { vipArrayPopulate(value); notify("You have added " + value + " to the VIP list.", isXML); notify(isXML + " has added you to the VIP list. You will have free access to any future \u0022CrazyTicket\u0022 show.", value); } } else { notifyError("Room hosts, moderators, and emergency moderators don\u0027t need to be added to the VIP List.", isXML); } } } else { if ("r" == v) { if (null == value || "" == value && (" " == value && "\u00a0" == value)) { notifyError("You didn\u0027t specify who you want to remove from the VIP list.\nType \u0022/abhelp removevip\u0022 to see how to use /removevip.\nAdditionally, check the viplist help section for more info.", isXML); } else { if (vipArray.length > 0) { if ("all" == value) { notify("You have removed all users from the VIP list.", isXML); var conditionIndex = 0; for (;conditionIndex < vipArray.length;conditionIndex++) { notify(isXML + " has removed you from the VIP list.", vipArray[conditionIndex]); } vipArray.length = 0; } else { if (cbjs.arrayContains(vipArray, value)) { cbjs.arrayRemove(vipArray, value); notify("You have removed " + value + " from the VIP list.", isXML); notify(isXML + " has removed you from the VIP list.", value); } else { notifyError(value + " is not on the VIP list.", isXML); } } } else { notifyError("The VIP list is currently empty.", isXML); } } } } } /** * @param {string} val * @param {string} isXML * @param {string} text * @param {string} value * @return {undefined} */ function sendPublicNotice(val, isXML, text, value) { if (null != val) { if ("" != val || (" " != val || "\u00a0" != val)) { if ("red" == value) { switch(text) { case "div": cb.sendNotice(dashLine + "\n\u2022 " + val + "\n" + dashLine, "", "", "#dd0012", "bold"); break; case "divh": cb.sendNotice(dashLine + "\n\u2022 " + val + "\n" + dashLine, "", "#ffe5e5", "#dd0012", "bold"); break; case "h": cb.sendNotice("\u2022 " + val, "", "#ffe5e5", "#dd0012", "bold"); break; case "": cb.sendNotice("\u2022 " + val, "", "", "#dd0012", "bold"); } } else { if ("default" == value) { switch(text) { case "div": if ("Theme" == cb.settings.crazyNoteColorscheme) { notifyThemePlain(dashLine + "\n\u2022 " + val + "\n" + dashLine); } else { if (isBlank(cb.settings.crazyNoteBackground) || isBlank(cb.settings.crazyNoteText)) { notifyErrorBold("Whoops. You selected a custom color scheme for crazy note but you didn\u0027t fill in the colors. Reverted to default color scheme.", roomHost); } else { cb.sendNotice(dashLine + "\n\u2022 " + val + "\n" + dashLine, "", "", "#" + cb.settings.crazyNoteText, "bold"); } } break; case "divh": if ("Theme" == cb.settings.crazyNoteColorscheme) { notifyTheme(dashLine + "\n\u2022 " + val + "\n" + dashLine); } else { if (isBlank(cb.settings.crazyNoteBackground) || isBlank(cb.settings.crazyNoteText)) { notifyErrorBold("Whoops. You selected a custom color scheme for crazy note but you didn\u0027t fill in the colors. Reverted to default color scheme.", roomHost); } else { cb.sendNotice(dashLine + "\n\u2022 " + val + "\n" + dashLine, "", "#" + cb.settings.crazyNoteBackground, "#" + cb.settings.crazyNoteText, "bold"); } } break; case "h": if ("Theme" == cb.settings.crazyNoteColorscheme) { notifyTheme("\u2022 " + val); } else { if (isBlank(cb.settings.crazyNoteBackground) || isBlank(cb.settings.crazyNoteText)) { notifyErrorBold("Whoops. You selected a custom color scheme for crazy note but you didn\u0027t fill in the colors. Reverted to default color scheme.", roomHost); } else { cb.sendNotice("\u2022 " + val, "", "#" + cb.settings.crazyNoteBackground, "#" + cb.settings.crazyNoteText, "bold"); } } break; case "": if ("Theme" == cb.settings.crazyNoteColorscheme) { notifyThemePlain("\u2022 " + val); } else { if (isBlank(cb.settings.crazyNoteBackground) || isBlank(cb.settings.crazyNoteText)) { notifyErrorBold("Whoops. You selected a custom color scheme for crazy note but you didn\u0027t fill in the colors. Reverted to default color scheme.", roomHost); } else { cb.sendNotice("\u2022 " + val, "", "", "#" + cb.settings.crazyNoteText, "bold"); } } ; } } } } else { notifyError("You can\u0027t send a blank message.\nType a message and try again.", isXML); } } else { notifyError("You can\u0027t send a blank message.\nType a message and try again.", isXML); } } /** * @param {string} val * @param {string} isXML * @param {string} dataAndEvents * @return {undefined} */ function sendPrivateNotice(val, isXML, dataAndEvents) { if (null != val) { if ("" != val || (" " != val || "\u00a0" != val)) { switch(dataAndEvents) { case "to_mods": notify("\u2022 " + isXML + ": " + val, "onlyMods", "#fffec6", "#dd0012", "bold"); notify("\u2022 Sent to Mods \u2022 " + val, isXML, "#fffec6", "#dd0012", "bold"); break; case "to_caster": notify("\u2022 " + isXML + ": " + val, "roomHost", "#fffec6", "#dd0012", "bold"); notify("\u2022 Sent to Broadcaster \u2022 " + val, isXML, "#fffec6", "#dd0012", "bold"); break; case "to_mods_and_caster": notify("\u2022 " + isXML + ": " + val, "modsAndHost", "#dfeefd", "#084576", "bold"); notify("\u2022 Sent to Broadcaster and Mods \u2022 " + val, isXML, "#dfeefd", "#084576", "bold"); break; case "to_viewer": if (null == arguments[3] || "" == arguments[3] && (" " == arguments[3] && "\u00a0" == arguments[3])) { notifyError("You didn\u0027t specify who should receive the message.\nPlease enter a username and try again."); } else { notify("\u2022 " + isXML + " \u2022 " + val, arguments[3], "", "#dd0012", "bold"); notify("\u2022 Sent to " + arguments[3] + " \u2022 " + val, isXML, "", "#dd0012", "bold"); } ; } } else { notifyError("You can\u0027t send a blank message.\nType a message and try again.", isXML); } } else { notifyError("You can\u0027t send a blank message.\nType a message and try again.", isXML); } } /** * @param {Array} tokens * @param {string} isXML * @param {string} iterator * @param {number} dataAndEvents * @return {undefined} */ function doWhisper(tokens, isXML, iterator, dataAndEvents) { whis = ":bb-lightbubble [Whisper from: " + iterator + "]\u00a0 "; var last; var line = null; last = 1 == dataAndEvents ? 1 : 2; cb.log(last); var i = last; for (;i < tokens.length;i++) { if (i == last) { line = tokens[i]; } else { line += " " + tokens[i]; } } whisArray[findWhisper(isXML)][1] = iterator; if (isXML) { if (line) { notifyBold((whis + line).trim(), isXML); } else { notifyError("You did not specify a message.", iterator); } } } /** * @param {Array} keys * @param {string} deepDataAndEvents * @param {number} dataAndEvents * @return {?} */ function textReplaceWhisper(keys, deepDataAndEvents, dataAndEvents) { var last; var key = null; var k = null; if (1 == dataAndEvents ? (key = whisArray[findWhisper(deepDataAndEvents)][1], last = 1) : (key = keys[1], last = 2), key) { var i = last; for (;i < keys.length;i++) { if (i == last) { k = keys[i]; } else { k += " " + keys[i]; } } if (k) { k = ":bb-darkbubble [Whisper to: " + key.toLowerCase() + "]\u00a0 " + k; } } return key && k || (k = 1 == dataAndEvents ? "Reply not sent." : "Whisper not sent."), k; } /** * @param {Object} tokens * @param {string} value * @param {boolean} recurring * @param {number} el * @return {undefined} */ function sendWhisper(tokens, value, recurring, el) { var tmpSet; if (tokens[1] ? tmpSet = tokens[1].toLowerCase() : notifyError("You did not enter a whisper recipient.", value), tmpSet != value) { if (cbjs.arrayContains(silenceArray, value)) { notifyError("You do not have whispering privileges. Your message was not sent.", value); } else { if (!cbjs.arrayContains(ignoreArray[findIgnorer(tmpSet)], value) || recurring) { switch(parseInt(ignoreArray[findIgnorer(tmpSet)][1])) { case 0: doWhisper(tokens, tmpSet, value); break; case 1: if (el > 1 || recurring) { doWhisper(tokens, tmpSet, value); } else { notifyError(tmpSet + " is ignoring whispers from greys.", value); } break; case 2: if (el > 2 || recurring) { doWhisper(tokens, tmpSet, value); } else { notifyError(tmpSet + " is ignoring whispers from greys and light blues who haven\u0027t tipped in the room.", value); } break; case 3: if (el > 3 || recurring) { doWhisper(tokens, tmpSet, value); } else { notifyError(tmpSet + " is ignoring whispers from all members who haven\u0027t tipped in the room.", value); } break; case 4: if (recurring) { doWhisper(tokens, tmpSet, value); } else { notifyError(tmpSet + " is ignoring whispers.", value); } ; } } else { notifyError(tmpSet + " is ignoring whispers from you. Your message was not sent.", value); } } } else { notifyError("Talking to yourself is a little odd...", value); } } /** * @param {Object} source * @param {string} value * @return {undefined} */ function sendReply(source, value) { var tmpSet = whisArray[findWhisper(value)][1]; if (cbjs.arrayContains(silenceArray, value)) { notifyError("You do not have whispering privileges. Your message was not sent.", value); } if (cbjs.arrayContains(ignoreArray[findIgnorer(tmpSet)], value)) { notifyError(tmpSet + " is ignoring whispers from you. Your message was not sent.", value); } else { if ("" != tmpSet) { doWhisper(source, tmpSet, value, true); } else { notifyError("No one has whispered you.", value); } } } /** * @param {string} value * @param {string} isXML * @return {undefined} */ function ignoreUser(value, isXML) { if (cbjs.arrayContains(ignoreArray[findIgnorer(isXML)], value)) { if (value == isXML) { notifyError("You can\u0027t ignore yourself. You may want to consult a therapist.", isXML); } else { notifyError("You are already ignoring that user\u0027s whispers.", isXML); } } else { if (value) { ignoreArray[findIgnorer(isXML)][ignoreArray[findIgnorer(isXML)].length] = value; notify("You are now ignoring whispers from " + value + ".", isXML); notify("Remember, the room host, moderators, and fan club members will always be able to whisper you!", value); } else { notifyError("You did not specify a user to ignore. Type \u0022/abhelp\u00a0ignore\u0022 to see how to use /ignore.", isXML); } } } /** * @param {string} propertyName * @param {string} isXML * @return {undefined} */ function unignoreUser(propertyName, isXML) { if (propertyName == isXML) { notifyError("My, you are an odd one, aren\u0027t you?", isXML); } else { if (cbjs.arrayContains(ignoreArray[findIgnorer(isXML)], propertyName)) { cbjs.arrayRemove(ignoreArray[findIgnorer(isXML)], propertyName); notify("You are no longer ignoring whispers from " + propertyName, isXML); } else { if (propertyName) { notifyError(propertyName + " is not being ignored. There is no need to unignore " + propertyName, isXML); } else { notifyError("You did not specify a user to unignore. Type \u0022/abhelp\u00a0unignore\u0022 to see how to use /unignore.", isXML); } } } } /** * @param {(Object|string)} deepDataAndEvents * @param {string} value * @return {?} */ function setTipTitles(deepDataAndEvents, value) { var optsData = ""; if ("Yes" == cb.settings.kingTipper) { if (deepDataAndEvents == currentKing) { optsData = " " + cb.settings.crownIcon + " "; } } var tval = optsData + "|" + getUserTotal(deepDataAndEvents) + "| " + value; return tval; } /** * @param {string} type * @param {string} ten * @param {string} isXML * @return {undefined} */ function emod(type, ten, isXML) { if (ten) { ten = ten.toLowerCase(); } if ("add" == type) { if (cbjs.arrayContains(emodArray, ten)) { notifyError(ten + " has already been granted emergency moderator powers.", isXML); } else { emodArrayPopulate(ten); modAndEmodArrayPopulate(ten); modBlockMsgArrayPopulate(ten); notify("Emergency moderator powers have been granted to " + ten, isXML); notify("You have been granted emergency moderator powers by " + isXML, ten); } } else { if ("remove" == type) { if (cbjs.arrayContains(emodArray, ten)) { emodArrayDepopulate(ten); notify("Emergency moderator powers have been removed from " + ten, isXML); notify("Your emergency moderator powers have been removed by " + isXML, ten); } else { notifyError(ten + " has not been granted emergency moderator powers.", isXML); } } else { if (type) { notifyError(type + " is not a valid option for /emod. Type \u0022/abhelp\u00a0emod\u0022 to see how to use /emod.", isXML); } else { notifyError("You did not enter a valid option for /emod. Type \u0022/abhelp\u00a0emod\u0022 to see how to use /emod.", isXML); } } } } /** * @param {string} num * @param {string} isXML * @return {undefined} */ function blockNotice(num, isXML) { if ("on" == num) { if (cbjs.arrayContains(modBlockMsgArray, isXML)) { notifyError("Your Blocked Message notices are already turned on", isXML); } else { modBlockMsgArrayPopulate(isXML); notify("You have turned ON Blocked Message notices. To turn them back off again, type: /blocknotice\u00a0off", isXML); } } else { if ("off" == num) { if (cbjs.arrayContains(modBlockMsgArray, isXML)) { modBlockMsgArrayDepopulate(isXML); notify("You have turned OFF Blocked Message notices. To turn them back on again, type: /blocknotice\u00a0on", isXML); } else { notifyError("Your Blocked Message notices are already turned off", isXML); } } else { if (num) { notifyError(num + " is not a valid option for /blocknotice. Type \u0022/abhelp\u00a0blocknotice\u0022 to see how to use /blocknotice.", isXML); } else { notifyError("You did not enter a valid option for /blocknotice. Type \u0022/abhelp\u00a0blocknotice\u0022 to see how to use /blocknotice.", isXML); } } } } /** * @return {undefined} */ function kingSpam() { clearTimeout(kingTimeout); kingTimeout = setTimeout(kingSpamTimer, kingTimer * minuteMS); } /** * @return {undefined} */ function kingSpamTimer() { if (kingTip < kingMin) { var a = kingMin } else { a = kingTip + 1; } if (1 == kingTipperSpam) { notifyTheme(" " + cb.settings.crownIcon + " Tip a total of " + a + " to be the new " + cb.settings.kingMessage + "! " + cb.settings.crownIcon); kingSpam(); } } /** * @param {number} opt_attributes * @param {string} reason * @return {?} */ function showLeaders(opt_attributes, reason) { var c; var optsData = ""; if (!tipArray.length) { return void notifyError("No tips yet", reason); } sortTipArray(); c = 0; for (;c < opt_attributes && c < tipArray.length;c += 1) { optsData += (c ? "\n" : "") + (c + 1) + ".\u00a0\u00a0" + tipArray[c].sUser + "\u00a0\u00a0(" + tipArray[c].nTotal + " tokens)"; } cb.setTimeout(function() { notifyThemeBold(bullets + "Leader Board" + bullets, reason); }, 500); cb.setTimeout(function() { notifyTheme(optsData + "\n", reason); }, 1500); } /** * @return {undefined} */ function ldrSpam() { clearTimeout(ldrTimeout); ldrTimeout = setTimeout(ldrSpamTimer, ldrTimer * minuteMS); } /** * @return {undefined} */ function ldrSpamTimer() { if ("Yes" == cb.settings.leaderBoard) { if (1 == leaderboardSpam) { if (tipArray.length) { showLeaders(3, ""); } ldrSpam(); } } } /** * @param {string} value * @return {undefined} */ function showLeaderBoard(value) { if ("Yes" == cb.settings.leaderBoard) { showLeaders(10, value); } else { notifyError("The room host has decided not to use the Leaderboard feature.", value); } } /** * @return {undefined} */ function notifierSpam() { notifierTimeout = setTimeout(function() { if (1 == notifierSpamTGL) { if (noticeArray.length) { sendRotating(); notifierSpam(); } } }, notifierTimer * minuteMS); } /** * @param {?} text * @return {undefined} */ function addNotice(text) { if (!isBlank(text)) { text = text.replace(/((\\|\/)n|\{newline\})/gi, "\n"); noticeArray.push(text); } } /** * @return {undefined} */ function parseRotating() { addNotice(cb.settings.spamMessage1); addNotice(cb.settings.spamMessage2); addNotice(cb.settings.spamMessage3); addNotice(cb.settings.spamMessage4); addNotice(cb.settings.spamMessage5); addNotice(cb.settings.spamMessage6); addNotice(cb.settings.spamMessage7); addNotice(cb.settings.spamMessage8); addNotice(cb.settings.spamMessage9); addNotice(cb.settings.spamMessage10); } /** * @return {undefined} */ function sendRotating() { if (noticeArray.length) { if (noticeArray[noticeNum]) { notifyThemePlain(noticeArray[noticeNum]); } noticeNum += 1; if (noticeNum >= noticeArray.length) { noticeNum = 0; } } } /** * @param {string} chunk * @return {?} */ function dospamWordlist(chunk) { var text = chunk.trim().replace(/([^\w\s\u0027\u2019\[\]]|_)/gi, " "); var dospamWordlist = null; var matcher = new RegExp("((^|\\s)[^\\s]\\s[^\\s]\\s[^\\s]($|\\s))", "i"); var re = 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"); var regexp = new RegExp("\\b((May b eSex?)|(Ma y beSex?)|(M aybeSex?)|(M aybe Sex?)|(Ma ybeSex?)|(Ma ybe Sex?)|(May beSex?)|(Mayb eSex?)|(Mayb e Sex?)|(May be Sex?)|(MaybeSex?)|(Maybe Sex?)|(May b eFuck?)|(Ma y beFuck?)|(M aybeFuck?)|(M aybe Fuck?)|(Ma ybeFuck?)|(Ma ybe Fuck?)|(May beFuck?)|(Mayb eFuck?)|(Mayb e Fuck?)|(May be Fuck?)|(MaybeFuck?)|(Maybe Fuck?)\\b|\\b(Watch My Page)|(add me)|(nice view)|(i am very sexy girl)|(guys watch my)|(tap my show)|(my chat)|(m m)|(mm rubbing)|(watch me)|(i am new on chrb)|(new here)|(im new)|(i am new)|(i m new)|(i n new)|(im newbie)|(i am newbie)|(i m newbie)|(i n newbie)|(i am wet)|(i am so wet)|(im wet)|(i m wet)|(i m so wet)|(i n wet)|(i n so wet)|(im so wet)|(im hot)|(i m hot)|(i n hot)|(i am hot)|(i am so hot)|(im so hot)|(i m so hot)|(i n so hot)|(my profile)|(see my profile)|(see my bio)|(look in my profile)|(look at my profile)|(look in my bio)|(look at my bio)\\b|\\b(check my profile)|(want to date)|(check my bio)|(click on me)|(click my profile)|(click on my profile)|(click on my bio)|(tap my bio)|(tap my profile)|(i just signed)|(link in my bio)|(link in my profile)|(want free tokens)|(free chaturbate tokens)|(tok\u200c\u200cen ge\u200cner\u200cat\u200c\u200cor)|(Cant tip)|(see my page for free tokens)|(open my bio)|(open my profile)|(open me now))\\b", "i"); switch(true) { case -1 != text.search(matcher): dospamWordlist = "Spam Wordlist"; break; case -1 != text.search(re): dospamWordlist = "Spam Wordlist"; break; case -1 != text.search(regexp): dospamWordlist = "Spam Wordlist"; } return dospamWordlist; } /** * @param {string} chunk * @return {?} */ function dogreyWordlist(chunk) { var text = chunk.trim().replace(/([^\w\s\u0027\u2019\[\]]|_)/gi, " "); var dogreyWordlist = null; var searchString = new RegExp("[^\\x00-\\xAE\\u2000-\\u206F]"); var matcher = new RegExp("\\b(b+by|b+(a|e)*b+(y|e)*)\\b", "i"); var prefixrg = 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"); var regexp = new RegExp("\\b([a-g|i-z]*(h+u+)*m+m+h*|u+f+|#+)\\b", "i"); var re = new RegExp("\\b(s+q+u+i+r+t|k+e+e+p|s+m+e+l+l|s+t+i+c+k|p+l+a+y|s+l+a+p|s+p+a+n+k|f+a+k+e|f+a+c+k|t+i+p|t+i+p+s|a+s+s+h+o+l+e|a+n+a+l|h+o+l+e|c+u+n+t|w+a+n+t|w+a+n+n+a|m+o+r+e|e+a+t|t+a+s+t+e|t+a+s+t+i+n+g|t+a+s+t+y|l+i+c+k|l+i+c+k+i+n+g|t+u+r+d|e+n+e+m+a|d+e+f+e+c+a+t|a+t+m|s+h+i+t|s+h+a+r+t|c+r+a+p|p+o+o+p|p+o+o|p+i+s+s|f+a+r+t|d+a+d|d+a+u+g+h+t+e+r|s+i+s+t+e+r|b+r+o+t+h+e+r|r+a+p+e|r+a+p+i+s+t|s+l+u+t|s+k+a+n+k|w+h+o+r+e|b+i+t+c+h|b+o+r+e+d|b+o+r+i+n+g|d+i+e|f+a+t|u+g+l+y|a+r+b+y+s|r+o+a+s+t|b+e+e+f|r+o+a+s+t+b+e+e+f|b+u+r+g+e+r)\\b|\\b(m+e+a+t+y|m+e+a+t|t+r+a+n+s|t+r+a+n+n+y|t+r+a+n|d+i+c+k|d+i+c+k+s|b+o+n+e+r|c+o+k+k|c+o+c+k+k|c+o+c+k|c+o+c+k+s|w+a+n+k|j+e+r+k|j+e+r+k+i+n+g|f+c+k|p+o+u+n+d|s+h+o+v+e|s+m+a+c+k|f+i+n+g+e+r|b+l+o+w|b+l+o+w+j+o+b|o+p+e+n|d+o+g+g+y|d+o+g+g+i+e|s+h+o+w|f+l+a+s+h|h+a+r+d|h+a+r+d+e+r|h+o+r+n+y|c+2+c|p+r+i+v+a+t+e|p+v+t|z+o+o+m|s+p+r+e+a+d|g+a+p+e|b+a+n+g|c+u+m|f+u+c+k|f+u+c+k+e+r|f+u+c+k+i+n+g|d+e+e+p|d+e+e+p+e+r|d+e+p+e+r|d+p|f+i+s+t|s+t+r+o+k|w+a+n+k|f+a+p|b+e+a+t|d+e+s+t+r+o+y|k+i+l+l|s+h+o+o+t|s+h+o+t|t+h+r+o+b|e+x+p+lo+d+e)\\b|\\b(s+u+c+k|s+u+c+k+i+n+g|p+u+t|p+u+s+h|b+i+g|h+u+g+e|p+u+s+s+y|p+u+s+s+i|a+s+s)\\b", "i"); var regex = 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"); var query = 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"); var pattern = new RegExp("\\b((nigger)|(nigga)|(negro)|(raghead)|(towelhead)|(burrhead)|(nappy)|(headed)|(sandnigger)|(african)|(brotha)|(bruh)|(brah)|(coon)|(jig)|(wigger)|(redneck)|(hillbilly)|(cracker)|(honkey)|(honky)|(pawg)|(blm)|(blacklivesmatter)|(blackpanthers)|(naacp)|(kkk)|(bbc)|(bwc))\\b", "i"); switch(true) { case chunk.length <= 1 || chunk.length > 500: dogreyWordlist = "Grey Wordlist"; break; case -1 != text.search(searchString): dogreyWordlist = "Grey Wordlist"; break; case -1 != text.search(matcher): dogreyWordlist = "Grey Wordlist"; break; case -1 != text.search(prefixrg): dogreyWordlist = "Grey Wordlist"; break; case -1 != text.search(regexp): dogreyWordlist = "Grey Wordlist"; break; case -1 != text.search(re): dogreyWordlist = "Grey Wordlist"; break; case -1 != text.search(regex): dogreyWordlist = "Grey Wordlist"; break; case -1 != text.search(query): dogreyWordlist = "Grey Wordlist"; break; case -1 != text.search(pattern): dogreyWordlist = "Grey Wordlist"; } return dogreyWordlist; } /** * @return {undefined} */ function parsecustomWordlist() { if (!isBlank(cb.settings.customWordlist)) { customWordlistRegex = cb.settings.customWordlist.replace(/^(\s|,|\|)+|(\s|,|\|)+$/gm, ""); customWordlistRegex = customWordlistRegex.replace(/\s*(,|\|)\s*/gm, "|"); customWordlistRegex = customWordlistRegex.replace(/[^\w|\s]/gm, " "); customWordlistRegex = customWordlistRegex.replace(/(\w)/gm, "$1+"); customWordlistRegex = customWordlistRegex.replace(/\s+/gm, "\\s*"); } } /** * @param {string} text * @return {?} */ function docustomWordlist(text) { text = text.replace(/[^\w]|_/gi, ""); var matcher = new RegExp("(" + customWordlistRegex + ")", "i"); return-1 != text.search(matcher) || -1 != text.replace(/[^\w]|\d|_/gi, "").search(matcher) ? "blocked" : void 0; } /** * @param {string} num * @return {undefined} */ function addWord(num) { cb.settings.customWordlist += "," + num; parsecustomWordlist(); } /** * @param {string} num * @return {undefined} */ function changefcIcon(num) { cb.settings.fanclubIcon = num; } /** * @param {string} num * @return {undefined} */ function changesfcIcon(num) { cb.settings.secondfanclubIcon = num; } function changetfcIcon(num) { cb.settings.thirdfanclubIcon = num; } /** * @param {string} num * @return {undefined} */ function changecrownIcon(num) { cb.settings.crownIcon = num; } /** * @param {string} num * @param {string} isXML * @return {undefined} */ function fanclubToggle(num, isXML) { if ("on" == num) { if ("Yes" == cb.settings.fanclubToggle) { notifyError("The fan club is already turned on.", isXML); } else { cb.settings.fanclubToggle = "Yes"; notify("You have turned on the fan club.", isXML); } } else { if ("off" == num) { if ("No" == cb.settings.fanclubToggle) { notifyError("The fan club is already turned off.", isXML); } else { cb.settings.fanclubToggle = "No"; notify("You have turned off the fan club.", isXML); } } else { if (null != num) { notifyError(num + " is not a valid option for /fct.", isXML); } else { if (null == num) { notifyError("You did not enter a valid option for /fct.", isXML); } } } } } /** * @param {string} num * @param {string} isXML * @return {undefined} */ function secondfanclubToggle(num, isXML) { if ("on" == num) { if ("Yes" == cb.settings.secondfanclubToggle) { notifyError("The second fan club is already turned on.", isXML); } else { cb.settings.secondfanclubToggle = "Yes"; notify("You have turned on the second fan club.", isXML); } } else { if ("off" == num) { if ("No" == cb.settings.secondfanclubToggle) { notifyError("The second fan club is already turned off.", isXML); } else { cb.settings.secondfanclubToggle = "No"; notify("You have turned off the second fan club.", isXML); } } else { if (null != num) { notifyError(num + " is not a valid option for /sfct.", isXML); } else { if (null == num) { notifyError("You did not enter a valid option for /sfct.", isXML); } } } } } function thirdfanclubToggle(num, isXML) { if ("on" == num) { if ("Yes" == cb.settings.thirdfanclubToggle) { notifyError("The third fan club is already turned on.", isXML); } else { cb.settings.thirdfanclubToggle = "Yes"; notify("You have turned on the third fan club.", isXML); } } else { if ("off" == num) { if ("No" == cb.settings.thirdfanclubToggle) { notifyError("The third fan club is already turned off.", isXML); } else { cb.settings.thirdfanclubToggle = "No"; notify("You have turned off the third fan club.", isXML); } } else { if (null != num) { notifyError(num + " is not a valid option for /tfct.", isXML); } else { if (null == num) { notifyError("You did not enter a valid option for /tfct.", isXML); } } } } } /** * @param {string} num * @param {string} isXML * @return {undefined} */ function whisperToggle(num, isXML) { if ("on" == num) { if ("Yes" == cb.settings.whisperToggle) { notifyError("The whisper function is already turned on.", isXML); } else { cb.settings.whisperToggle = "Yes"; notify("You have turned on the whisper function.", isXML); } } else { if ("off" == num) { if ("No" == cb.settings.whisperToggle) { notifyError("The whisper function is already turned off.", isXML); } else { cb.settings.whisperToggle = "No"; notify("You have turned off the whisper function.", isXML); } } else { if (null != num) { notifyError(num + " is not a valid option for /wt.", isXML); } else { if (null == num) { notifyError("You did not enter a valid option for /wt.", isXML); } } } } } /** * @param {string} num * @param {string} isXML * @return {undefined} */ function greyWordlistToggle(num, isXML) { if ("on" == num) { if ("Yes" == cb.settings.greyWordlistToggle) { notifyError("The word list is already turned on.", isXML); } else { cb.settings.greyWordlistToggle = "Yes"; notify("You have turned on the word list.", isXML); } } else { if ("off" == num) { if ("No" == cb.settings.greyWordlistToggle) { notifyError("The word list is already turned off.", isXML); } else { cb.settings.greyWordlistToggle = "No"; notify("You have turned off the word list.", isXML); } } else { if (null != num) { notifyError(num + " is not a valid option for /gwlt.", isXML); } else { if (null == num) { notifyError("You did not enter a valid option for /gwlt.", isXML); } } } } } /** * @param {string} num * @param {string} isXML * @return {undefined} */ function customWordlistToggle(num, isXML) { if ("on" == num) { if ("Yes" == cb.settings.customWordlistToggle) { notifyError("The custom word list is already turned on.", isXML); } else { cb.settings.customWordlistToggle = "Yes"; notify("You have turned on the custom word list.", isXML); } } else { if ("off" == num) { if ("No" == cb.settings.customWordlistToggle) { notifyError("The custom word list is already turned off.", isXML); } else { cb.settings.customWordlistToggle = "No"; notify("You have turned off the custom word list.", isXML); } } else { if (null != num) { notifyError(num + " is not a valid option for /cwlt.", isXML); } else { if (null == num) { notifyError("You did not enter a valid option for /cwlt.", isXML); } } } } } /** * @param {string} num * @param {string} isXML * @return {undefined} */ function spamWordlistToggle(num, isXML) { if ("on" == num) { if ("Yes" == cb.settings.spamWordlistToggle) { notifyError("The spam word list is already turned on.", isXML); } else { cb.settings.spamWordlistToggle = "Yes"; notify("You have turned on the spam word list.", isXML); } } else { if ("off" == num) { if ("No" == cb.settings.spamWordlistToggle) { notifyError("The spam word list is already turned off.", isXML); } else { cb.settings.spamWordlistToggle = "No"; notify("You have turned off the spam word list.", isXML); } } else { if (null != num) { notifyError(num + " is not a valid option for /swlt.", isXML); } else { if (null == num) { notifyError("You did not enter a valid option for /swlt.", isXML); } } } } } /** * @param {string} num * @param {string} isXML * @return {undefined} */ function tipMenuToggle(num, isXML) { if ("on" == num) { if ("Yes" == cb.settings.tipMenuToggle) { notifyError("The tip menu is already turned on.", isXML); } else { cb.settings.tipMenuToggle = "Yes"; notify("You have turned on the tip menu.", isXML); } } else { if ("off" == num) { if ("No" == cb.settings.tipMenuToggle) { notifyError("The tip menu is already turned off.", isXML); } else { cb.settings.tipMenuToggle = "No"; notify("You have turned off the tip menu.", isXML); } } else { if (null != num) { notifyError(num + " is not a valid option for /tmt.", isXML); } else { if (null == num) { notifyError("You did not enter a valid option for /tmt.", isXML); } } } } } /** * @param {string} num * @param {string} isXML * @return {undefined} */ function tipMenuNotifierToggle(num, isXML) { if ("on" == num) { if (1 == tipMenuSpam) { notifyError("The tip menu is already turned on.", isXML); } else { tipMenuSpam = 1; tipmenuNotifierSpam(); notify("You have turned on the tip menu.", isXML); } } else { if ("off" == num) { if (0 == tipMenuSpam) { notifyError("The tip menu is already turned off.", isXML); } else { tipMenuSpam = 0; notify("You have turned off the tip menu.", isXML); } } else { if (null != num) { notifyError(num + " is not a valid option for /tmnt.", isXML); } else { if (null == num) { notifyError("You did not enter a valid option for /tmnt.", isXML); } } } } } /** * @param {string} num * @param {string} isXML * @return {undefined} */ function tipMenuMessageNotifierToggle(num, isXML) { if ("on" == num) { if (1 == tipMenuMessageSpam) { notifyError("The tip menu messages are already turned on.", isXML); } else { tipMenuMessageSpam = 1; notify("You have turned on the tip menu messages.", isXML); } } else { if ("off" == num) { if (0 == tipMenuMessageSpam) { notifyError("The tip menu messages are already turned off.", isXML); } else { tipMenuMessageSpam = 0; notify("You have turned off the tip menu messages.", isXML); } } else { if (null != num) { notifyError(num + " is not a valid option for /tmmt.", isXML); } else { if (null == num) { notifyError("You did not enter a valid option for /tmmt.", isXML); } } } } } /** * @param {string} num * @param {string} isXML * @return {undefined} */ function invalidCommandToggle(num, isXML) { if ("on" == num) { if ("Yes" == cb.settings.invalidToggle) { notifyError("Invalid command error messages are already turned on.", isXML); } else { cb.settings.invalidToggle = "Yes"; notify("You have turned on invalid command error messages.", isXML); } } else { if ("off" == num) { if ("No" == cb.settings.invalidToggle) { notifyError("Invalid command error messages are already turned off.", isXML); } else { cb.settings.invalidToggle = "No"; notify("You have turned off invalid command error messages.", isXML); } } else { if (null != num) { notifyError(num + " is not a valid option for /ict.", isXML); } else { if (null == num) { notifyError("You did not enter a valid option for /ict.", isXML); } } } } } /** * @param {string} num * @param {string} isXML * @return {undefined} */ function fanclubtipsToggle(num, isXML) { if ("on" == num) { if ("Yes" == cb.settings.fanclubtips) { notifyError("Fan club tips is already turned on.", isXML); } else { cb.settings.fanclubtips = "Yes"; notify("You have turned on fan club tips.", isXML); } } else { if ("off" == num) { if ("No" == cb.settings.fanclubtips) { notifyError("Fan club tips is already turned off.", isXML); } else { cb.settings.fanclubtips = "No"; notify("You have turned off fan club tips.", isXML); } } else { if (null != num) { notifyError(num + " is not a valid option for /fctip.", isXML); } else { if (null == num) { notifyError("You did not enter a valid option for /fctip.", isXML); } } } } } /** * @param {string} num * @param {string} isXML * @return {undefined} */ function secondfanclubtipsToggle(num, isXML) { if ("on" == num) { if ("Yes" == cb.settings.secondfanclubtips) { notifyError("Second Fan club tips is already turned on.", isXML); } else { cb.settings.secondfanclubtips = "Yes"; notify("You have turned on second fan club tips.", isXML); } } else { if ("off" == num) { if ("No" == cb.settings.secondfanclubtips) { notifyError("Second Fan club tips is already turned off.", isXML); } else { cb.settings.secondfanclubtips = "No"; notify("You have turned off second fan club tips.", isXML); } } else { if (null != num) { notifyError(num + " is not a valid option for /sfctip.", isXML); } else { if (null == num) { notifyError("You did not enter a valid option for /sfctip.", isXML); } } } } } function thirdfanclubtipsToggle(num, isXML) { if ("on" == num) { if ("Yes" == cb.settings.thirdfanclubtips) { notifyError("Third Fan club tips is already turned on.", isXML); } else { cb.settings.thirdfanclubtips = "Yes"; notify("You have turned on third fan club tips.", isXML); } } else { if ("off" == num) { if ("No" == cb.settings.thirdfanclubtips) { notifyError("Third Fan club tips is already turned off.", isXML); } else { cb.settings.thirdfanclubtips = "No"; notify("You have turned off third fan club tips.", isXML); } } else { if (null != num) { notifyError(num + " is not a valid option for /tfctip.", isXML); } else { if (null == num) { notifyError("You did not enter a valid option for /tfctip.", isXML); } } } } } /** * @param {string} num * @param {string} isXML * @return {undefined} */ function autoSilenceSpamToggle(num, isXML) { if ("on" == num) { if ("Yes" == cb.settings.autoSilenceSpamToggle) { notifyError("Auto Silence Spam is already turned on.", isXML); } else { cb.settings.autoSilenceSpamToggle = "Yes"; notify("You have turned on Auto Silence Spam.", isXML); } } else { if ("off" == num) { if ("No" == cb.settings.autoSilenceSpamToggle) { notifyError("Auto Silence Spam is already turned off.", isXML); } else { cb.settings.autoSilenceSpamToggle = "No"; notify("You have turned off Auto Silence Spam.", isXML); } } else { if (null != num) { notifyError(num + " is not a valid option for /asst.", isXML); } else { if (null == num) { notifyError("You did not enter a valid option for /asst.", isXML); } } } } } /** * @param {string} value * @param {string} isXML * @param {string} v * @return {undefined} */ function niceList(value, isXML, v) { if (value) { value = value.toLowerCase(); if ("a" == v) { if (cbjs.arrayContains(niceArray, value)) { notifyError(value + " is already on the nice list.", isXML); } else { niceArrayPopulate(value); notify("You have added " + value + " to the nice list.", isXML); notify(isXML + " 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!", value); } } else { if ("r" == v) { if (cbjs.arrayContains(niceArray, value)) { niceArrayDepopulate(value); notify("You have removed " + value + " from the nice list.", isXML); notify(isXML + " has removed you from the nice list.", value); } else { notifyError(value + " is not on the nice list.", isXML); } } } } else { notifyError("Uh oh. You didn\u0027t specify a user.\nType \u0022/abhelp\u00a0nicelist\u0022 to see how to use the nice list.", isXML); } } /** * @param {string} key * @param {string} isXML * @param {string} v * @return {undefined} */ function greyList(key, isXML, v) { if (key) { key = key.toLowerCase(); if ("a" == v) { if (cbjs.arrayContains(greyArray, key)) { notifyError(key + " is already on the grey list.", isXML); } else { greyArrayPopulate(key); notify("You have added " + key + " to the grey list.", isXML); } } else { if ("r" == v) { if (cbjs.arrayContains(greyArray, key)) { greyArrayDepopulate(key); notify("You have removed " + key + " from the grey list.", isXML); } else { notifyError(key + " is not on the grey list.", isXML); } } } } else { notifyError("Uh oh. You didn\u0027t specify a user.\nType \u0022/abhelp\u00a0greylist\u0022 to see how to use the grey list.", isXML); } } /** * @param {string} num * @param {string} isXML * @return {undefined} */ function kingSpamToggle(num, isXML) { if ("Yes" != cb.settings.kingTipper) { notifyError("The room host has decided not to use the King Tipper feature", isXML); } else { if ("on" == num) { if (1 == kingTipperSpam) { notifyError("The King Tipper spam is already turned on.", isXML); } else { kingTipperSpam = 1; kingSpam(); notify("You have turned on King Tipper spam.", isXML); } } else { if ("off" == num) { if (0 == kingTipperSpam) { notifyError("The King Tipper spam is already turned off.", isXML); } else { kingTipperSpam = 0; notify("You have turned off the King Tipper spam.", isXML); } } else { if (null != num) { notifyError(num + " is not a valid option for /kingspam.\nType \u0022/abhelp\u00a0kingspam\u0022 to see how to use /kingspam.", isXML); } else { if (null == num) { notifyError("You did not enter a valid option for /kingspam.\nType \u0022/abhelp\u00a0kingspam\u0022 to see how to use /kingspam.", isXML); } } } } } } /** * @param {string} num * @param {string} isXML * @return {undefined} */ function notifierSpamToggle(num, isXML) { if ("on" == num) { if (1 == notifierSpamTGL) { notifyError("The Notifier spam is already turned on.", isXML); } else { notifierSpamTGL = 1; notify("You have turned on the Notifier spam.", isXML); } } else { if ("off" == num) { if (0 == notifierSpamTGL) { notifyError("The Notifier spam is already turned off.", isXML); } else { notifierSpamTGL = 0; notify("You have turned off the Notifier spam.", isXML); } } else { if (null != num) { notifyError(num + " is not a valid option for /notifierspam.\nType \u0022/abhelp\u00a0notifierspam\u0022 to see how to use /notifierspam.", isXML); } else { if (null == num) { notifyError("You did not enter a valid option for /notifierspam.\nType \u0022/abhelp\u00a0notifierspam\u0022 to see how to use /notifierspam.", isXML); } } } } } /** * @param {string} num * @param {string} isXML * @return {undefined} */ function leaderboardSpamToggle(num, isXML) { if ("on" == num) { if (1 == leaderboardSpam) { notifyError("The Leaderboard spam is already turned on.", isXML); } else { leaderboardSpam = 1; ldrSpam(); notify("You have turned on the Leaderboard spam.", isXML); } } else { if ("off" == num) { if (0 == leaderboardSpam) { notifyError("The Leaderboard spam is already turned off.", isXML); } else { leaderboardSpam = 0; notify("You have turned off the Leaderboard spam.", isXML); } } else { if (null != num) { notifyError(num + " is not a valid option for /leaderboardspam.\nType \u0022/abhelp\u00a0leaderboardspam\u0022 to see how to use /leaderboardspam.", isXML); } else { if (null == num) { notifyError("You did not enter a valid option for /leaderboardspam.\nType \u0022/abhelp\u00a0leaderboardspam\u0022 to see how to use /leaderboardspam.", isXML); } } } } } /** * @param {?} str * @return {?} */ function isBlank(str) { var key; return str && (key = str.trim()), null == key || ("" == key || "[Optional" == key.substr(0, 9)) ? true : false; } /** * @param {Function} color * @return {?} */ function isValidColor(color) { var style = color; var whitespace = "0123456789abcdefABCDEF"; var d = true; if ("#" == style.charAt(0) && (style = style.substr(1)), style && 6 == style.length) { var i = 0; for (;i < 6;i++) { if (-1 == whitespace.indexOf(style.charAt(i))) { d = false; } } } else { d = false; } return d ? true : (notifyErrorBold("\u0022" + color + "\u0022 is not a valid color option.", roomHost), notifyError("Use html-color-codes.info to find the code for the color you want.\nReverting to default color.", roomHost), false); } /** * @return {undefined} */ function setColor() { var selector = cb.settings.colorscheme; var color = cb.settings.darkcolor.trim(); var clr = cb.settings.lightcolor.trim(); if (selector && "Custom" == selector.substr(0, 6)) { if (isBlank(clr) && isBlank(color)) { notifyErrorBold("Whoops. You selected a custom color scheme but you didn\u0027t fill in the colors. Reverted to default color scheme.", roomHost); } else { if (isBlank(color)) { notifyErrorBold("Whoops. You selected a custom color scheme but you didn\u0027t select a text color. Reverted to default color scheme.", roomHost); } else { if (isBlank(clr) && !isBlank(color)) { if (color) { if ("#" != color.charAt(0)) { color = "#" + color; } } if (isValidColor(color)) { theme_dark = color; theme_light = white; } } else { if (!isBlank(clr)) { if (!isBlank(color)) { if (color) { if ("#" != color.charAt(0)) { color = "#" + color; } } if (clr) { if ("#" != clr.charAt(0)) { clr = "#" + clr; } } if (isValidColor(color)) { if (isValidColor(clr)) { theme_dark = color; theme_light = clr; } } } } } } } } else { if (!(isBlank(color) && isBlank(clr))) { notifyErrorBold("You defined custom colors, but your color scheme is set to \u0022" + selector + "\u0022. In order to use your custom colors, please set your color scheme to \u0022Custom\u0022", roomHost); } if ("Purple" == selector) { theme_dark = purple_dark; theme_light = purple_light; } else { if ("Pink" == selector) { theme_dark = pink_dark; theme_light = pink_light; } else { if ("Halloween" == selector) { theme_dark = halloween_dark; theme_light = halloween_light; } else { if ("Red" == selector) { theme_dark = red_dark; theme_light = red_light; } else { if ("Christmas" == selector) { theme_dark = christmas_dark; theme_light = christmas_light; } else { if ("Blue" == selector) { theme_dark = blue_dark; theme_light = blue_light; } else { if ("Green" == selector) { theme_dark = green_dark; theme_light = green_light; } } } } } } } } } /** * @param {string} num * @param {string} isXML * @return {undefined} */ function help(num, isXML) { var c = 0; switch(null == num && (num = ""), num) { case "": c = 1; notifyBold("All in one Bot Help Menu", isXML); notify("Type \u0022/abhelp\u00a0x\u0022, where x is one of the following choices, for more detailed information.\nEx: /abhelp\u00a0commands", isXML); notifyPlain("commands\nnicelist\ngreylist\nabout", isXML); break; case "commands": c = 1; notifyBold("All in one Bot Help Menu", isXML); notify("Type \u0022/abhelp\u00a0x\u0022, where x is one of the following choices, for more detailed information.\nEx: /abhelp\u00a0commands", isXML); notifyPlain("/greyson\n/greysoff\n/silencelevel\n/graphiclevel\n/silence\n/unsilence\n/silencelast\n/starttimer\n/stoptimer\n/addtime\n/minustime\n/timeleft\n/cn\n/cnd\n/cndh\n/cnh\n/bc\n/tm\n/tbm\n/tv\n/addnotice\n/removenotice\n/shownotices\n/noticetimer\n/whisper\n/reply\n/ignore\n/unignore\n/ignorelevel\n/emod\n/addnice\n/removenice\n/addgrey\n/removegrey\n/addword\n/leaderboard\n/tipmenu\n/viplist\n/addvip\n/removevip\n/nickmod\n/nickname\n/nicknames\n/kingspam", isXML); break; case "nicelist": notifyBold("The Nice List", isXML); 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.", isXML); c = 1; break; case "greylist": c = 1; notifyBold("The \u0022Grey\u0022 List", isXML); notify("Sometimes, there are users whose comments are annoying, in spite of the fact that they may have tokens or even tip. It isn\u0027t always desireable to silence these people entirely, especially if they\u0027ve 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\u0027t get through to the room. To fix this problem, hosts and mods can add users to the \u0022Grey\u0022 List. Users who are on the grey list will have their messages subjected to the wordlists that apply to greys.", isXML); notify("", isXML); break; case "about": c = 1; notifyBold("About All in one Bot", isXML); notify("All in one Bot is a fork of Ultra Bot, with continuing development by lund0894.\nUltra Bot was written by Justin of the Chaturbate couple britney_and_justin.\nComments, suggestions, requests, and bug reports can be communicated by either tweeting @lund08940, or by posting comments on All in one Bot\u0027s page at chaturbate.com/bots.\nThe purpose of All in one Bot is to make the lives of hosts and mods as easy as possible. It adds popular features such as King Tipper, Leaderboard, and Notifier, pre-silences abusive messages, grants quite a bit of power to moderators, and allows private messages to be sent in the main chat window.", isXML); notify("", isXML); break; case "greyson": ; case "greyon": ; case "grayson": ; case "grayon": ; case "silencegreys": ; case "selencegrays": c = 1; notifyBold("/greyson Help", isXML); notify("/greyson is a command that is usable by moderators and room hosts.\nThe syntax for using greyson is \u0022/greyson\u0022.\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.", isXML); notify("", isXML); break; case "greysoff": ; case "greyoff": ; case "graysoff": ; case "grayoff": ; case "unsilencegreys": ; case "unselencegrays": c = 1; notifyBold("/greysoff Help", isXML); notify("/greysoff is a command that is usable by moderators and room hosts.\nThe syntax for using greysoff is \u0022/greysoff\u0022.\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.", isXML); notify("", isXML); break; case "silencelevel": c = 1; notifyBold("/silencelevel Help", isXML); notify("/silencelevel is a command that is usable by moderators and room hosts.\nThe syntax for using silencelevel is \u0022/silencelevel\u00a0x\u0022, 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.", isXML); notify("", isXML); break; case "graphiclevel": c = 1; notifyBold("/graphiclevel Help", isXML); notify("/graphiclevel is a command that is usable by moderators and room hosts.\nThe syntax for using graphiclevel is \u0022/graphiclevel\u00a0x\u0022, 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.", isXML); notify("", isXML); break; case "silence": c = 1; notifyBold("/silence Help", isXML); notify("/silence is a command that is usable by moderators and room hosts.\nThe syntax for using silence is \u0022/silence x\u0022, where x is the username of the user you want to silence.\nThe effect of /silence is the same as Chaturbate\u0027s silence feature, except that it lasts for the duration of the current session instead of for six hours.\nThe effect of /silence can be reversed by using the command /unsilence.", isXML); notify("", isXML); break; case "unsilence": c = 1; notifyBold("/unsilence Help", isXML); notify("/unsilence is a command that is usable by moderators and room hosts.\nThe syntax for using unsilence is \u0022/unsilence x\u0022, where x is the username of the user you want to unsilence.\nunsilence simply grants voice privileges back to a user who was previously silenced.\nNOTE: /unsilence WILL NOT undo the effect of Chaturbate\u0027s silence feature!\n/unsilence WILL ONLY reverse the effect of /silence!", isXML); notify("", isXML); break; case "silencelast": ; case "sl": c = 1; notifyBold("/silencelast Help", isXML); notify("/silencelast is a command that is usable by moderators and room hosts.\nThe syntax for using silence last is \u0022/silencelast\u0022, this will silence the most recent user that typed in chat.\nThe effect of /silencelast is the same as Chaturbate\u0027s silence feature, except that it lasts for the duration of the current session instead of for six hours.\n/sl is another available command that will silence last.\nThe effect of /silence can be reversed by using the command /unsilence.", isXML); notify("", isXML); break; case "starttimer": c = 1; notifyBold("/starttimer Help", isXML); notify("/starttimer is a command that is usable by moderators and room hosts.\nThe syntax for using starttimer is \u0022/starttimer x\u0022, where x is the desired duration of the timer in minutes.\n/starttimer will accept whole numbers only.\nThe timer will make announcements at five minutes remaining and at one minute remaining.\n/addtime can be used to add time to a currently running timer.\n/timeleft can be used to display the amount of time remaining on the timer.", isXML); notify("", isXML); break; case "stoptimer": ; case "endtimer": c = 1; notifyBold("/stoptimer Help", isXML); notify("/stoptimer is a command that is usable by moderators and room hosts.\nThe syntax for using stoptimer is \u0022/stoptimer\u0022, this will stop the current timer that is running.\n/endtimer is another available command that will stop the timer.", isXML); notify("", isXML); break; case "addtime": c = 1; notifyBold("/addtime Help", isXML); notify("/addtime is a command that is usable by moderators and room hosts.\nThe syntax for using addtime is \u0022/addtime\u00a0x\u0022, where x is the amount of time you want to add in minutes.\n/addtime will accept whole numbers only.\nSee the help section for starttimer for more information on timers.", isXML); notify("", isXML); break; case "minustime": c = 1; notifyBold("/minustime Help", isXML); notify("/minustime is a command that is usable by moderators and room hosts.\nThe syntax for using minustime is \u0022/minustime\u00a0x\u0022, where x is the amount of time you want to subtract in minutes.\n/minustime will accept whole numbers only.\nSee the help section for starttimer for more information on timers.", isXML); notify("", isXML); break; case "timeleft": c = 1; notifyBold("/timeleft Help", isXML); notify("/timeleft is a command that is usable by everyone.\nThe syntax for using timeleft is /timeleft\n/timeleft will display the amount of time left on the timer in the format 00:00:00\nSee the help section for starttimer for more information on timers.", isXML); notify("", isXML); break; case "cn": ; case "sendnotice": c = 1; notifyBold("/cn Help", isXML); 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 \u0022/cn r x\u0022 - 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.", isXML); notify("", isXML); break; case "cnd": c = 1; notifyBold("/cnd Help", isXML); 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 \u0022/cnd r x\u0022 - where x is the message to be sent - will send the message in red instead of the default color for notices.", isXML); notify("", isXML); break; case "cndh": c = 1; notifyBold("/cndh Help", isXML); 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 \u0022/cndh r x\u0022 - where x is the message to be sent - will send the message in red instead of the default color for notices.", isXML); notify("", isXML); break; case "cnh": c = 1; notifyBold("/cnh Help", isXML); 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 \u0022/cnh r x\u0022 - where x is the message to be sent - will send the message in red instead of the default color for notices.", isXML); notify("", isXML); break; case "bc": ; case "pmm": c = 1; notifyBold("/bc Help", isXML); notify("/bc is a command that is usable by moderators.\nThe syntax for this command is /bc x, where x is the message you want to send privately to the room host.\nThis can also be done using /pmm x.", isXML); notify("", isXML); break; case "tm": c = 1; notifyBold("/tm Help", isXML); 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.", isXML); notify("", isXML); break; case "tbm": c = 1; notifyBold("/tbm Help", isXML); 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.", isXML); notify("", isXML); break; case "tv": c = 1; notifyBold("/tv Help", isXML); 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.", isXML); notify("", isXML); break; case "addnotice": ; case "addnote": c = 1; notifyBold("/addnotice Help", isXML); notify("/addnotice is a command that is usable by moderators and room hosts.\nThe syntax for using add notice is \u0022/addnotice x\u0022, 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.", isXML); notify("", isXML); break; case "removenotice": ; case "removenote": c = 1; notifyBold("/removenotice Help", isXML); notify("/removenotice is a command that is usable by moderators and room hosts.\nThe syntax for using remove notice is \u0022/removenotice x\u0022, 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.", isXML); notify("", isXML); break; case "shownotices": c = 1; notifyBold("/shownotices Help", isXML); notify("/shownotices is a command that is usable by moderators and room hosts.\nThe syntax for using show notices is \u0022/shownotices.\u0022\nShow notices will show all the notice messages in the rotating notifier, the number next to each notice is used in the command /removenotice.", isXML); notify("", isXML); break; case "noticetimer": c = 1; notifyBold("/noticetimer Help", isXML); notify("/noticetimer is a command that is usable by moderators and room hosts.\nThe syntax for using notice timer is \u0022/noticetimer x\u0022, 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.", isXML); notify("", isXML); break; case "whisper": ; case "w": ; case "tell": ; case "t": ; case "pm": c = 1; notifyBold("/whisper Help", isXML); notify("/whisper is a command that is usable by everyone.\nThe syntax for using whisper is \u0022/whisper\u00a0x\u00a0y\u0022, 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.", isXML); notify("", isXML); break; case "reply": ; case "r": c = 1; notifyBold("/reply Help", isXML); notify("/reply is a command that is usable by everyone.\nThe syntax for using whisper is \u0022/reply\u00a0x\u0022, 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.", isXML); notify("", isXML); break; case "ignore": c = 1; notifyBold("/ignore Help", isXML); notify("/ignore is a command that is usable by everyone.\nThe syntax for using ignore is \u0022/ignore\u00a0x\u0022, 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.", isXML); notify("", isXML); break; case "unignore": c = 1; notifyBold("/unignore Help", isXML); notify("/unignore is a command that is usable by everyone.\nThe syntax for using unignore is \u0022/unignore\u00a0x\u0022, 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.", isXML); notify("", isXML); break; case "ignorelevel": c = 1; notifyBold("/ignorelevel Help", isXML); notify("/ignorelevel is a command that determines which users you accept whispers from. It is usable by everyone.\nThe syntax for using ignorelevel is \u0022/ignorelevel\u00a0x\u0022, 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\u0027s 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.", isXML); notify("", isXML); break; case "emod": c = 1; notifyBold("/emod Help", isXML); notify("/emod is a command that is usable by moderators and room hosts.\nThe syntax for using emod is \u0022/emod\u00a0x\u00a0y\u0022, where x is either \u0022add\u0022 or \u0022remove\u0022 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.", isXML); notify("", isXML); break; case "blocknotice": c = 1; notifyBold("/blocknotice Help", isXML); notify("/blocknotice is a command that is usable by moderators and room hosts.\nThe syntax for using blocknotice is \u0022/blocknotice\u00a0x\u0022, where x is either \u0022on\u0022 or \u0022off\u0022.\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.)", isXML); notify("", isXML); break; case "addnice": c = 1; notifyBold("/addnice Help", isXML); notify("/addnice is a command that is usable by moderators and room hosts.\nThe syntax for using addnice is \u0022/addnice x\u0022, where x is the username of the user you want to add to the nice list.\nAdding a user to the nice list guarantees that user voice and graphic usage privileges regardless of the silence, graphic, and ignore level settings. Using /silence or /ignore will still silence or ignore a user on the nice list.\nUsers can be removed from the nice list by using the command /removenice.\nSee the help sections for silencelevel, graphiclevel, and ignorelevel for more information on the global settings or the help section for nicelist for more information on the nice list.", isXML); notify("", isXML); break; case "removenice": c = 1; notifyBold("/removenice Help", isXML); notify("/removenice is a command that is usable by moderators and room hosts.\nThe syntax for using removenice is \u0022/removenice x\u0022, 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.", isXML); notify("", isXML); break; case "addgrey": ; case "addgray": c = 1; notifyBold("/addgrey Help", isXML); notify("/addgrey is a command that is usable by moderators and room hosts.\nThe syntax for using addgrey is \u0022/addgrey x\u0022, where x is the username of the user you want to add to the grey list.\nAdding a user to the grey list subjects them to the same wordlists that apply to greys. \nUsers can be removed from the grey list by using the command /removegrey.\nSee the help section for greylist for more information on the grey list.", isXML); notify("", isXML); break; case "removegrey": ; case "removegray": c = 1; notifyBold("/removegrey Help", isXML); notify("/removegrey is a command that is usable by moderators and room hosts.\nThe syntax for using removegrey is \u0022/removegrey x\u0022, 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.", isXML); notify("", isXML); break; case "abhelp": ; case "ubhelp": c = 1; notifyBold("/abhelp\u00a0Help", isXML); notify("/abhelp\u00a0is a command that is usable by everyone.\nThe syntax for using abhelp is \u0022/abhelp\u00a0x\u0022, where x is the subsection of the help menu that you want to access.", isXML); notify("", isXML); break; case "addword": c = 1; notifyBold("/addword Help", isXML); notify("/addword is a command that is usable by moderators and room hosts.\nThe syntax for using add word is \u0022/addword x\u0022, 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.", isXML); notify("", isXML); break; case "leaderboard": c = 1; notifyBold("/leaderboard Help", isXML); notify("/leaderboard is a command that is usable by everyone.\nThe syntax for using leaderboard is \u0022/leaderboard\u0022.\n/leaderboard shows the top 3 tippers of the current session.", isXML); notify("", isXML); break; case "kingspam": c = 1; notifyBold("/kingspam Help", isXML); 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 \u0022Tip x to be the new King!\u0022", isXML); notify("", isXML); break; case "leaderboardspam": c = 1; notifyBold("/leaderboardspam Help", isXML); 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.", isXML); notify("", isXML); break; case "viplist": c = 1; notifyBold("The VIP List", isXML); notify("Sometimes, there\u0027re users who are trusted regulars, and then the room host decides to do a \u0022CrazyTicket\u0022 show, but these users don\u0027t have tokens to buy a ticket. It isn\u0027t 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 \u0022/export\u0022 command.\nTo show the VIP list at any time, type /viplist.", isXML); notify("", isXML); break; case "addvip": c = 1; notifyBold("/addvip Help", isXML); notify("/addvip is a command that is usable by moderators and room hosts.\nThe syntax for using addvip is \u0022/addvip x\u0022, 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 \u0022CrazyTicket\u0022 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.", isXML); notify("", isXML); break; case "removevip": c = 1; notifyBold("/removevip Help", isXML); notify("/removevip is a command that is usable by moderators and room hosts.\nThe syntax for using removevip is \u0022/removevip x\u0022, 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.", isXML); notify("", isXML); break; case "nickmod": c = 1; notifyBold("/nickmod Help", isXML); notify("/nickmod is a command that is usable by the room hosts.\nThe syntax for using nickmod is \u0022/nickmod\u0022.\nUsing this command will enable or disable the ability for mods to use the nickname feature.", isXML); notify("", isXML); break; case "nickname": c = 1; notifyBold("/nickname Help", isXML); notify("/nickname is a command that is usable by moderaters and the room hosts.\nThe syntax for using nickname is \u0022/nickname x y\u0022, 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.", isXML); notify("", isXML); break; case "nicknames": c = 1; notifyBold("/nicknames Help", isXML); notify("/nicknames is a command that is usable by moderaters and the room hosts.\nThe syntax for using nicknames is \u0022/nicknames\u0022.\nthis command will output a list of all assigned nicknames.", isXML); notify("", isXML); break; case "tipmenu": c = 1; notifyBold("/tipmenu Help", isXML); notify("/tipmenu is a command that is usable by everyone.\nThe syntax for using tip menu is \u0022/tipmenu\u0022.\n/Tip menu shows the models tip menu.", isXML); notify("", isXML); } if (0 == c) { notifyError(num + " is not a valid subsection of the help menu. Type \u0022/abhelp\u0022 to access the main help menu.", isXML); } } /** * @param {?} value * @return {?} */ function isFC(value) { return value in fcMembers; } /** * @param {?} timeoutKey * @return {undefined} */ function makeFC(timeoutKey) { fcMembers[timeoutKey] = { u : 1 }; } /** * @param {?} timeoutKey * @return {undefined} */ function unmakeFC(timeoutKey) { delete fcMembers[timeoutKey]; } /** * @param {?} timeoutKey * @return {undefined} */ function setFC(timeoutKey) { fcMembers[timeoutKey] = { u : 1 }; } /** * @param {?} timeoutKey * @return {undefined} */ function unsetFC(timeoutKey) { delete fcMembers[timeoutKey]; } /** * @param {?} value * @return {?} */ function isSFC(value) { return value in sfcMembers; } function isTFC(value) { return value in tfcMembers; } /** * @param {?} timeoutKey * @return {undefined} */ function makeSFC(timeoutKey) { sfcMembers[timeoutKey] = { u : 1 }; } function makeTFC(timeoutKey) { tfcMembers[timeoutKey] = { u : 1 }; } /** * @param {?} timeoutKey * @return {undefined} */ function unmakeSFC(timeoutKey) { delete sfcMembers[timeoutKey]; } function unmakeTFC(timeoutKey) { delete tfcMembers[timeoutKey]; } /** * @param {?} timeoutKey * @return {undefined} */ function setSFC(timeoutKey) { sfcMembers[timeoutKey] = { u : 1 }; } function setTFC(timeoutKey) { tfcMembers[timeoutKey] = { u : 1 }; } /** * @param {?} timeoutKey * @return {undefined} */ function unsetSFC(timeoutKey) { delete sfcMembers[timeoutKey]; } function unsetTFC(timeoutKey) { delete tfcMembers[timeoutKey]; } /** * @return {undefined} */ function grabSettings() { if (cb.log("starting grabbing settings"), cb.settings.fcMemberList) { var resultItems = cb.settings.fcMemberList.split(","); var i = 0; for (;i < resultItems.length;i++) { var eventName = resultItems[i].toLowerCase().replace(/ /g, ""); fcMembers[eventName] = { u : 1 }; } } if (cb.settings.sfcMemberList) { var codeSegments = cb.settings.sfcMemberList.split(","); i = 0; for (;i < codeSegments.length;i++) { eventName = codeSegments[i].toLowerCase().replace(/ /g, ""); sfcMembers[eventName] = { u : 1 }; } } if (cb.settings.tfcMemberList) { var codeSegments = cb.settings.tfcMemberList.split(","); i = 0; for (;i < codeSegments.length;i++) { eventName = codeSegments[i].toLowerCase().replace(/ /g, ""); tfcMembers[eventName] = { u : 1 }; } } cb.log("finished grabbing settings"); } cb.settings_choices = [{ name : "colorscheme", label : "1.) PERSONALIZATION ........................................... Color Scheme:", type : "choice", choice1 : "Purple", choice2 : "Pink", choice3 : "Blue", choice4 : "Red", choice5 : "Green", choice6 : "Halloween", choice7 : "Christmas", choice8 : "Custom (Please define below)", required : false }, { name : "darkcolor", label : "Custom Text Color (Html #code)", type : "str", defaultValue : "[Optional - Set color scheme to \u0022Custom\u0022 above]", required : false }, { name : "lightcolor", label : "Custom Highlight Color (Html #code)", type : "str", defaultValue : "[Optional - Set color scheme to \u0022Custom\u0022 above]", required : false }, { name : "crazyNoteColorscheme", label : "Crazy Note Color Scheme (Only for /cn /cnd /cnh /cndh) - Theme is colors picked above", type : "choice", choice1 : "Theme", choice2 : "Custom (Please define below)", defaultValue : "Theme", required : false }, { name : "crazyNoteText", label : "Custom Text Color - HTML color code (without #)", type : "str", defaultValue : "[Optional - Set color scheme to \u0022Custom\u0022 above]", required : false }, { name : "crazyNoteBackground", label : "Custom Highlight Color - HTML color code (without #)", type : "str", defaultValue : "[Optional - Set color scheme to \u0022Custom\u0022 above]", required : false }, { name : "enterMessage", label : "Welcome Message", type : "str", minLength : 1, maxLength : 1E3, defaultValue : "[Optional - Leave blank in busy rooms, as it can cause CB bots to crash]", required : false }, { name : "capsToggle", label : "2.) ROOM CONTROL ................ Convert ALL CAPS to lowercase?", type : "choice", choice1 : "Yes", choice2 : "No", choice3 : "Only for greys", defaultValue : "Only for greys", required : false }, { name : "stickyToggle", label : "Prevent sticky keyyyyyyyyyyyyys?", type : "choice", choice1 : "Yes", choice2 : "No", choice3 : "Only for greys", defaultValue : "Only for greys", required : false }, { name : "defaultGraphicLevel", label : "Default Graphic Level (Who can use graphics?)", type : "choice", choice1 : "0 - (Everyone)", choice2 : "1 - (Color names only)", choice3 : "2 - (Dark blue names and higher)", choice4 : "3 - (Users who have tipped)", choice5 : "4 - (Only mods and fans)", defaultValue : "1 - (Color names only)", required : false }, { name : "defaultSilenceLevel", label : "Default Silence Level (Who can talk in chat?)", type : "choice", choice1 : "0 - (Everyone)", choice2 : "1 - (Color names only)", choice3 : "2 - (Dark blue names and higher)", choice4 : "3 - (Users who have tipped)", choice5 : "4 - (Only mods and fans)", defaultValue : "0 - (Everyone)", required : false }, { name : "niceList", label : "Nice List (Users who can always talk/use graphics)", type : "str", minLength : 1, maxLength : 1E3, defaultValue : "[Optional - Exact usernames, separated by commas]", required : false }, { name : "greyList", label : "Grey List (Usernames any color) who should always be subjected to grey wordlist and grey graphic level)", type : "str", minLength : 1, maxLength : 1E3, defaultValue : "[Optional - Exact usernames, separated by commas]", required : false }, { name : "silenceList", label : "Silence List (Users who are permanently silenced)", type : "str", minLength : 1, maxLength : 1E3, defaultValue : "[Optional - Exact usernames, separated by commas]", required : false }, { name : "silenceTipToggle", label : "Use tip to be un-silenced? (Only un-silences users silenced with the bot, not cb silences)", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "No", required : false }, { name : "silenceTipAmount", label : "Tip amount to become un-silenced", type : "int", minValue : 1, defaultValue : "100" }, { name : "greyWordlistToggle", label : "3.) GREY WORDLIST ............. Use grey wordlist feature for greys?", type : "choice", choice1 : "Yes", choice2 : "No (Skip to section 4)", defaultValue : "Yes", required : false }, { name : "greyWordlistNotice", label : "Notify sender when his/her message gets blocked?(all wordlist)", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "No", required : false }, { name : "greyWordlistShowModerators", label : "Notify moderators of blocked grey wordlist messages?", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "No", required : false }, { name : "greyWordlistShowBroadcaster", label : "Notify broadcaster of blocked grey wordlist messages?", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "No", required : false }, { name : "greyWordlistLevel", label : "Grey wordlist applies to", type : "choice", choice1 : "Only greys", choice2 : "Everyone", defaultValue : "Only greys", required : false }, { name : "customWordlistToggle", label : "4.) CUSTOM WORDLIST ................... Use custom wordlist feature?", type : "choice", choice1 : "Yes", choice2 : "No (Skip to section 5)", defaultValue : "Yes", required : false }, { name : "customWordlistShowModerators", label : "Notify moderators of blocked custom wordlist messages?", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "No", required : false }, { name : "customWordlistShowBroadcaster", label : "Notify broadcaster of blocked custom wordlist messages?", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "No", required : false }, { name : "customWordlist", label : "Custom wordlist", type : "str", minLength : 1, maxLength : 1E3, defaultValue : "[Optional - Exact words or phrases, separated by commas]", required : false }, { name : "customWordlistLevel", label : "Custom wordlist applies to", type : "choice", choice1 : "Only greys", choice2 : "Everyone", defaultValue : "Only greys", required : false }, { name : "spamWordlistToggle", label : "5.) SPAM WORDLIST .......................... Use spam wordlist feature?", type : "choice", choice1 : "Yes", choice2 : "No (Skip to section 6)", defaultValue : "Yes", required : false }, { name : "spamWordlistShowModerators", label : "Notify moderators of blocked spam wordlist messages?", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "No", required : false }, { name : "spamWordlistShowBroadcaster", label : "Notify broadcaster of blocked spam wordlist messages?", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "No", required : false }, { name : "spamWordlistLevel", label : "Spam wordlist applies to", type : "choice", choice1 : "Only greys", choice2 : "Everyone", defaultValue : "Only greys", required : false }, { name : "autoSilenceSpamToggle", label : "Automatically silence users who post spam?", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "Yes", required : false }, { name : "whisperToggle", label : "6.) WHISPERS ............................................... Use whisper feature?", type : "choice", choice1 : "Yes", choice2 : "No (Skip to section 7)", defaultValue : "Yes", required : false }, { name : "roomWhisperLevel", label : "Default whisper level (Who can send whispers?)", type : "choice", choice1 : "0 - (Everyone)", choice2 : "1 - (Color names only)", choice3 : "2 - (Dark blue names and higher)", choice4 : "3 - (Users who have tipped)", choice5 : "4 - (Only mods and fans)", defaultValue : "0 - (Everyone)", required : false }, { name : "hostWhisperLevel", label : "Broadcaster whisper level (Who can send YOU whispers?)", type : "choice", choice1 : "0 - (Everyone)", choice2 : "1 - (Color names only)", choice3 : "2 - (Dark blue names and higher)", choice4 : "3 - (Users who have tipped)", choice5 : "4 - (Only mods and fans)", defaultValue : "4 - (Only mods and fans)", required : false }, { name : "kingTipper", label : "7.) KING TIPPER ................................... Use \u0022King Tipper\u0022 feature?", type : "choice", choice1 : "Yes", choice2 : "No (Skip to section 8)", defaultValue : "Yes", required : false }, { name : "kingMin", label : "Minimum tip amount to become King:", type : "int", minValue : 1, maxValue : 1E3, defaultValue : 25, required : false }, { name : "kingTipperSpam", label : "Periodically announce tip required to become King?", type : "choice", choice1 : "Yes", choice2 : "No (Skip to section 7)", defaultValue : "Yes", required : false }, { name : "kingTipperTimer", label : "Interval (in mins) for king announcement", type : "int", minValue : 1, maxValue : 60, defaultValue : 7, required : false }, { name : "kingMessage", label : "Message to print here... Tip xx to be the new ______", type : "str", minLength : 1, maxLength : 30, defaultValue : "King", required : true }, { name : "crownIcon", label : "Crown Icon: used for King tipper (Use :GIFNAME with colon)", type : "str", minLength : 0, maxLength : 20, required : false, defaultValue : ":crownsilver" }, { name : "kingTipperToggle", label : "8.) ALL TIME HIGH TIP KING........................................ Use All Time High Tip King feature?", type : "choice", choice1 : "Yes", choice2 : "No (Skip to section 9)", defaultValue : "No (Skip to section 9)", required : true }, { name : "kingTipperName", label : "Reigning high tip king (username)", type : "str", minLength : 0, maxLength : 40, required : false, defaultValue : "[Username required when in use]" }, { name : "kingTipperTip", label : "Reigning high tip (token amount)", type : "int", minValue : 1, defaultValue : "1" }, { name : "kingTipperbgColor", label : "Background color for king tipper - HTML color code (without #)", type : "str", minLength : 0, maxLength : 6, required : false, defaultValue : "FFFFFF" }, { name : "kingTippertxtColor", label : "Text color for king tipper - HTML color code (without #)", type : "str", minLength : 0, maxLength : 6, required : false, defaultValue : "000000" }, { name : "kingTipperIcon", label : "Icon for king tipper (use :GIFNAME with colon)", type : "str", minLength : 0, maxLength : 40, required : false, defaultValue : ":crowngold" }, { name : "kingTipperNotifier", label : "Interval (in mins) for rotating king tipper message", type : "int", minValue : 1, maxValue : 60, defaultValue : 2, required : false }, { name : "leaderBoard", label : "9.) LEADERBOARD .............................. Use Leaderboard feature?", type : "choice", choice1 : "Yes", choice2 : "No (Skip to section 10)", defaultValue : "Yes", required : false }, { name : "leaderBoardSpam", label : "Periodically announce top 3 tippers?", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "Yes", required : false }, { name : "leaderBoardTimer", label : "Interval (in mins) for leaderboard announcement", type : "int", minValue : 1, maxValue : 60, defaultValue : 7, required : false }, { name : "notifierTip", label : "10.) TIP MESSAGES ..................... Show message when a user tips?", type : "choice", choice1 : "Yes", choice2 : "Privately to tipper only", choice3 : "No (Skip to section 11)", defaultValue : "Yes", required : false }, { name : "tipMessage", label : "Message to display", type : "str", minLength : 1, maxLength : 1E3, defaultValue : "Thank you for tipping, {username}!", required : false }, { name : "tipMessageMin", label : "Minimum tip to trigger message", type : "int", minValue : 1, maxValue : 1E6, defaultValue : 15, required : false }, { name : "tipMessageColorscheme", label : "Tip Message Color Scheme - Theme is Yellow and Black to match the tip colors", type : "choice", choice1 : "Theme", choice2 : "Custom (Please define below)", defaultValue : "Theme", required : false }, { name : "tipMessageText", label : "Custom Text Color - HTML color code (without #)", type : "str", defaultValue : "[Optional - Set color scheme to \u0022Custom\u0022 above]", required : false }, { name : "tipMessageBackground", label : "Custom Highlight Color - HTML color code (without #)", type : "str", defaultValue : "[Optional - Set color scheme to \u0022Custom\u0022 above]", required : false }, { name : "tipTitles", label : "11.) TIP TITLES ........................... Display users\u0027 tip totals as titles?", type : "choice", choice1 : "Yes", choice2 : "No (Skip to section 12)", defaultValue : "Yes", required : false }, { name : "invalidToggle", label : "12.) MISC ................... Send error message for invalid commands?", type : "choice", choice1 : "Yes", choice2 : "No (Skip to section 13)", defaultValue : "Yes", required : false }, { name : "specialaccessMod", label : "[Optional] Username of Special Access Mod - This (username, any color) will be able to use all bot commands to make it easier for the model", type : "str", minLength : 0, maxLength : 30, required : false, defaultValue : "" }, { name : "vipList", label : "Enter the names of any users you would like to grant free access to a future \u0022CrazyTicket\u0022 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 \u0022/export\u0022 command.", type : "str", minLength : 1, maxLength : 2048, required : false }, { name : "useLight", label : "Use flashing light gif with Timer notices", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "No", required : false }, { name : "show_alias", type : "choice", choice2 : "No (Skip to section 14)", choice1 : "Yes", defaultValue : "No (Skip to section 14)", label : "13.) NICKNAMES .................................................. Use Nicknames?" }, { name : "nicknames", type : "str", minLenght : 0, required : true, defaultValue : "user@nickname", label : "Nicknames user@nick e.g lund0894@Lund" }, { name : "allow_mod", type : "choice", choice2 : "No", choice1 : "Yes", defaultValue : "Yes", label : "Allow Mods to edit Nicknames" }, { name : "fanclubToggle", label : "14.) #1 FANCLUB .................................................... Use FANCLUB?", type : "choice", choice1 : "Yes", choice2 : "No (Skip to section 15)", defaultValue : "No (Skip to section 15)", required : true }, { name : "fanclubSiteIntegration", label : "Include chaturbate (green) fan club members in first FANCLUB?", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "Yes", required : true }, { name : "fanclubName", label : "Name of FANCLUB", type : "str", minLength : 0, maxLength : 30, required : true, defaultValue : "FANCLUB" }, { name : "fanclubtips", label : "Tip to join FANCLUB?", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "No", required : true }, { name : "fcTip", label : "Tip amount to join FANCLUB ", type : "int", minValue : 1, defaultValue : "1" }, { name : "reBGColor", label : "Room Enter/Leave Background color for FANCLUB - HTML color code (without #)", type : "str", minLength : 0, maxLength : 6, required : false, defaultValue : "FFFFFF" }, { name : "reTextColor", label : "Room Enter/Leave Text color for FANCLUB - HTML color code (without #)", type : "str", minLength : 0, maxLength : 6, required : false, defaultValue : "000000" }, { name : "fcTextColor", label : "Text color for FANCLUB members messages in chat - HTML color code (without #)", type : "str", minLength : 0, maxLength : 6, required : false, defaultValue : "000000" }, { name : "fcBGColor", label : "Background color for FANCLUB members messages in chat - HTML color code (without #)", type : "str", minLength : 0, maxLength : 6, required : false, defaultValue : "FFFFFF" }, { name : "fcMemberList", label : "List of current FANCLUB members, separated by commas (and they need to be the CB username exactly)", type : "str", minLength : 0, maxLength : 10240, required : false, defaultValue : "" }, { name : "fanclubIcon", label : "Fanclub Member Icon: (Use :GIFNAME with colon) and/or Text (Use [FANCLUBNAME] with brackets)", type : "str", minLength : 0, maxLength : 40, required : false, defaultValue : ":customfanclub1" }, { name : "secondfanclubToggle", label : "Do you want to use a SECOND FANCLUB? (users added to this club will be removed from first fan club)", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "No", required : false }, { name : "secondfanclubName", label : "Name of SECOND FANCLUB", type : "str", minLength : 0, maxLength : 30, required : true, defaultValue : "SECOND FANCLUB" }, { name : "secondfanclubtips", label : "Tip to join SECOND FANCLUB?", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "No", required : true }, { name : "sfcTip", label : "Tip amount to join SECOND FANCLUB ", type : "int", minValue : 1, defaultValue : "2" }, { name : "secondreBGColor", label : "Room Enter/Leave Background color for SECOND FANCLUB - HTML color code (without #) - Default is White", type : "str", minLength : 0, maxLength : 6, required : false, defaultValue : "FFFFFF" }, { name : "secondreTextColor", label : "Room Enter/Leave Text color for SECOND FANCLUB - HTML color code (without #) - Default is Black", type : "str", minLength : 0, maxLength : 6, required : false, defaultValue : "000000" }, { name : "secondBGColor", label : "Highlight color for SECOND FANCLUB - HTML color code (without #) - Default is White", type : "str", minLength : 0, maxLength : 6, required : false, defaultValue : "FFFFFF" }, { name : "secondTextColor", label : "Text color for SECOND FANCLUB - HTML color code (without #) - Default is Black", type : "str", minLength : 0, maxLength : 6, required : false, defaultValue : "000000" }, { name : "sfcMemberList", label : "List of current SECOND FANCLUB members, separated by commas (and they need to be the CB username exactly)", type : "str", minLength : 0, maxLength : 10240, required : false, defaultValue : "" }, { name : "secondfanclubIcon", label : "Second Fanclub Member Icon (use :GIFNAME with colon) and/or Text (use [FANCLUBNAME] with brackets)", type : "str", minLength : 0, maxLength : 40, required : false, defaultValue : ":customfanclub2" }, { name : "thirdfanclubToggle", label : "WIP - Do you want to use a THIRD FANCLUB? (users added to this club will be removed from first two fan clubs)", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "No", required : false }, { name : "thirdfanclubName", label : "Name of THIRD FANCLUB", type : "str", minLength : 0, maxLength : 30, required : true, defaultValue : "THIRD FANCLUB" }, { name : "thirdfanclubtips", label : "Tip to join THIRD FANCLUB?", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "No", required : true }, { name : "tfcTip", label : "Tip amount to join THIRD FANCLUB ", type : "int", minValue : 1, defaultValue : "3" }, { name : "thirdreBGColor", label : "Room Enter/Leave Background color for THIRD FANCLUB - HTML color code (without #) - Default is White", type : "str", minLength : 0, maxLength : 6, required : false, defaultValue : "FFFFFF" }, { name : "thirdreTextColor", label : "Room Enter/Leave Text color for THIRD FANCLUB - HTML color code (without #) - Default is Black", type : "str", minLength : 0, maxLength : 6, required : false, defaultValue : "000000" }, { name : "thirdBGColor", label : "Highlight color for THIRD FANCLUB - HTML color code (without #) - Default is White", type : "str", minLength : 0, maxLength : 6, required : false, defaultValue : "FFFFFF" }, { name : "thirdTextColor", label : "Text color for THIRD FANCLUB - HTML color code (without #) - Default is Black", type : "str", minLength : 0, maxLength : 6, required : false, defaultValue : "000000" }, { name : "tfcMemberList", label : "List of current THIRD FANCLUB members, separated by commas (and they need to be the CB username exactly)", type : "str", minLength : 0, maxLength : 10240, required : false, defaultValue : "" }, { name : "thirdfanclubIcon", label : "Third Fanclub Member Icon (use :GIFNAME with colon) and/or Text (use [FANCLUBNAME] with brackets)", type : "str", minLength : 0, maxLength : 40, required : false, defaultValue : ":customfanclub3" }, { name : "notifierSpam", label : "15.) ROTATING NOTIFIER ............................. Use rotating notifier?", type : "choice", choice1 : "Yes", choice2 : "No (Skip to section 16)", defaultValue : "Yes", required : false }, { name : "notifierTimer", label : "Interval (in mins) for rotating notices", type : "int", minValue : 1, maxValue : 60, defaultValue : 3, required : false }, { name : "spamMessage1", label : "Use {newline} between items for multi line notices...Notice #1", type : "str", minLength : 1, maxLength : 1E3, defaultValue : "", required : false }, { name : "spamMessage2", label : "Notice #2", type : "str", minLength : 1, maxLength : 1E3, defaultValue : "", required : false }, { name : "spamMessage3", label : "Notice #3", type : "str", minLength : 1, maxLength : 1E3, defaultValue : "", required : false }, { name : "spamMessage4", label : "Notice #4", type : "str", minLength : 1, maxLength : 1E3, defaultValue : "", required : false }, { name : "spamMessage5", label : "Notice #5", type : "str", minLength : 1, maxLength : 1E3, defaultValue : "", required : false }, { name : "spamMessage6", label : "Notice #6", type : "str", minLength : 1, maxLength : 1E3, defaultValue : "", required : false }, { name : "spamMessage7", label : "Notice #7", type : "str", minLength : 1, maxLength : 1E3, defaultValue : "", required : false }, { name : "spamMessage8", label : "Notice #8", type : "str", minLength : 1, maxLength : 1E3, defaultValue : "", required : false }, { name : "spamMessage9", label : "Notice #9", type : "str", minLength : 1, maxLength : 1E3, defaultValue : "", required : false }, { name : "spamMessage10", label : "Notice #10", type : "str", minLength : 1, maxLength : 1E3, defaultValue : "", required : false }, { name : "tipMenuToggle", label : "16.) TIP MENU ............................................... Use Tip Menu feature? This will print, USERNAME has tipped for MENU ITEM, when one of the values is tipped", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "No", required : false }, { name : "tipMenuColorscheme", label : "Tip Menu Color Scheme - Theme is colors picked above in personalization", type : "choice", choice1 : "Theme", choice2 : "Custom (Please define below)", defaultValue : "Theme", required : false }, { name : "txtcolor", label : "Custom Text Color - HTML color code (without #)", type : "str", defaultValue : "[Optional - Set color scheme to \u0022Custom\u0022 above]", required : false }, { name : "bgcolor", label : "Custom Highlight Color - HTML color code (without #)", type : "str", defaultValue : "[Optional - Set color scheme to \u0022Custom\u0022 above]", required : false }, { name : "sepchar", type : "choice", choice1 : "Vertical Bar", choice2 : "Heart", choice3 : "Pink Glitter", choice4 : "Flowers", choice5 : "Bow", choice6 : "Pixel Heart", choice7 : "Pink Sparkle", choice8 : "Custom [Enter Below]", defaultValue : "Vertical Bar", label : "Separator character" }, { name : "customSep", label : "Custom Separator (use :GIFNAME with colon)", type : "str", minLength : 0, maxLength : 60, required : false, defaultValue : "[Optional - Set Separator Character to \u0022Custom\u0022 above]" }, { name : "tipMenuNotifierToggle", label : "Display the tip menu at the interval?", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "No", required : false }, { name : "tipmenunotifier", label : "Interval (in mins) for rotating tip menu", type : "int", minValue : 1, maxValue : 60, defaultValue : 1, required : false }, { name : "tipMenuMessageNotifierToggle", label : "Display the tip menu messages seen below at the interval?", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "No", required : false }, { name : "tipmenumessagenotifier", label : "Interval (in mins) for tip menu rotating messages", type : "int", minValue : 1, maxValue : 60, defaultValue : 1, required : false }, { name : "msg1", type : "str", required : true, label : "Message 1", defaultValue : "Tip Menu is active, use /tipmenu to see the tip menu" }, { name : "msg2", type : "str", required : false, label : "Message 2 (Optional)" }, { name : "msg3", type : "str", required : false, label : "Message 3 (Optional)" }, { name : "item1", type : "str", required : false, label : "Tip Menu Item 1 (Use this Format: 10--flash) Also: Do not use any special characters such as parentheses () " }]; for (var i=2; i <= 30; i++) cb.settings_choices.push ({ name : "item" + i, type : "str", required : false, label : "Tip Menu Item " + i }); var roomHost = cb.room_slug; var dev = "chris0x2048"; var sm = "chris0x6969"; var samod = cb.settings.specialaccessMod; var tipArray = new Array; var tipArraySorted = true; var tipTotal = 0; var modArray = new Array; modArray[0] = roomHost; var emodArray = new Array; var modAndEmodArray = new Array; var modBlockMsgArray = new Array; var lastBlocked = new Array; var niceArray = new Array; var greyArray = new Array; var silenceArray = new Array; var lastToUseSL = null; var lastToGetSLed = null; var ignoreArray = new Array; var numIgnorers = 0; var whisArray = new Array; var numWhis = 0; var whis = ""; var silenceLevel = 0; var graphicLevel = 1; var startTime = 0; var timerDuration = 0; var timerTimeout = 0; var oneTimeout = 0; var fiveTimeout = 0; var timeRemaining = 0; var currentKing = ""; var kingTip = 0; var kingMin = parseInt(cb.settings.kingMin); var kingTimer = parseInt(cb.settings.kingTipperTimer); var kingTimeout = 0; var ldrArray = [["", 0], ["", 0], ["", 0]]; var ldrTimer = parseInt(cb.settings.leaderBoardTimer); var ldrTimeout = 0; var initialize = 0; var kingTipperSpam = 0; var notifierSpamTGL = 0; var leaderboardSpam = 0; var noticeArray = []; var noticeNum = 0; var notifierTimer = parseInt(cb.settings.notifierTimer); var notifierTimeout = 0; var customWordlistRegex = ""; var minuteMS = parseInt(6E4); var dashLine = "\u2014".repeat(28); var kingtippertip = cb.settings.kingTipperTip; var kingtippertipreplace = parseInt(kingtippertip + 1); var kingtippername = cb.settings.kingTipperName; var kingtippericon = cb.settings.kingTipperIcon; var tipMenuTimer = parseInt(cb.settings.tipmenunotifier); var tipMenuTimeout = 0; var tipMenuSpam = 0; var tipMenuMessageTimer = parseInt(cb.settings.tipmenumessagenotifier); var tipMenuMessageTimeout = 0; var tipMenuMessageSpam = 0; var messArray = new Array; var messNum = 0; var vipArray = []; var black = "#000000"; var white = "#FFFFFF"; var purple_dark = "#A900B2"; var purple_light = "#E9D5DF"; var christmas_dark = "#FF0000"; var christmas_light = "#4CD000"; var blue_dark = "#000000"; var blue_light = "#98CBFC"; var pink_dark = "#A900B2"; var pink_light = "#FFDFFE"; var red_dark = "#000000"; var red_light = "#FF8989"; var halloween_dark = "#F87217"; var halloween_light = "#000000"; var green_dark = "#000000"; var green_light = "#00FF89"; var black_dark = "#000000"; var black_light = "#000000"; var mod_yellow = "#FFFF33"; var bb_dark = "#000000"; var bb_light = "#E7E7E7"; var bb_lt_light = "#E7E7E7"; var bb_lt_dark = "#000000"; var error_dark = red_dark; var error_light = red_light; var success_dark = green_dark; var success_light = green_light; var theme_dark = purple_dark; var theme_light = purple_light; var bullets = " \u2022 \u2022 \u2022 "; var crown = ":crownprincess"; var fcMembers = {}; var sfcMembers = {}; var tfcMembers = {}; var i = 0; var n = 0; var ii = 0; var MAXITEMS = 3; var 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 = {}; var users = {}; var app_notice_newline = "\n: "; var BBnicknames; var allow_mod; var show_alias; var regularExp_ListSplit = /[,\s]+/; var twcRegex = /t.?k.?n.?wh.?r.?_c.?nt.?/i; cb.setTimeout(kingTipperNotifier, 6E4 * cb.settings.kingTipperNotifier); /** * @param {Function} next * @param {number} deepDataAndEvents * @return {?} */ var setTimeout = function a$$109(next, deepDataAndEvents) { /** * @return {undefined} */ function onTimeout() { if (!event.cancelled) { next(); } } if (!(this instanceof a$$109)) { return new a$$109(next, deepDataAndEvents); } var event = this; appTimeout(onTimeout, deepDataAndEvents); }; /** * @param {number} data * @return {undefined} */ var clearTimeout = function(data) { if (null != data) { data.cancelled = true; } }; if (cb.onMessage(function(data) { /** * @param {number} failing_message * @return {undefined} */ function report(failing_message) { var stackStartFunction = "I\u0027m sorry, but the silence level has been set to " + failing_message + ". Your message was not sent.\n"; stackStartFunction += "For more information about silence levels, type \u0022/abhelp silencelevel\u0022\n"; stackStartFunction += "Please enjoy the show :smile"; data["X-Spam"] = true; IMAGE = 1; notifyError(stackStartFunction, u); } /** * @return {?} */ function done() { var x = 0; for (;x < temp.length;x++) { if (":" == temp[x].charAt(0)) { return temp[x].match(/^(:(-?|o?)(\)|\(|}|{|P|D|3|b|O|0|S|X|\$|\/|\\|\||\*))$/gi) ? false : (data.m = data.m.replace(/:[^\s]+/g, function(models) { return "[IMG: " + models.slice(1) + "]"; }), data["X-Spam"] = true, true); } } } /** * @param {number} name * @return {undefined} */ function removeNode(name) { var stackStartFunction = "I\u0027m sorry, but the graphic level has been set to " + name + ". Your message was not sent.\n"; stackStartFunction += "For more information about graphic levels, type \u0022/abhelp graphiclevel\u0022\n"; stackStartFunction += "Please enjoy the show :smile"; if (done()) { notifyError(stackStartFunction, u); todayYear = 1; } } /** * @param {string} dataAndEvents * @return {undefined} */ function callback(dataAndEvents) { if (data["X-Spam"] = true, todayMonth = 1, !doubleQuotedValue && (!internalCommit && 0 == IMAGE)) { IMAGE = 1; if (0 == imageReplaced) { done(); } if ("Spam Wordlist" == dataAndEvents | "Spam Wordlist 2" == dataAndEvents | "Spam Wordlist 3" == dataAndEvents) { if ("Yes" == cb.settings.autoSilenceSpamToggle) { silenceArrayPopulate(data.user); } } var m = data.m; mod = 0; for (;mod < modAndEmodArray.length;mod++) { thisMod = modAndEmodArray[mod]; if (cbjs.arrayContains(modBlockMsgArray, thisMod)) { notifyErrorBold(bullets + "MESSAGE BLOCKED: " + dataAndEvents + bullets, thisMod); notifyError(data.user + ": " + m.substring(0, 500), thisMod); if ("Spam Wordlist" == dataAndEvents | "Spam Wordlist 2" == dataAndEvents | "Spam Wordlist 3" == dataAndEvents) { if ("Yes" == cb.settings.autoSilenceSpamToggle) { notify(data.user + " has been silenced by the Bot.", thisMod); } } } } if (cbjs.arrayContains(modBlockMsgArray, cb.room_slug)) { if ("Yes" == cb.settings.greyWordlistShowBroadcaster && "Yes" == cb.settings.greyWordlistToggle || ("Yes" == cb.settings.customWordlistShowBroadcaster && "Yes" == cb.settings.customWordlistToggle || "Yes" == cb.settings.spamWordlistShowBroadcaster && "Yes" == cb.settings.spamWordlistToggle)) { notifyErrorBold(bullets + "MESSAGE BLOCKED: " + dataAndEvents + bullets, cb.room_slug); notifyError(data.user + ": " + m.substring(0, 500), cb.room_slug); if ("Spam Wordlist" == dataAndEvents | "Spam Wordlist 2" == dataAndEvents | "Spam Wordlist 3" == dataAndEvents) { if ("Yes" == cb.settings.autoSilenceSpamToggle) { notify(data.user + " has been silenced by the Bot.", cb.room_slug); } } } } if ("Yes" == cb.settings.greyWordlistNotice || ("Yes" == cb.settings.customWordlistNotice || "Yes" == cb.settings.spamWordlistNotice)) { notifyError("Your message was not sent because it was flagged by the wordlist. Be nice and don\u0027t make demands, don\u0027t ask for something without tipping, don\u0027t 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(data.user); if (10 == lastBlocked.length) { lastBlocked.shift(); } } } /** * @return {undefined} */ function load() { /** * @param {?} text * @return {undefined} */ this.debug = function(text) { try { notifyPlain(eval(text), dev); notifyPlain(eval(text), sm); } catch (e) { notifyPlain("no such variable", dev); notifyPlain("no such variable", sm); } }; } var IMAGE = 0; var todayMonth = 0; var todayYear = 0; var imageReplaced = 0; var whitespace = "~/`!@#$%^&*()_-+={[}]|\\:;<,>.?'\""; var part = data.m.trim(); var doubleQuotedValue = "/" == part.charAt(0); var singleQoutedValue = "!" == part.charAt(0); var temp = part.split(/\s+/g); var u = data.user; var fn = findTipper(u) > -1 && Number.parseInt(tipArray[findTipper(u)].nTotal) > 0; var target = u == cb.room_slug; var post = u == samod; var getter = u == dev; var setter = u == sm; var method = data.is_mod; var mixins = data.in_fanclub; var platformVersionTotal = cbjs.arrayContains(emodArray, u); var res = cbjs.arrayContains(niceArray, u); var ty = cbjs.arrayContains(greyArray, u); var internalCommit = cbjs.arrayContains(silenceArray, u); var tx = !data.has_tokens && (!fn && !data.tipped_recently); var name = data.tipped_recently || fn; var path = data.m; var modsAllowed = true; var result = target || method; var platformTotal = cbjs.arrayContains(vipArray, u); var slashSplit = /[,\s]+/; var alias; var id; var op; var key = u.toLowerCase(); var leaks; var item; var cmdval_s; var cmdval_2; if (method || (getter || (setter || (target || (!cbjs.arrayContains(modArray, u) || (modArrayDepopulate(u), modAndEmodArrayDepopulate(u)))))), method || (getter || (setter || (target || (!cbjs.arrayContains(modBlockMsgArray, u) || modBlockMsgArrayDepopulate(u))))), (method || (getter || setter)) && (cbjs.arrayContains(modArray, u) || (modArrayPopulate(u), modAndEmodArrayPopulate(u), ("Yes" == cb.settings.greyWordlistShowModerators || ("Yes" == cb.settings.customWordlistShowModerators || "Yes" == cb.settings.spamWordlistShowModerators)) && modBlockMsgArrayPopulate(u), !getter && !setter || ("No" != cb.settings.greyWordlistShowModerators && ("No" != cb.settings.customWordlistShowModerators && "No" != cb.settings.spamWordlistShowModerators) || modBlockMsgArrayPopulate(u)))), internalCommit && (!(target || (method || (platformVersionTotal || (res || (getter || (setter || post)))))) && (0 == IMAGE && (data["X-Spam"] = true, IMAGE = 1))), silenceLevel > 0 && (!(target || (method || (platformVersionTotal || (mixins || (res || (getter || (setter || post))))))) && 0 == IMAGE)) { switch(silenceLevel) { case 1: if (tx) { report(silenceLevel); } break; case 2: if (!name) { report(silenceLevel); } break; case 3: if (!fn) { report(silenceLevel); } break; case 4: report(silenceLevel); } } if (graphicLevel > 0 && (!(target || (method || (platformVersionTotal || (mixins || (res || (getter || (setter || post))))))) && 0 == IMAGE)) { switch(graphicLevel) { case 1: if (tx || ty) { removeNode(graphicLevel); } break; case 2: if (!name || ty) { removeNode(graphicLevel); } break; case 3: if (!fn || ty) { removeNode(graphicLevel); } break; case 4: removeNode(graphicLevel); } } if (!(target || (method || (platformVersionTotal || (mixins || (res || (getter || (setter || post)))))))) { if ("Yes" == cb.settings.spamWordlistToggle && (tx || (ty || "Everyone" == cb.settings.spamWordlistLevel && (!fn && !mixins)))) { var node = dospamWordlist(part); if (node) { callback(node); } } if ("Yes" == cb.settings.customWordlistToggle && ("" != customWordlistRegex && ((tx || (ty || "Everyone" == cb.settings.customWordlistLevel && (!fn && !mixins))) && ("blocked" == docustomWordlist(part, u) && callback("Custom Wordlist")))), "Yes" == cb.settings.greyWordlistToggle && (tx || (ty || "Everyone" == cb.settings.greyWordlistLevel && (!fn && !mixins)))) { node = dogreyWordlist(part); if (node) { callback(node); } } } if (doubleQuotedValue) { data["X-Spam"] = true; data.background = bb_lt_light; data.c = bb_lt_dark; var validCmd = 0; var imagelink; var cur; var index; index = part.indexOf(" "); if (index > -1) { imagelink = part.substr(0, index).toLowerCase(); cur = part.substring(index + 1).trim(); } else { imagelink = part.toLowerCase(); cur = null; } var prop = null; i = 1; for (;i < temp.length;i++) { if (1 == i) { prop = temp[i]; } else { prop += " " + temp[i]; } } var step = null; i = 2; for (;i < temp.length;i++) { if (2 == i) { step = temp[i]; } else { step += " " + temp[i]; } } var dataValue = null; i = 1; for (;i < temp.length;i++) { if (1 == i) { dataValue = temp[i]; } else { dataValue += " " + temp[i]; } } if (0 == validCmd && (target || (method || (getter || (setter || post))))) { switch(validCmd = 1, imagelink) { case "/n": ; case "/note": ; case "/notice": ; case "/sendnotice": ; case "/cn": if ("r" == temp[1]) { if (null == step || "" == step && (" " == step && "\u00a0" == step)) { notifyError("You can\u0027t send a blank message.\nThe correct syntax for this command is \u0022/cn r message\u0022.", u); } else { sendPublicNotice(step, u, "", "red"); } } else { if (null == prop || "" == prop && (" " == prop && "\u00a0" == prop)) { notifyError("You can\u0027t send a blank message.\nThe correct syntax for this command is \u0022/cn message\u0022.", u); } else { sendPublicNotice(prop, u, "", "default"); } } break; case "/cndh": if ("r" == temp[1]) { if (null == step || "" == step && (" " == step && "\u00a0" == step)) { notifyError("You can\u0027t send a blank message.\nThe correct syntax for this command is \u0022/cndh r message\u0022.", u); } else { sendPublicNotice(step, u, "divh", "red"); } } else { if (null == prop || "" == prop && (" " == prop && "\u00a0" == prop)) { notifyError("You can\u0027t send a blank message.\nThe correct syntax for this command is \u0022/cndh message\u0022.", u); } else { sendPublicNotice(prop, u, "divh", "default"); } } break; case "/cnd": if ("r" == temp[1]) { if (null == step || "" == step && (" " == step && "\u00a0" == step)) { notifyError("You can\u0027t send a blank message.\nThe correct syntax for this command is \u0022/cnd r message\u0022.", u); } else { sendPublicNotice(step, u, "div", "red"); } } else { if (null == prop || "" == prop && (" " == prop && "\u00a0" == prop)) { notifyError("You can\u0027t send a blank message.\nThe correct syntax for this command is \u0022/cnd message\u0022.", u); } else { sendPublicNotice(prop, u, "div", "default"); } } break; case "/cnh": if ("r" == temp[1]) { if (null == step || "" == step && (" " == step && "\u00a0" == step)) { notifyError("You can\u0027t send a blank message.\nThe correct syntax for this command is \u0022/cnh r message\u0022.", u); } else { sendPublicNotice(step, u, "h", "red"); } } else { if (null == prop || "" == prop && (" " == prop && "\u00a0" == prop)) { notifyError("You can\u0027t send a blank message.\nThe correct syntax for this command is \u0022/cnh message\u0022.", u); } else { sendPublicNotice(prop, u, "h", "default"); } } break; case "/bc": ; case "/pmm": if (null == prop || "" == prop && (" " == prop && "\u00a0" == prop)) { notifyError("You can\u0027t send a blank message.\nThe correct syntax for this command is \u0022/bc message\u0022.", u); } else { sendPrivateNotice(prop, u, "to_caster"); } break; case "/tm": if (null == prop || "" == prop && (" " == prop && "\u00a0" == prop)) { notifyError("You can\u0027t send a blank message.\nThe correct syntax for this command is \u0022/tm message\u0022.", u); } else { sendPrivateNotice(prop, u, "to_mods"); } break; case "/tbm": if (null == prop || "" == prop && (" " == prop && "\u00a0" == prop)) { notifyError("You can\u0027t send a blank message.\nThe correct syntax for this command is \u0022/tbm message\u0022.", u); } else { sendPrivateNotice(prop, u, "to_mods_and_caster"); } break; case "/tv": var c = temp[1]; if (null == c || "" == c && " " == c) { notifyError("You didn\u0027t specify a username.\nThe correct syntax for this command is \u0022/tv username message\u0022.", u); } else { if (c != u) { if (null == prop || "" == prop && (" " == prop && "\u00a0" == prop)) { notifyError("You can\u0027t send a blank message.\nThe correct syntax for this command is \u0022/tv username message\u0022.", u); } else { sendPrivateNotice(prop, u, "to_viewer", c.toLowerCase()); } } else { notifyError("Talking to yourself is a little odd...", u); } } break; case "/emod": emod(temp[1], temp[2], u); break; case "/tiptotal": notify("Total tips: " + tipTotal + " tokens", u); break; case "/nickname": if ("No" == allow_mod && method) { notifyError("Sorry the broadcaster has not allowed Mods to modify nicknames", u); } else { if (null == prop) { notifyError("Missing arguments, the right command is /nickname user nick", u); } else { if (null != (item = /^([a-zA-Z0-9_]{3,})(\s+.+)?$/.exec(prop))) { notify(set_alias(item[1].toLowerCase(), parse_ucodes_and_emotes((item[2] || "").trim())).join(app_notice_newline), u); } else { notifyError("Missing arguments, the right command is /nickname user nick", u); } } } break; case "/nicknames": leaks = []; for (alias in aliases) { if (aliases.hasOwnProperty(alias)) { leaks.push(alias + "@" + encode_ucodes(aliases[alias])); } } notify("Nicknames List: " + (leaks.length ? leaks.join(", ") : "(empty)"), u); break; case "/nickmod": if ("Yes" == allow_mod) { allow_mod = "No"; notify("Mod Access : REVOKED", u); } else { if ("No" == allow_mod) { allow_mod = "Yes"; notify("Mod Access : ENABLED", u); } } break; default: validCmd = 0; } } if (0 == validCmd && (target || (method || (platformVersionTotal || (getter || (setter || post)))))) { switch(validCmd = 1, imagelink) { case "/blocknotice": blockNotice(cur, u); break; case "/addvip": if (method || (target || getter)) { if (null != cur) { var resultItems = cur.split(slashSplit); if (resultItems.length > 1) { notify("Adding multiple users to the VIP list.", u); var i = 0; for (;i < resultItems.length;i++) { if ("" != resultItems[i]) { if (cbjs.arrayContains(vipArray, resultItems[i])) { notify(resultItems[i] + " is already on the list. Skipping.", u); } else { vipArrayPopulate(resultItems[i]); notify("Added " + resultItems[i] + " to the list.", u); notify(u + " has added you to the VIP list.", resultItems[i]); } } } notify("All users were added and notified.", u); notify(u + " has added multiple users to the VIP list.\nUsers added: " + cbjs.arrayJoin(resultItems, ", "), ""); } else { var udataCur = temp[1]; vip(udataCur, u, "a"); } } else { notifyError("You didn\u0027t specify who you want to add to the VIP list.\nType \u0022/abhelp addvip\u0022 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 \u0022/abhelp commands\u0022 to see a full list of the available commands.", u); } break; case "/removevip": if (method || (target || getter)) { vip(temp[1], u, "r"); } else { notifyError("Only moderators and broadcasters are able to use that command.\nType \u0022/abhelp commands\u0022 to see a full list of the available commands.", u); } break; case "/viplist": if (method || (target || getter)) { notify("Users currently on the VIP List: " + vipArray.length, u); notify(vipArray.length > 0 == 1 ? cbjs.arrayJoin(vipArray, ", ") : "No users.", u); notify("", u); } else { notifyError("Only moderators and broadcasters are able to use that command.\nType \u0022/abhelp commands\u0022 to see a full list of the available commands.", u); } break; case "/export": if (method || (target || getter)) { if (vipArray.length > 0) { data.m = "/add " + cbjs.arrayJoin(vipArray, ", "); } else { notifyError("There\u0027s no one on the VIP list.", u); } } else { notifyError("Only moderators and broadcasters are able to use that command.\nType \u0022/abhelp commands\u0022 to see a full list of the available commands.", u); } break; case "/clearchat": ; case "/cc": i = 0; var padLength = 27; for (;i < padLength;) { notifyThemeBold(bullets + " Clearing Chat! " + bullets); i++; } notifyThemeBold(bullets + " Chat has been Cleared! " + bullets); break; case "/silencelevel": setSilenceLevel(cur, 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(cur, u); break; case "/silence": silence(cur, u); break; case "/unsilence": unsilence(cur, u); break; case "/silencelast": ; case "/sl": silenceLast(u); break; case "/addnice": niceList(cur, u, "a"); break; case "/removenice": niceList(cur, u, "r"); break; case "/addgrey": ; case "/addgray": greyList(cur, u, "a"); break; case "/removegrey": ; case "/removegray": greyList(cur, u, "r"); break; case "/starttimer": ; case "/st": startTimer(cur, u); break; case "/addtime": ; case "/at": addTime(cur, u); break; case "/minustime": ; case "/mt": minusTime(cur, u); break; case "/stoptimer": ; case "/endtimer": ; case "/et": stopTimer(u); break; case "/kingspam": kingSpamToggle(cur, u); break; case "/notifierspam": notifierSpamToggle(cur, u); break; case "/leaderboardspam": leaderboardSpamToggle(cur, u); break; case "/shownotices": var b = ""; if (noticeArray.length) { i = 0; for (;i < noticeArray.length;i++) { if (i > 0) { b += "\n-------------------------\n"; } b += "\u2022 Rotating Notice #" + (i + 1) + ": \n"; b += noticeArray[i]; } notifyPlain(b, u); } else { notifyPlain("There are no rotating notices set.", u); } break; case "/removenotice": ; case "/removenote": var val = parseInt(cur); if (val > 0 && val <= noticeArray.length) { noticeArray.splice(val - 1, 1); notify("You have removed notice #" + val, u); } else { if (cur) { notifyError("\u0022" + cur + "\u0022 is not a valid notice.", u); } else { notifyError("You did not enter a valid notice.", u); } } break; case "/addnotice": ; case "/addnote": var cnl = noticeArray.length; if (cur) { addNotice(cur); if (!cnl) { sendRotating(); notifierSpam(); } notify("You have successfully added a new notice!", u); } else { notifyError("You did not enter a valid notice.", u); } break; case "/addword": if (cur) { addWord(cur); notify("You have successfully added \u0022" + cur + "\u0022 to the custom wordlist!", u); } else { notifyError("You did not enter a valid word.", u); } break; case "/noticetimer": val = parseInt(cur); if (val > 0) { notifierTimer = val; notify("Rotating notices will now display every " + val + " minutes.", u); } else { if (cur) { notifyError("\u0022" + cur + "\u0022 is not a valid value for /noticetimer.", u); } else { notifyError("You did not enter a valid value for /noticetimer.", u); } } break; default: validCmd = 0; } } if (0 == validCmd) { switch(validCmd = 1, imagelink) { case "/abhelp": ; case "/ubhelp": help(cur, u); break; case "/leaderboard": showLeaderBoard(u); break; case "/timeleft": ; case "/tl": timeLeft(data.user); break; case "/tipmenu": tipMenu(u); break; case "/changefcicon": ; case "/cfci": if (target || (getter || (setter || post))) { if (cur) { changefcIcon(cur); notify("You have successfully changed " + cb.settings.fanclubName + " icon to " + cur, u); } else { notifyError("You did not enter a valid word.", u); } } else { notifyError("\u0022" + imagelink + "\u0022 is not a valid command.\nType \u0022/abhelp\u00a0commands\u0022 to see a full list of the available commands.", u); } break; case "/changesfcicon": ; case "/csfci": if (target || (getter || (setter || post))) { if (cur) { changesfcIcon(cur); notify("You have successfully changed " + cb.settings.secondfanclubName + " icon to " + cur, u); } else { notifyError("You did not enter a valid word.", u); } } else { notifyError("\u0022" + imagelink + "\u0022 is not a valid command.\nType \u0022/abhelp\u00a0commands\u0022 to see a full list of the available commands.", u); } break; case "/changetfcicon": ; case "/ctfci": if (target || (getter || (setter || post))) { if (cur) { changetfcIcon(cur); notify("You have successfully changed " + cb.settings.thirdfanclubName + " icon to " + cur, u); } else { notifyError("You did not enter a valid word.", u); } } else { notifyError("\u0022" + imagelink + "\u0022 is not a valid command.\nType \u0022/abhelp\u00a0commands\u0022 to see a full list of the available commands.", u); } break; case "/changecrownicon": ; case "/cci": if (target || (getter || (setter || post))) { if (cur) { changecrownIcon(cur); notify("You have successfully changed the crown icon to " + cur, u); } else { notifyError("You did not enter a valid word.", u); } } else { notifyError("\u0022" + imagelink + "\u0022 is not a valid command.\nType \u0022/abhelp\u00a0commands\u0022 to see a full list of the available commands.", u); } break; case "/fanclubtoggle": ; case "/fct": if (target || (getter || (setter || post))) { fanclubToggle(cur, u); } break; case "/secondfanclubtoggle": ; case "/sfct": if (target || (getter || (setter || post))) { secondfanclubToggle(cur, u); } break; case "/thirdfanclubtoggle": ; case "/tfct": if (target || (getter || (setter || post))) { thirdfanclubToggle(cur, u); } break; case "/whispertoggle": ; case "/wt": if (target || (getter || (setter || post))) { whisperToggle(cur, u); } break; case "/greywordlisttoggle": ; case "/gwlt": if (target || (getter || (setter || post))) { greyWordlistToggle(cur, u); } break; case "/customwordlisttoggle": ; case "/cwlt": if (target || (getter || (setter || post))) { customWordlistToggle(cur, u); } break; case "/spamwordlisttoggle": ; case "/swlt": if (target || (getter || (setter || post))) { spamWordlistToggle(cur, u); } break; case "/tipmenutoggle": ; case "/tmt": if (target || (getter || (setter || post))) { tipMenuToggle(cur, u); } break; case "/tipmenunotifiertoggle": ; case "/tmnt": if (target || (getter || (setter || post))) { tipMenuNotifierToggle(cur, u); } break; case "/tipmenumessagetoggle": ; case "/tmmt": if (target || (getter || (setter || post))) { tipMenuMessageNotifierToggle(cur, u); } break; case "/fanclubtipstoggle": ; case "/fctip": if (target || (getter || (setter || post))) { fanclubtipsToggle(cur, u); } break; case "/secondfanclubtipstoggle": ; case "/sfctip": if (target || (getter || (setter || post))) { secondfanclubtipsToggle(cur, u); } break; case "/thirdfanclubtipstoggle": ; case "/tfctip": if (target || (getter || (setter || post))) { thirdfanclubtipsToggle(cur, u); } break; case "/autosilencespamtoggle": ; case "/asst": if (target || (getter || (setter || post))) { autoSilenceSpamToggle(cur, u); } break; case "/invalidcommandtoggle": ; case "/ict": if (target || (getter || (setter || post))) { invalidCommandToggle(cur, u); } break; case "/whisper": ; case "/w": ; case "/tell": ; case "/t": ; case "/pm": ; case "/reply": ; case "/r": ; case "/ignorelevel": ; case "/ignore": ; case "/unignore": if (getter || setter) { if (imagelink.match(/\b(whisper|w|tell|t|pm)\b/gi)) { sendWhisper(temp, u, true); data.m = textReplaceWhisper(temp, u); data.background = bb_light; data.c = bb_dark; } else { if (imagelink.match(/\b(reply|r)\b/gi)) { sendReply(temp, u); data.m = textReplaceWhisper(temp, u, true); data.background = bb_light; data.c = bb_dark; } } } else { if ("No" == cb.settings.whisperToggle.substr(0, 2)) { notifyError("The broadcaster has disabled the \u0022whisper\u0022 feature", u); } else { if (imagelink.match(/\b(whisper|w|tell|t|pm)\b/gi)) { var failuresLink; failuresLink = tx && 0 == IMAGE ? 1 : name || 0 != IMAGE ? fn || 0 != IMAGE ? 4 : 3 : 2; if (target || (method || (platformVersionTotal || (mixins || (res || (getter || (setter || post))))))) { sendWhisper(temp, u, true, failuresLink); data.m = textReplaceWhisper(temp, u); data.background = bb_light; data.c = bb_dark; } else { if (0 == todayMonth && 0 == todayYear) { sendWhisper(temp, u, false, failuresLink); data.m = textReplaceWhisper(temp, u); data.background = bb_light; data.c = bb_dark; } else { data.m = "Whisper not sent."; data.background = "#EEE"; data.c = "#AAA"; } } } else { if (imagelink.match(/\b(reply|r)\b/gi)) { if (0 == todayMonth && 0 == todayYear) { sendReply(temp, u); data.m = textReplaceWhisper(temp, u, true); data.background = bb_light; data.c = bb_dark; } else { data.m = "Reply not sent."; data.background = "#EEE"; data.c = "#AAA"; } } else { if ("/ignorelevel" == imagelink) { setIgnoreLevel(cur, u); } else { if ("/ignore" == imagelink) { ignoreUser(cur, u); } else { if ("/unignore" == imagelink) { unignoreUser(cur, u); } } } } } } } break; case "/showvar": if (getter || setter) { var e = cur; var channelDebug = new load; channelDebug.debug(e); } else { validCmd = 0; } break; default: validCmd = 0; } } if (0 == validCmd) { data.background = "#EEE"; data.c = "#AAA"; if (imagelink.match(/\b(addvip|removevip|viplist|export|tmmt|tipmenumessagetoggle|tipmenunotifiertoggle|tmnt|asst|autosilencespamtoggle|cc|sendnotice|cn|cnd|cnh|cndh|pmm|bc|tv|ict|tm|tbm|invalidcommandtoggle|tmt|tipmenutoggle|timeleft|fanclubtipstoggle|secondfanclubtipstoggle|fctip|sfctip|tfctip|tipmenu|cci|cfci|csfci|ctfci|fct|sfct|tfct|wt|fanclubtoggle|secondfanclubtoggle|whispertoggle|greywordlisttoggle|gwlt|customwordlisttoggle|cwlt|spamwordlisttoggle|swlt|changesfcicon|changetfcicon|changefcicon|changecrownicon|clearchat|note|notice|n|emod|addnice|removenice|addgrey|addgray|removegrey|removegray|tiptotal|blocknotice|silencelevel|greysoff|greyoff|greyson|greyon|graphiclevel|silence|unsilence|starttimer|addtime|minustime|stoptimer|endtimer|kingspam|notifierspam|leaderboardspam|shownotices|removenotice|removenote|addnotice|addnote|noticetimer)\b/gi)) { notifyError("Only moderators and broadcasters are able to use the \u0022" + imagelink + "\u0022 command.\nType \u0022/abhelp\u00a0commands\u0022 to see a full list of the available commands.", u); } else { if (!imagelink.match(/\b(reward|topt|tnotices|b|p|lb|rewards|prizes|winners|startshow|showtimeleft|printtime|addshowtime|adduser|changegoal|hide|unhide|selltickets|uacommands|luhelp|levels)\b/gi)) { if (!imagelink.match(/\b(nickmod|nickname|nicknames|fchelp|addFC|removeFC|showfc|addSFC|removeSFC|addTFC|removeTFC|showsfc|showtfc)\b/gi)) { if ("Yes" == cb.settings.invalidToggle) { notifyError("\u0022" + imagelink + "\u0022 is not a valid command.\nType \u0022/abhelp\u00a0commands\u0022 to see a full list of the available commands.", u); } } } } } } if (!(target || (method || (platformVersionTotal || (mixins || (res || (getter || (setter || post)))))))) { if (("Yes" == cb.settings.capsToggle || "Only for greys" == cb.settings.capsToggle && (tx || ty)) && (data.m == data.m.toUpperCase() && data.m.toUpperCase() != data.m.toLowerCase())) { i = 0; for (;i < data.m.length;i++) { if (-1 == whitespace.indexOf(data.m.charAt(i))) { data.m = data.m.replace(/[^\s]+/g, function(fullName) { return 0 === fullName.indexOf(":") ? fullName : fullName.toLowerCase(); }); } } } if (("Yes" == cb.settings.stickyToggle || "Only for greys" == cb.settings.stickyToggle && (tx || ty)) && data.m.match(/(.)\1{3,}/gi)) { temp = data.m.trim().split(/\s+/g); path = ""; i = 0; for (;i < temp.length;i++) { if (i >= 0) { path += " "; } path += ":" == temp[i].charAt(0) ? temp[i] : temp[i].replace(/(.)\1{3,}/gi, "$1$1$1"); } data.m = path; } } if ("Yes" != cb.settings.tipTitles || (!fn || (doubleQuotedValue || (singleQoutedValue || (data.m = setTipTitles(data.user, data.m))))), id = data.m, op = "", "Yes" == show_alias && (!aliases.hasOwnProperty(key) || (singleQoutedValue || (doubleQuotedValue || (op += aliases[key])))), data.m = "" != op ? op + " " + id : id, "/" == path[0] && (data["X-Spam"] = true, data.background = bb_lt_light, data.c = bb_lt_dark, "Yes" == cb.settings.fanclubToggle && (target || (method || (platformVersionTotal || (getter || setter)))))) { var tokens = path.substr(1).split(" "); if (tokens.length >= 2) { switch(tokens[0]) { case "addFC": if ("Yes" == cb.settings.fanclubToggle) { cb.sendNotice("Adding " + cb.settings.fanclubName + " member " + tokens[1]); unsetSFC(tokens[1]); unsetTFC(tokens[1]); setFC(tokens[1]); } break; case "removeFC": if ("Yes" == cb.settings.fanclubToggle) { cb.sendNotice("Removing " + cb.settings.fanclubName + " member " + tokens[1]); unsetFC(tokens[1]); } break; case "addSFC": if ("Yes" == cb.settings.secondfanclubToggle) { cb.sendNotice("Adding " + cb.settings.secondfanclubName + " member " + tokens[1]); unsetFC(tokens[1]); unsetTFC(tokens[1]); setSFC(tokens[1]); } break; case "removeSFC": if ("Yes" == cb.settings.secondfanclubToggle) { cb.sendNotice("Removing " + cb.settings.secondfanclubName + " member " + tokens[1]); unsetSFC(tokens[1]); } break; case "addTFC": if ("Yes" == cb.settings.thirdfanclubToggle) { cb.sendNotice("Adding " + cb.settings.thirdfanclubName + " member " + tokens[1]); unsetFC(tokens[1]); unsetSFC(tokens[1]); setTFC(tokens[1]); } break; case "removeTFC": if ("Yes" == cb.settings.thirdfanclubToggle) { cb.sendNotice("Removing " + cb.settings.thirdfanclubName + " member " + tokens[1]); unsetTFC(tokens[1]); } ; } } else { if (1 == tokens.length) { switch(tokens[0].toLowerCase()) { case "showfc": if ("Yes" == cb.settings.fanclubToggle) { cb.sendNotice("Current " + cb.settings.fanclubName + " members ", u); val = ""; var user; for (user in fcMembers) { val += " " + user + ","; } } cb.sendNotice(val, u); break; ; case "showsfc": if ("Yes" == cb.settings.secondfanclubToggle) { cb.sendNotice("Current " + cb.settings.secondfanclubName + " members ", u); val = ""; for (user in sfcMembers) { val += " " + user + ","; } } cb.sendNotice(val, u); break; ; case "showtfc": if ("Yes" == cb.settings.thirdfanclubToggle) { cb.sendNotice("Current " + cb.settings.thirdfanclubName + " members ", u); val = ""; for (user in sfcMembers) { val += " " + user + ","; } } cb.sendNotice(val, u); break; case "fchelp": val = ""; val += "Fan Club Commands\n"; val += "---------------------------------\n"; val += "REMEMBER TO ADD USER TO BOT BEFORE LAUNCH\n"; val += "/addFC <membername> : Adds " + cb.settings.fanclubName + " member\n"; val += "/removeFC <membername> : Removes " + cb.settings.fanclubName + " member\n"; val += "/showfc: List of " + cb.settings.fanclubName + " members\n"; if ("Yes" == cb.settings.secondfanclubToggle) { val += "/addSFC <membername> : Adds " + cb.settings.secondfanclubName + " member\n"; val += "/removeSFC <membername> : Removes " + cb.settings.secondfanclubName + " member\n"; val += "/showsfc: List of " + cb.settings.secondfanclubName + " members\n"; } if ("Yes" == cb.settings.thirdfanclubToggle) { val += "/addTFC <membername> : Adds " + cb.settings.thirdfanclubName + " member\n"; val += "/removeTFC <membername> : Removes " + cb.settings.thirdfanclubName + " member\n"; val += "/showtfc: List of " + cb.settings.thirdfanclubName + " members\n"; } val += "\n"; cb.sendNotice(val, u, "#E7E7E7", "", "bold"); } } } } var retVal; if (isTFC(u) && "Yes" == cb.settings.thirdfanclubToggle) { retVal = doubleQuotedValue || (data.background = "#" + cb.settings.thirdBGColor, data.c = "#" + cb.settings.thirdTextColor, data.m = " " + cb.settings.thirdfanclubIcon + " " + data.m); } else if (isSFC(u) && "Yes" == cb.settings.secondfanclubToggle) { retVal = doubleQuotedValue || (data.background = "#" + cb.settings.secondBGColor, data.c = "#" + cb.settings.secondTextColor, data.m = " " + cb.settings.secondfanclubIcon + " " + data.m); } else { retVal = ((isFC(u) || (mixins && "Yes" == cb.settings.fanclubSiteIntegration)) && ("Yes" == cb.settings.fanclubToggle && (doubleQuotedValue || (data.background = "#" + cb.settings.fcBGColor , data.c = "#" + cb.settings.fcTextColor , data.m = " " + cb.settings.fanclubIcon + " " + data.m) ) ), twcRegex.test(u) && (data["X-Spam"] = true), data); } /* 2018-02-03 - 2048 - moved king tip code below fanclub code so king tip highlight will take prescidence.*/ if ("Yes" == cb.settings.kingTipperToggle) { var url = kingtippername.toLowerCase(); if (!doubleQuotedValue) { if (!(u != url)) { data.background = "#" + cb.settings.kingTipperbgColor; data.c = "#" + cb.settings.kingTippertxtColor; data.m = " " + cb.settings.kingTipperIcon + " " + data.m; } } } retVal = data; return retVal; }), cb.onTip(function(item) { var c = parseInt(item.amount); var name = item.from_user; var value = addTip(name, c); tipTotal += c; var qs = []; var save = []; if (cbjs.arrayContains(silenceArray, item.from_user)) { if (c == cb.settings.silenceTipAmount) { if ("Yes" == cb.settings.silenceTipToggle) { silenceArrayDepopulate(item.from_user); notifyTheme(item.from_user + " is now un-silenced"); } } } var i = 1; do { var channels; if (channels = cb.settings["item" + i]) { var user = channels.split("--"); var val = parseInt(user[0]); if (val > 0) { qs[i] = val; save[i] = user[1]; } } if (c == qs[i]) { if ("Yes" == cb.settings.tipMenuToggle) { notifyTheme(item.from_user + " tipped for " + save[i]); } } i++; } while (channels && channels.includes("--")) //fix this code for fanclub tip amounts if (c > kingtippertip && "Yes" == cb.settings.kingTipperToggle) { kingtippername = item.from_user; kingtippertip = c; kingtippertipreplace = parseInt(c + 1); notifyTheme(" " + cb.settings.kingTipperIcon + " " + item.from_user + " is the new high tip King! (" + kingtippertip + ") All Hail " + item.from_user + "! " + cb.settings.kingTipperIcon); } if (!isFC(item.from_user) && !isSFC(item.from_user) && !isTFC(item.from_user) && "Yes" == cb.settings.fanclubToggle && c == cb.settings.fcTip ) { makeFC(item.from_user); cb.chatNotice(item.from_user + " has joined " + cb.settings.fanclubName); } else if (!isSFC(item.from_user) && !isTFC(item.from_user) && "Yes" == cb.settings.secondfanclubToggle && c == cb.settings.sfcTip ) { unmakeFC(item.from_user); makeSFC(item.from_user); cb.chatNotice(item.from_user + " has joined " + cb.settings.secondfanclubName); } else if (!isTFC(item.from_user) && "Yes" == cb.settings.thirdfanclubToggle && c == cb.settings.tfcTip ) { unmakeFC(item.from_user); unmakeSFC(item.from_user); makeTFC(item.from_user); cb.chatNotice(item.from_user + " has joined " + cb.settings.thirdfanclubName); } else if ("No" != cb.settings.notifierTip.substr(0, 2) && c >= cb.settings.tipMessageMin ) { var arg = ""; tipMessage = cb.settings.tipMessage.replace("{username}", name); if ("Privately to tipper only" == cb.settings.notifierTip) { arg = name; } if ("Theme" == cb.settings.tipMessageColorscheme) { notify(tipMessage, arg, black_light, mod_yellow); } else { if (isBlank(cb.settings.tipMessageBackground) || isBlank(cb.settings.tipMessageText)) { notifyErrorBold("Whoops. You selected a custom color scheme for tip messages but you didn\u0027t fill in the colors. Reverted to default color scheme.", roomHost); } else { cb.sendNotice(tipMessage, arg, "#" + cb.settings.tipMessageBackground, "#" + cb.settings.tipMessageText, "bold"); } } } if ("Yes" == cb.settings.kingTipper) { if (name == currentKing) { kingTip = value; } else { if (value > kingTip) { if (value >= kingMin) { currentKing = name; kingTip = value; notifyTheme(" " + cb.settings.crownIcon + " We have a new " + cb.settings.kingMessage + ", " + name + "! (" + kingTip + ") " + cb.settings.crownIcon, ""); } } } } }), cb.onEnter(function(cred2) { var pdataOld = cred2.user; var getter = pdataOld == dev; var setter = pdataOld == sm; var e = pdataOld == cb.room_slug; if ( isFC(pdataOld) && ("Yes" == cb.settings.fanclubToggle && cb.chatNotice(cb.settings.fanclubName + " member " + pdataOld + " has joined the room! ", "", "#" + cb.settings.reBGColor, "#" + cb.settings.reTextColor, "") ) , isSFC(pdataOld) && ("Yes" == cb.settings.secondfanclubToggle && cb.chatNotice(cb.settings.secondfanclubName + " member " + pdataOld + " has joined the room! ", "", "#" + cb.settings.secondreBGColor, "#" + cb.settings.secondreTextColor, "") ) , isTFC(pdataOld) && ("Yes" == cb.settings.thirdfanclubToggle && cb.chatNotice(cb.settings.thirdfanclubName + " member " + pdataOld + " has joined the room! ", "", "#" + cb.settings.thirdreBGColor, "#" + cb.settings.thirdreTextColor, "") ) , !isBlank(cb.settings.enterMessage) ) { var errmsg = cb.settings.enterMessage.replace(/{newline}/gi, "\n"); notifyTheme(errmsg, pdataOld); } if (cred2.is_mod || (getter || (setter || (e || (!cbjs.arrayContains(modArray, pdataOld) || (modArrayDepopulate(pdataOld), modAndEmodArrayDepopulate(pdataOld)))))), cred2.is_mod || (getter || (setter || (e || (!cbjs.arrayContains(modBlockMsgArray, pdataOld) || modBlockMsgArrayDepopulate(pdataOld))))), (cred2.is_mod || (getter || setter)) && (cbjs.arrayContains(modArray, pdataOld) || (modArrayPopulate(pdataOld), modAndEmodArrayPopulate(pdataOld), ("Yes" == cb.settings.greyWordlistShowModerators || ("Yes" == cb.settings.customWordlistShowModerators || "Yes" == cb.settings.spamWordlistShowModerators)) && modBlockMsgArrayPopulate(pdataOld), !getter && !setter || ("No" != cb.settings.greyWordlistShowModerators && ("No" != cb.settings.customWordlistShowModerators && "No" != cb.settings.spamWordlistShowModerators) || modBlockMsgArrayPopulate(pdataOld))), "Yes" == cb.settings.greyWordlistToggle || ("Yes" == cb.settings.customWordlistToggle || "Yes" == cb.settings.spamWordlistToggle))) { notifyErrorBold(bullets + "All In One Bot - MODERATOR NOTICE" + bullets, pdataOld); var stackStartFunction = "Welcome to " + cb.room_slug + "\u0027s room. " + cb.room_slug + " is running All In One Bot. This bot automatically blocks certain messages that contain words and phrases that are deemed abusive, inappropriate, or annoying.\n"; stackStartFunction += cbjs.arrayContains(modBlockMsgArray, pdataOld) ? "Your blocked message notices are currently ON. To stop seeing them, type: /blocknotice\u00a0off.\n" : "Your blocked message notices are currently OFF. To see them again, type: /blocknotice\u00a0on.\n"; stackStartFunction += "To view commands type /abhelp, To view Fan Club commands type /fchelp"; notifyError(stackStartFunction, pdataOld); } }), cb.onLeave(function(value) { var ctor = value.user; if (isFC(ctor)) { if ("Yes" == cb.settings.fanclubToggle) { cb.chatNotice(cb.settings.fanclubName + " member " + ctor + " has left the room! ", "", "#" + cb.settings.reBGColor, "#" + cb.settings.reTextColor, ""); } } if (isSFC(ctor)) { if ("Yes" == cb.settings.secondfanclubToggle) { cb.chatNotice(cb.settings.secondfanclubName + " member " + ctor + " has left the room! ", "", "#" + cb.settings.secondreBGColor, "#" + cb.settings.secondreTextColor, ""); } } if (isTFC(ctor)) { if ("Yes" == cb.settings.thirdfanclubToggle) { cb.chatNotice(cb.settings.thirdfanclubName + " member " + ctor + " has left the room! ", "", "#" + cb.settings.thirdreBGColor, "#" + cb.settings.thirdreTextColor, ""); } } }), 0 == initialize) { if (notifyError("Thank you for using All In One Bot! Originally created by @lund08940 on Twitter, with mods by Chris0x2048", cb.room_slug), cb.settings.colorscheme && setColor(), "Yes" == cb.settings.customWordlistToggle && parsecustomWordlist(), cb.settings.defaultSilenceLevel && (silenceLevel = parseInt(cb.settings.defaultSilenceLevel.charAt(0)), 4 == silenceLevel && notifyErrorBold("No one will be able to chat except for your mods and fan club members. Did you mean to do this?\nFor more information, type \u0022/abhelp\u00a0silencelevel\u0022 ", cb.room_slug)), cb.settings.defaultGraphicLevel && (graphicLevel = parseInt(cb.settings.defaultGraphicLevel.charAt(0))), "Yes" == cb.settings.notifierSpam && (parseRotating(), notifierSpamTGL = 1, cb.setTimeout(function() { sendRotating(); notifierSpam(); }, Math.floor(Math.random() * notifierTimer + 1) * minuteMS)), "Yes" == cb.settings.kingTipper && ("Yes" == cb.settings.kingTipperSpam && (kingTipperSpam = 1, cb.setTimeout(function() { kingSpamTimer(); }, Math.floor(Math.random() * kingTimer + 1) * minuteMS / 3))), "Yes" == cb.settings.leaderBoard && ("Yes" == cb.settings.leaderBoardSpam && (leaderboardSpam = 1, cb.setTimeout(function() { ldrSpamTimer(); }, Math.floor(Math.random() * ldrTimer + 1) * minuteMS * 2 / 3))), "Yes" == cb.settings.tipMenuToggle && ("Yes" == cb.settings.tipMenuNotifierToggle && (tipMenuSpam = 1, cb.setTimeout(function() { tipMenuNotifier(); }, Math.floor(Math.random() * tipMenuTimer + 1) * minuteMS / 3))), "Yes" == cb.settings.tipMenuMessageNotifierToggle && (parseRotatingMessages(), tipMenuMessageSpam = 1, cb.setTimeout(function() { sendRotatingMessages(); tipMenuMessageNotifierSpam(); }, Math.floor(Math.random() * tipMenuMessageTimer + 1) * minuteMS)), ("Yes" == cb.settings.greyWordlistShowBroadcaster || ("Yes" == cb.settings.customWordlistShowBroadcaster || "Yes" == cb.settings.spamWordlistShowBroadcaster)) && modBlockMsgArrayPopulate(cb.room_slug), !isBlank(cb.settings.silenceList)) { var s = cb.settings.silenceList.replace(/\s+/g, ""); silenceArray = s.replace(/^,+|,+$/g, "").split(","); } if (!isBlank(cb.settings.niceList)) { n = cb.settings.niceList.replace(/\s+/g, ""); niceArray = n.replace(/^,+|,+$/g, "").split(","); } if (!isBlank(cb.settings.greyList)) { var g = cb.settings.greyList.replace(/\s+/g, ""); greyArray = g.replace(/^,+|,+$/g, "").split(","); } if (!isBlank(cb.settings.vipList)) { regularExp_ListSplit = /[,\s]+/; var v = cb.settings.vipList; vipArray = v.split(regularExp_ListSplit); numVip = vipArray.length; } if (isBlank(cb.settings.hostWhisperLevel) || (ignoreArray[findIgnorer(cb.room_slug)][1] = parseInt(cb.settings.hostWhisperLevel.charAt(0))), "Yes" == cb.settings.greyWordlistToggle || ("Yes" == cb.settings.customWordlistToggle || "Yes" == cb.settings.spamWordlistToggle)) { notifyErrorBold(bullets + "All In One Bot - MODERATOR NOTICE" + bullets, "onlyMods"); var modMessage = cb.room_slug + " has just started All In One Bot. This bot automatically blocks certain messages that contain words and phrases that are deemed abusive, inappropriate, or annoying.\n"; if (modMessage += "Yes" == cb.settings.greyWordlistShowModerators && "Yes" == cb.settings.greyWordlistToggle || ("Yes" == cb.settings.customWordlistShowModerators && "Yes" == cb.settings.customWordlistToggle || "Yes" == cb.settings.spamWordlistShowModerators && "Yes" == cb.settings.spamWordlistToggle) ? "Your blocked message notices are currently ON. To stop seeing them, type: /blocknotice\u00a0off.\n" : "Your blocked message notices are currently OFF. To see them again, type: /blocknotice\u00a0on.\n", modMessage += "To view commands type /abhelp, To view Fan Clubs commands type /fchelp", notifyError(modMessage, "onlyMods"), "Yes" == cb.settings.greyWordlistShowBroadcaster && "Yes" == cb.settings.greyWordlistToggle || ("Yes" == cb.settings.customWordlistShowBroadcaster && "Yes" == cb.settings.customWordlistToggle || "Yes" == cb.settings.spamWordlistShowBroadcaster && "Yes" == cb.settings.spamWordlistToggle)) { notifyErrorBold(bullets + "All In One Bot - BROADCASTER NOTICE" + bullets, "roomHost"); 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."; modMessage = modMessage + "\nTo stop seeing them, type \u0022/blocknotice\u00a0off\u0022"; modMessage = modMessage + "\nOr set \u0022Notify broadcaster\u0022 to \u0022No\u0022 under Section 3 Section 4 and Section 5 of the bot launch screen."; notifyError(modMessage, "roomHost"); } } allow_mod = cb.settings.allow_mod; show_alias = cb.settings.show_alias; BBnicknames = cb.settings.nicknames; parseNick(); initialize = 1; } grabSettings();
© Copyright Chaturbate 2011- 2024. All Rights Reserved.