Bots Home
|
Create an App
Sasha's Super Bot v1.0.1
Author:
gaius
Description
Source Code
Launch Bot
Current Users
Created by:
Gaius
/************************************************************************************* * Name: Sasha's Super Bot * Author: Gaius * Version: 1.0.1 * Date: 19-11-2018 * Based on: All In One Bot - 2048 edition 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 All-time Tip King: Tip " + kingtippertipreplace + "tokens or more to replace " + kingtippername + " as the new All-time Tip King and wear the " + 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("You selected a Custom Colour Scheme for Tip Messages but you didn\u0027t fill in the colours. Reverted to default Colour 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 List: "; 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("You selected a Custom Colour Scheme for Tip Messages but you didn\u0027t fill in the colours. Reverted to default Colour Scheme.", roomHost); } else { cb.sendNotice(t, x, "#" + cb.settings.bgcolor, "#" + cb.settings.txtcolor, "bold"); } } } else { notifyError("Tip List 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 List: "; 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("You selected a Custom Colour Scheme for Tip Messages but you didn\u0027t fill in the colours. Reverted to default Colour 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 = "Everyone"; break; case 1: levelConditions = "Colour-Users only"; break; case 2: levelConditions = "Dark-blue Users and higher only"; break; case 3: levelConditions = "Users who have tipped"; 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/ssbhelp\u00a0silencelevel\u0022 to see how to use /silencelevel.", isXML); } else { notifyError("You did not enter a valid Silence Level.\nType \u0022/ssbhelp\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 Graphics 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 Graphics Level.\nType \u0022/ssbhelp\u00a0graphiclevel\u0022 to see how to use /graphiclevel.", isXML); } else { notifyError("You did not enter a valid Graphics Level.\nType \u0022/ssbhelp\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 += "The Broadcaster, 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/ssbhelp\u00a0ignorelevel\u0022 to see how to use /ignorelevel.", isXML); } else { notifyError("You did not enter a valid Ignore Level.\nType \u0022/ssbhelp\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 Bot 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 Five minutes remaining on the Timer. :ml-yl" : "Five minutes remaining on the Timer."); }, 1E3 * (callback - 300))), callback > 60 && (oneTimeout = setTimeout(function() { notifyThemeBold("Yes" == cb.settings.useLight ? ":ml-yl Only one minute remaining on the Timer! :ml-yl" : "Only one minute remaining on the Timer!"); }, 1E3 * (callback - 60))), void(timerTimeout = setTimeout(function() { notifyThemeBold("Yes" == cb.settings.useLight ? ":ml-rl Time is up! :ml-rl" : bullets + "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 started a Timer of " + code + " minutes. :ml-gl" : key + " has started a Timer of " + code + " minutes."); } } else { if (null != text) { notifyError("\u0022" + text + "\u0022 is not a valid option for /starttimer.\nType \u0022/ssbhelp\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/ssbhelp\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/ssbhelp\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/ssbhelp\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 subtracted " + t + " minute" + (1 == t ? "" : "s") + " from the Timer. :ml-bl" : isXML + " 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/ssbhelp\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/ssbhelp\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 on 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/ssbhelp addvip\u0022 to see how to use /addvip.\nAdditionally, check the VIP List 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("You have been added to the VIP List. You will have free access to any future \u0022CrazyTicket\u0022 Show.", value); } } else { notifyError("The Broadcaster, Moderators, and Bot 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/ssbhelp removevip\u0022 to see how to use /removevip.\nAdditionally, check the VIP List 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("You have been removed 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("You have been removed 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("You selected a Custom Colour Scheme for Crazy Note but you didn\u0027t fill in the colours. Reverted to default Colour 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("You selected a Custom Colour Scheme for Crazy Note but you didn\u0027t fill in the colours. Reverted to default Colour 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("You selected a Custom Colour Scheme for Crazy Note but you didn\u0027t fill in the colours. Reverted to default Colour 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("You selected a Custom Colour Scheme for Crazy Note but you didn\u0027t fill in the colours. Reverted to default Colour 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 recipient for your whisper.", 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 grey Users.", value); } break; case 2: if (el > 2 || recurring) { doWhisper(tokens, tmpSet, value); } else { notifyError(tmpSet + " is ignoring whispers from grey and light-blue Users 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 Viewers who haven\u0027t tipped today.", 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("The Broadcaster, 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/ssbhelp\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/ssbhelp\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 Bot Moderator powers.", isXML); } else { emodArrayPopulate(ten); modAndEmodArrayPopulate(ten); modBlockMsgArrayPopulate(ten); notify("Bot Moderator powers have been granted to " + ten, isXML); notify("You have been granted Bot Moderator powers", ten); } } else { if ("remove" == type) { if (cbjs.arrayContains(emodArray, ten)) { emodArrayDepopulate(ten); notify("Bot Moderator powers have been removed from " + ten, isXML); notify("Your Bot Moderator powers have been revoked", ten); } else { notifyError(ten + " has not been granted Bot Moderator powers.", isXML); } } else { if (type) { notifyError(type + " is not a valid option for /emod. Type \u0022/ssbhelp\u00a0emod\u0022 to see how to use /emod.", isXML); } else { notifyError("You did not enter a valid option for /emod. Type \u0022/ssbhelp\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/ssbhelp\u00a0blocknotice\u0022 to see how to use /blocknotice.", isXML); } else { notifyError("You did not enter a valid option for /blocknotice. Type \u0022/ssbhelp\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 + " tokens 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 Broadcaster 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)|(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)|a+m+o+r|t+i+t+s|a+s+s|t+e+t+a+s|c+u+l+o|p+u+s+s+y|t+r+a+s+e+r+o|c+h+o+c+h+a|p+a+n+o+c+h+a|m+a+m+a|m+a+m+i|c+u+l+a+s+o|c+u+l+i+t+o|v+a+g+i+n+a|v+a+g+i+n+i+t+a|n+a+l+g+a+s|n+a+l+g+i+t+a+s|n+a+l+g+o+t+a+s|p+e+z+o+n|p+o+l+l+a|p+e+c+h+o+s|s+e+n+o+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 List.", isXML); } } else { if ("off" == num) { if ("No" == cb.settings.tipMenuToggle) { notifyError("The Tip List is already turned off.", isXML); } else { cb.settings.tipMenuToggle = "No"; notify("You have turned off the Tip List.", 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 List is already turned on.", isXML); } else { tipMenuSpam = 1; tipmenuNotifierSpam(); notify("You have turned on the Tip List.", isXML); } } else { if ("off" == num) { if (0 == tipMenuSpam) { notifyError("The Tip List is already turned off.", isXML); } else { tipMenuSpam = 0; notify("You have turned off the Tip List.", 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 List Messages are already turned on.", isXML); } else { tipMenuMessageSpam = 1; notify("You have turned on the Tip List Messages.", isXML); } } else { if ("off" == num) { if (0 == tipMenuMessageSpam) { notifyError("The Tip List Messages are already turned off.", isXML); } else { tipMenuMessageSpam = 0; notify("You have turned off the Tip List 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 are 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 are 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 are 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 are 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 are 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 are 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("You have been added 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("You have been removed from the Nice List. Global Room Settings apply to you again.", value); } else { notifyError(value + " is not on the Nice List.", isXML); } } } } else { notifyError("You didn\u0027t specify a User.\nType \u0022/ssbhelp\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/ssbhelp\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 Broadcaster 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 the 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/ssbhelp\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/ssbhelp\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/ssbhelp\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/ssbhelp\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/ssbhelp\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/ssbhelp\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 Colour Option.", roomHost), notifyError("Use html-color-codes.info to find the code for the colour you want.\nReverting to default colour.", 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("You selected a Custom Colour Scheme but you didn\u0027t fill in the colours. Reverted to default Colour Scheme.", roomHost); } else { if (isBlank(color)) { notifyErrorBold("You selected a Custom Colour Scheme but you didn\u0027t select a text colour. Reverted to default Colour 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 Colours, but your Colour Scheme is set to \u0022" + selector + "\u0022. In order to use your custom colours, please set your Colour 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("Sasha\u0027s Super Bot Help Menu", isXML); notify("Type \u0022/ssbhelp\u00a0x\u0022, where x is one of the following choices, for more detailed information.\nEx: /ssbhelp\u00a0commands", isXML); notifyPlain("commands\nnicelist\ngreylist\nabout", isXML); break; case "commands": c = 1; notifyBold("Sasha\u0027s Super Bot Help Menu", isXML); notify("Type \u0022/ssbhelp\u00a0x\u0022, where x is one of the following choices, for more detailed information.\nEx: /ssbhelp\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, broadcasters and mods are forced to do things like silence users without tokens or users who have not tipped, and those groups often include the users whose comments broadcasters would like to see. To fix this problem, broadcasters 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 desirable to silence these users entirely, especially if they\u0027ve been tipping, but it can be useful to apply the same Word List restrictions that apply to grey users, so that the more annoying messages don\u0027t get through to the room. To fix this problem, broadcasters and mods can add users to the \u0022Grey\u0022 List. Users who are on the Grey List will have their messages subjected to the Word List that applies to grey users.", isXML); notify("", isXML); break; case "about": c = 1; notifyBold("About Sasha\u0027s Super Bot", isXML); notify("Sasha\u0027s Super Bot is a fork of Ultra Bot, with continuing development by Gaius.\nUltra Bot was written by Justin of the Chaturbate couple britney_and_justin.\nComments, suggestions, requests, and bug reports can be communicated by posting comments on Sasha\u0027s Super Bot\u0027s page at chaturbate.com/bots.\nThe purpose of Sasha\u0027s Super Bot is to make the lives of Sasha and her mod 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 the Broadcaster and Moderators.\nThe syntax for using greyson is \u0022/greyson\u0022.\nThe effect of /greyson is the same as silence level 0, which grants chat privileges to grey users.\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 the Broadcaster and by Moderators.\nThe syntax for using greysoff is \u0022/greysoff\u0022.\nThe effect of /greysoff is the same as silence level 1, which revokes chat privileges from grey users.\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 the Broadcaster and by Moderators.\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 chat privileges to all Users, setting it to 1 will revoke chat privileges from grey users, setting it to 2 will revoke chat privileges from grey and light-blue users, setting it to 3 will revoke chat privileges from Users who have not tipped, and setting it to 4 will revoke chat privileges from everyone other than Mods and Fans.\nThe default setting for /silencelevel is 0.\nThe Broadcaster, 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 the Broadcaster and by Moderators.\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 graphics privileges to all Users, setting it to 1 will revoke graphics privileges from grey users, setting it to 2 will revoke graphics privileges from grey and light blue users, setting it to 3 will revoke graphics 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.\nThe Broadcaster, Moderators, and Fan Club Members are unaffected by the Graphics Level.", isXML); notify("", isXML); break; case "silence": c = 1; notifyBold("/silence Help", isXML); notify("/silence is a command that is usable by the Broadcaster and by Moderators.\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. In addition, there is no public message about a User having been silenced.\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 the Broadcaster and by Moderators.\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 chat privileges back to a User who was previously silenced using the Bot..\nNote: /unsilence will NOT undo the effect of Chaturbate\u0027s silence feature!\n/unsilence will ONLY reverse the effect of the Bot\u0027s /silence function.", isXML); notify("", isXML); break; case "silencelast": ; case "sl": c = 1; notifyBold("/silencelast Help", isXML); notify("/silencelast is a command that is usable by the Broadcaster and by Moderators.\nThe syntax for using silence last is \u0022/silencelast\u0022, this will silence the User that typed in chat most recently.\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./nIn addition, no public message ab out a User having been silenced is displayed.\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 the Broadcaster and by Moderators.\nThe syntax for using starttimer is \u0022/starttimer x\u0022, where x is the desired duration (in minutes) of the Timer.\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 the Broadcaster and by Moderators.\nThe syntax for using stoptimer is \u0022/stoptimer\u0022, this will stop the currently running Timer.\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 the Broadcaster and by Moderators.\nThe syntax for using addtime is \u0022/addtime\u00a0x\u0022, where x is the amount of time (in minutes) which you want to add to the currently running Timer.\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 the Broadcaster and by Moderators.\nThe syntax for using minustime is \u0022/minustime\u00a0x\u0022, where x is the amount of time (in minutes) which you want to subtract from a currently running Timer.\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 currently running 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 the Broadcaster and by Moderators.\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 in the default colour for Notices.\n/sendnotice is also a command that will send Notices to the public chat.", isXML); notify("", isXML); break; case "cnd": c = 1; notifyBold("/cnd Help", isXML); notify("/cnd is a command that is usable by the Broadcaster and by Moderators.\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 in 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 the Broadcaster and by Moderators.\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 in 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 the Broadcaster and by Moderators.\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 in 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 Broadcaster.\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 the Broadcaster and by Moderators.\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 the Broadcaster and by Moderators.\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 to the Broadcaster.", isXML); notify("", isXML); break; case "tv": c = 1; notifyBold("/tv Help", isXML); notify("/tv is a command that is usable by the Broadcaster and by Moderators.\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 the Broadcaster and by Moderators.\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.\naddnotice will add a Notice message to the Rotating Notifier, these Notices will be displayed in the main chat window at a selected interval.\naddnotice 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 the Broadcaster and by Moderators.\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.\nremovenotice 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 the Broadcaster and by Moderators.\nThe syntax for using show notices is \u0022/shownotices.\u0022\nshownotices 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 the Broadcaster and by Moderators.\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 to 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 and that is visible only to the specified recipient.\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 reply 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 grey Users from sending you whispers.\nSetting it to 2 will prevent grey and light-blue Users 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.\nThe Broadcaster, Moderators and Fan Club Members can send whispers regardless of the set whisper level.\nThe default setting for /ignorelevel is 4 for the Broadcaster, and 0 for everyone else. (The 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 the Broadcaster and by Moderators.\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 Bot Moderator powers.\n/emod allows the Broadcaster and Moderators to quickly grant other Users access to Moderator-only commands in the event that they are having difficulty controlling the room by themselves.\nBot 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 the Broadcaster and by Moderators.\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 grants that User chat and graphics-usage privileges regardless of the Silence, Graphics, 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 the Broadcaster and by Moderators.\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 the Broadcaster and by Moderators.\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 him to the same Word List that applies to grey users. \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 the Broadcaster and by Moderators.\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 "ssbhelp": ; case "helpbot": c = 1; notifyBold("/ssbhelp\u00a0Help", isXML); notify("/ssbhelp\u00a0is a command that is usable by everyone.\nThe syntax for using ssbhelp is \u0022/ssbhelp\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 the Broadcaster and by Moderators.\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 Three 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 the Broadcaster and by Moderators.\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 the Broadcaster and by Moderators.\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 are 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, the Broadcaster 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 VIP List is exported to the CrazyTicket 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 the Broadcaster and by Moderators.\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 him 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 the Broadcaster and by Moderators.\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 only by the Broadcaster.\nThe syntax for using nickmod is \u0022/nickmod\u0022.\nUsing this command will toggle ON or OFF 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 the Broadcaster and by Moderators.\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 the Broadcaster and by Moderators.\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/tipmenu shows the Broadcaster\u0027s Tip Menu.", isXML); notify("", isXML); } if (0 == c) { notifyError(num + " is not a valid subsection of the Help Menu. Type \u0022/ssbhelp\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) Personalisation ........................................... Colour 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 Colour (HTML #Code)", type : "str", defaultValue : "[Optional - Set Colour Scheme to \u0022Custom\u0022 above]", required : false }, { name : "lightcolor", label : "Custom Highlight Colour (HTML #Code)", type : "str", defaultValue : "[Optional - Set Colour Scheme to \u0022Custom\u0022 above]", required : false }, { name : "crazyNoteColorscheme", label : "Crazy Note Colour Scheme (only for commands /cn /cnd /cnh /cndh) [Theme = Colours specified above]", type : "choice", choice1 : "Theme", choice2 : "Custom (Please define below)", defaultValue : "Theme", required : false }, { name : "crazyNoteText", label : "Custom Text Colour - HTML Color Code (without #)", type : "str", defaultValue : "[Optional - Set Colour Scheme to \u0022Custom\u0022 above]", required : false }, { name : "crazyNoteBackground", label : "Custom Highlight Colour - HTML Color Code (without #)", type : "str", defaultValue : "[Optional - Set Colour 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 grey Users", defaultValue : "Only for grey Users", required : false }, { name : "stickyToggle", label : "Prevent Sticky Keyyys?", type : "choice", choice1 : "Yes", choice2 : "No", choice3 : "Only for grey Users", defaultValue : "Only for grey Users", required : false }, { name : "defaultGraphicLevel", label : "Default Graphics Level (Who can use Graphics?)", type : "choice", choice1 : "0 - (Everyone)", choice2 : "1 - (Colour-Users only)", choice3 : "2 - (Dark-blue Users and higher only)", choice4 : "3 - (Only Users who have tipped)", choice5 : "4 - (Only Mods and Fans)", defaultValue : "3 - (Only Users who have tipped)", required : false }, { name : "defaultSilenceLevel", label : "Default Silence Level (Who can talk in chat?)", type : "choice", choice1 : "0 - (Everyone)", choice2 : "1 - (Colour-Users only)", choice3 : "2 - (Dark-blue Users and higher only)", choice4 : "3 - (Only 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 and use Graphics)", type : "str", minLength : 1, maxLength : 1E3, defaultValue : "gaius,guardian__angel,titus__pullo,milamber78,gasman_1203,mrs_gasman", required : false }, { name : "greyList", label : "Grey List (Usernames (of any colour) who should always be subjected to Grey Word List and Grey Graphics 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 : "hellokikitty,danysboy,buffon42,sugardadyin808,hornym834,nicolas_uy12,alejandrooromin,serbian1,sir523,lovenakedpeople,yukiees,jimehat23,santiandres96,alexhuber12345,adidas1992,mranonn1989,dwmoze,david_rockefeller8,daaraak,rafacanelas,jesu_148,fuckumotherfuker,unexpecteddude,cypresshill88,andres123_201,cummeater,pingachica51,militar84,bluelhyj,eprham,pooldevil198,jeffking805,philip669,loveyoubaby45637,aliciaaa97,hotsiavaash,mystery_174,nataliahot2,dragoo1,tomek1982,juan580,caravan,adelle_rosa,bennyarnold,downtoskype,longpimp,calcal145", required : false }, { name : "silenceTipToggle", label : "Use Tip to be un-silenced? (Only un-silences Users silenced with the Bot, not regular 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 : "10000" }, { name : "greyWordlistToggle", label : "3) Grey Word List ............. Use Grey Word List feature for grey Users?", type : "choice", choice1 : "Yes", choice2 : "No (Skip to Section 4)", defaultValue : "Yes", required : false }, { name : "greyWordlistNotice", label : "Notify User when his/her message gets blocked? (applies to all Word Lists)", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "Yes", required : false }, { name : "greyWordlistShowModerators", label : "Notify Moderators of blocked Grey Word List messages?", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "No", required : false }, { name : "greyWordlistShowBroadcaster", label : "Notify the Broadcaster of blocked Grey Word List messages?", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "No", required : false }, { name : "greyWordlistLevel", label : "Grey Word List applies to", type : "choice", choice1 : "Only grey Users", choice2 : "Everyone", defaultValue : "Only grey Users", required : false }, { name : "customWordlistToggle", label : "4) Custom Word List ................... Use Custom Word List feature?", type : "choice", choice1 : "Yes", choice2 : "No (Skip to Section 5)", defaultValue : "Yes", required : false }, { name : "customWordlistShowModerators", label : "Notify Moderators of blocked Custom Word List messages?", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "No", required : false }, { name : "customWordlistShowBroadcaster", label : "Notify the Broadcaster of blocked Custom Word List messages?", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "No", required : false }, { name : "customWordlist", label : "Custom Word List", type : "str", minLength : 1, maxLength : 1E3, defaultValue : "bitch,biatch,whore,wh0re,cunt,slut,strumpet,puta,putita,perra,perrita,zorra,ramera", required : false }, { name : "customWordlistLevel", label : "Custom Word List applies to", type : "choice", choice1 : "Only grey Users", choice2 : "Everyone", defaultValue : "Everyone", required : false }, { name : "spamWordlistToggle", label : "5) Spam Word List .......................... Use Spam Word List feature?", type : "choice", choice1 : "Yes", choice2 : "No (Skip to Section 6)", defaultValue : "Yes", required : false }, { name : "spamWordlistShowModerators", label : "Notify Moderators of blocked Spam Word List messages?", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "No", required : false }, { name : "spamWordlistShowBroadcaster", label : "Notify the Broadcaster of blocked Spam Word List messages?", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "No", required : false }, { name : "spamWordlistLevel", label : "Spam wordlist applies to", type : "choice", choice1 : "Only grey Users", choice2 : "Everyone", defaultValue : "Only grey Users", required : false }, { name : "autoSilenceSpamToggle", label : "Automatically silence Users who post spam?", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "No", 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 - (Colour-users only)", choice3 : "2 - (Dark-blue Users and higher only)", choice4 : "3 - (Only Users who have tipped)", choice5 : "4 - (Only Mods and Fans)", defaultValue : "4 - (Only Mods and Fans)", required : false }, { name : "hostWhisperLevel", label : "Broadcaster Whisper Level (Who can send YOU whispers?)", type : "choice", choice1 : "0 - (Everyone)", choice2 : "1 - (Colour-users only)", choice3 : "2 - (Dark-blue Users and higher only)", choice4 : "3 - (Only 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 Total to become King:", type : "int", minValue : 1, maxValue : 1E3, defaultValue : 100, required : false }, { name : "kingTipperSpam", label : "Periodically announce Tip Total required to become King?", type : "choice", choice1 : "Yes", choice2 : "No (Skip to Section 7)", defaultValue : "Yes", required : false }, { name : "kingTipperTimer", label : "Interval (in minutes) for announcement of King", type : "int", minValue : 1, maxValue : 60, defaultValue : 21, required : false }, { name : "kingMessage", label : "Message to print here ... Tip xxx tokens 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 : ":crowngold" }, { name : "kingTipperToggle", label : "8) All-time Tip King........................................ Use All-time 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 All-time Tip King (username)", type : "str", minLength : 0, maxLength : 40, required : false, defaultValue : "[Username required when in use]" }, { name : "kingTipperTip", label : "Reigning All-time Tip King (token amount)", type : "int", minValue : 1, defaultValue : "1" }, { name : "kingTipperbgColor", label : "Background Colour for All-time Tip King - HTML Color Code (without #)", type : "str", minLength : 0, maxLength : 6, required : false, defaultValue : "FFFFFF" }, { name : "kingTippertxtColor", label : "Text Colour for All-time Tip King - HTML Color Code (without #)", type : "str", minLength : 0, maxLength : 6, required : false, defaultValue : "000000" }, { name : "kingTipperIcon", label : "Icon for All-time Tip King (use :GIFNAME with colon)", type : "str", minLength : 0, maxLength : 40, required : false, defaultValue : ":crownsilver" }, { name : "kingTipperNotifier", label : "Interval (in minutes) for rotating All-time Tip King message", type : "int", minValue : 1, maxValue : 60, defaultValue : 34, required : false }, { name : "leaderBoard", label : "9) Leader Board .............................. Use Leader Board feature?", type : "choice", choice1 : "Yes", choice2 : "No (Skip to Section 10)", defaultValue : "No (Skip to Section 10)", required : false }, { name : "leaderBoardSpam", label : "Periodically announce the Top Three Tippers?", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "No", required : false }, { name : "leaderBoardTimer", label : "Interval (in minutes) for Leader Board announcement", type : "int", minValue : 1, maxValue : 60, defaultValue : 18, 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 : "Privately to Tipper only", 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 : 50, required : false }, { name : "tipMessageColorscheme", label : "Tip Message Colour Scheme [Theme = Yellow and Black, to match the Tip colours]", type : "choice", choice1 : "Theme", choice2 : "Custom (Please define below)", defaultValue : "Theme", required : false }, { name : "tipMessageText", label : "Custom Text Colour - HTML Color Code (without #)", type : "str", defaultValue : "[Optional - Set Colour Scheme to \u0022Custom\u0022 above]", required : false }, { name : "tipMessageBackground", label : "Custom Highlight Colour - HTML Color Code (without #)", type : "str", defaultValue : "[Optional - Set Colour 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 Invalid Command Error Messages?", type : "choice", choice1 : "Yes", choice2 : "No (Skip to Section 13)", defaultValue : "Yes", required : false }, { name : "specialaccessMod", label : "[Optional] Username of Special Access Mod - This User (any colour) will be able to use all Bot commands, to make it easier for the Broadcaster", type : "str", minLength : 0, maxLength : 30, required : false, defaultValue : "guardian__angel" }, { 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 sensual_sasha@Sasha) [separate by commas]" }, { name : "allow_mod", type : "choice", choice2 : "No", choice1 : "Yes", defaultValue : "Yes", label : "Allow Moderators to edit Nicknames" }, { name : "fanclubToggle", label : "14) First Fan Club .................................................... Use First Fan Club?", type : "choice", choice1 : "Yes", choice2 : "No (Skip to Section 15)", defaultValue : "Yes", required : true }, { name : "fanclubSiteIntegration", label : "Include Chaturbate Fan Club Members (green usernames) in First Fan Club?", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "Yes", required : true }, { name : "fanclubName", label : "Name of First Fan Club", type : "str", minLength : 0, maxLength : 30, required : true, defaultValue : "Fans" }, { name : "fanclubtips", label : "Tip to join First Fan Club?", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "No", required : true }, { name : "fcTip", label : "Tip amount to join First Fan Club ", type : "int", minValue : 1, defaultValue : "11111111" }, { name : "reBGColor", label : "Room Enter/Leave Background Colour for First Fan Club - HTML Color Code (without #)", type : "str", minLength : 0, maxLength : 6, required : false, defaultValue : "FFFFFF" }, { name : "reTextColor", label : "Room Enter/Leave Text Colour for First Fan Club - HTML Color Code (without #)", type : "str", minLength : 0, maxLength : 6, required : false, defaultValue : "FFFFFF" }, { name : "fcTextColor", label : "Text Colour for First Fan Club Members' messages in chat - HTML Color Code (without #)", type : "str", minLength : 0, maxLength : 6, required : false, defaultValue : "099809" }, { name : "fcBGColor", label : "Background Colour for First Fan Club Members' messages in chat - HTML Color Code (without #)", type : "str", minLength : 0, maxLength : 6, required : false, defaultValue : "FFFFFF" }, { name : "fcMemberList", label : "List of current First Fan Club Members, separated by commas (CB usernames, no alias)", type : "str", minLength : 0, maxLength : 10240, required : false, defaultValue : "" }, { name : "fanclubIcon", label : "First Fanclub Members' Icon: (use :GIFNAME with colon) and/or Text (use [FANCLUBNAME] with brackets)", type : "str", minLength : 0, maxLength : 40, required : false, defaultValue : "" }, { name : "secondfanclubToggle", label : "Do you want to use a Second Fan Club? (Users added to this Club will be removed from First Fan Club)", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "Yes", required : false }, { name : "secondfanclubName", label : "Name of Second Fan Club", type : "str", minLength : 0, maxLength : 30, required : true, defaultValue : "Team" }, { name : "secondfanclubtips", label : "Tip to join Second Fan Club?", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "No", required : true }, { name : "sfcTip", label : "Tip amount to join Second Fan Club ", type : "int", minValue : 1, defaultValue : "22222222" }, { name : "secondreBGColor", label : "Room Enter/Leave Background Colour for Second Fan Club - HTML Color Code (without #)", type : "str", minLength : 0, maxLength : 6, required : false, defaultValue : "FFFFFF" }, { name : "secondreTextColor", label : "Room Enter/Leave Text Colour for SECOND FANCLUB - HTML Color Code (without #)", type : "str", minLength : 0, maxLength : 6, required : false, defaultValue : "FFFFFF" }, { name : "secondBGColor", label : "Highlight Colour for Second Fan Club Members' messages in chat - HTML Color Code (without #)", type : "str", minLength : 0, maxLength : 6, required : false, defaultValue : "FFFFFF" }, { name : "secondTextColor", label : "Text color for Second Fan Club Members' messages in chat - HTML Color Code (without #)", type : "str", minLength : 0, maxLength : 6, required : false, defaultValue : "5A0674" }, { name : "sfcMemberList", label : "List of current Second Fan Club Members, separated by commas (CB usernames, no alias)", type : "str", minLength : 0, maxLength : 10240, required : false, defaultValue : "gaius,guardian__angel" }, { name : "secondfanclubIcon", label : "Second Fanclub Members' Icon: (use :GIFNAME with colon) and/or Text (use [FANCLUBNAME] with brackets)", type : "str", minLength : 0, maxLength : 40, required : false, defaultValue : "" }, { name : "thirdfanclubToggle", label : "Do you want to use a Third Fan Club? (Users added to this Club will be removed from First and Second Fan Clubs)", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "No", required : false }, { name : "thirdfanclubName", label : "Name of Third Fan Club", type : "str", minLength : 0, maxLength : 30, required : true, defaultValue : "3rd FANCLUB" }, { name : "thirdfanclubtips", label : "Tip to join Third Fan Club?", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "No", required : true }, { name : "tfcTip", label : "Tip amount to join Third Fan Club ", type : "int", minValue : 1, defaultValue : "33333333" }, { name : "thirdreBGColor", label : "Room Enter/Leave Background Colour for Third fan Club - HTML Color Code (without #)", type : "str", minLength : 0, maxLength : 6, required : false, defaultValue : "FFFFFF" }, { name : "thirdreTextColor", label : "Room Enter/Leave Text Colour for Third Fan Club - HTML Color Code (without #)", type : "str", minLength : 0, maxLength : 6, required : false, defaultValue : "FFFFFF" }, { name : "thirdBGColor", label : "Highlight Colour for Third Fan Club Members' messages in chat - HTML Color Code (without #)", type : "str", minLength : 0, maxLength : 6, required : false, defaultValue : "FFFFFF" }, { name : "thirdTextColor", label : "Text color for Third Fan Club Members' messages in chat - HTML Color Code (without #)", type : "str", minLength : 0, maxLength : 6, required : false, defaultValue : "000000" }, { name : "tfcMemberList", label : "List of current Third Fan Club Members, separated by commas (CB usernames, no alias)", type : "str", minLength : 0, maxLength : 10240, required : false, defaultValue : "" }, { name : "thirdfanclubIcon", label : "Third Fanclub Members' Icon: (use :GIFNAME with colon) and/or Text (use [FANCLUBNAME] with brackets)", type : "str", minLength : 0, maxLength : 40, required : false, defaultValue : "" }, { 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 minutes) for Rotating Notices", type : "int", minValue : 1, maxValue : 60, defaultValue : 8, 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 announce [USERNAME] has tipped for [MENU ITEM], when one of the values is tipped", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "Yes", required : false }, { name : "tipMenuColorscheme", label : "Tip Menu Colour Scheme [Theme = Colours picked above in Personalisation]", type : "choice", choice1 : "Theme", choice2 : "Custom (Please define below)", defaultValue : "Custom (Please define below)", required : false }, { name : "txtcolor", label : "Custom Text Colour - HTML Color Code (without #)", type : "str", defaultValue : "E100E1", required : false }, { name : "bgcolor", label : "Custom Highlight Colour - HTML Color Code (without #)", type : "str", defaultValue : "FFFFFF", 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 : "Pixel Heart", 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 specified interval?", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "Yes", required : false }, { name : "tipmenunotifier", label : "Interval (in minutes) for displaying Tip Menu", type : "int", minValue : 1, maxValue : 60, defaultValue : 17, required : false }, { name : "tipMenuMessageNotifierToggle", label : "Display the Tip Menu Rotating Messages seen below at the specified interval?", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "Yes", required : false }, { name : "tipmenumessagenotifier", label : "Interval (in minutes) for Tip Menu Rotating Messages", type : "int", minValue : 1, maxValue : 60, defaultValue : 13, required : false }, { name : "msg1", type : "str", required : true, label : "Message 1", defaultValue : "Type /tipmenu to see my Tip List" }, { 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 only: 10--flash Boobs), no special characters" }]; 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 = "gaius"; var sm = "gaius"; 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 = "#5A0674"; var purple_light = "#DDBBCC"; 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 = "The Silence Level has been set to " + failing_message + ". Your message was not sent.\n"; stackStartFunction += "For more information about Silence Levels, type \u0022/ssbhelp 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 = "The Graphics Level has been set to " + name + ". Your image was not sent.\n"; stackStartFunction += "For more information about Graphics Levels, type \u0022/ssbhelp 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 has been flagged by the Word List. No dirty talk or sexual images in the public chat please, only in Tip Notes or PMs. Be nice and don\u0027t request without tipping.", 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("The Broadcaster does not currently permit Mods to modify Nicknames", u); } else { if (null == prop) { notifyError("Missing arguments, the correct syntax is /nickname [usernick]", 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 correct syntax is /nickname [usernick]", u); } } } break; case "/nicknames": leaks = []; for (alias in aliases) { if (aliases.hasOwnProperty(alias)) { leaks.push(alias + "@" + encode_ucodes(aliases[alias])); } } notify("Nick Names 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 VIP List. Skipping.", u); } else { vipArrayPopulate(resultItems[i]); notify("Added " + resultItems[i] + " to the VIP List.", u); notify("You have been added to the VIP List.", resultItems[i]); } } } notify("All Users were added and notified.", u); notify("Multiple Users have been added 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/ssbhelp addvip\u0022 to see how to use /addvip.\nAdditionally, check the VIP List Help Section for more info.", u); } } else { notifyError("Only the Broadcaster and Moderators are able to use that command.\nType \u0022/ssbhelp 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 the Broadcaster and Moderators are able to use that command.\nType \u0022/ssbhelp 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 the Broadcaster and Moderators are able to use that command.\nType \u0022/ssbhelp 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 are no Users on the VIP List.", u); } } else { notifyError("Only the Broadcaster and Moderators are able to use that command.\nType \u0022/ssbhelp 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 Word List.", 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 "/ssbhelp": ; case "/helpbot": 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/ssbhelp\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/ssbhelp\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/ssbhelp\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/ssbhelp\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 the Broadcaster and Moderators are able to use the \u0022" + imagelink + "\u0022 command.\nType \u0022/ssbhelp\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|ssbfchelp|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/ssbhelp\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 grey Users" == 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 grey Users" == 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 "ssbfchelp": 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); } /* moved King Tip code below Fan Club code, so King Tip Highlight will take precedence */ 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 Fan Club 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 All-time 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("You selected a Custom Colour Scheme for Tip Messages but you didn\u0027t fill in the colours. Reverted to default Colour 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 + ", all hail " + 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 + "Sasha\u0027s Super Bot - MODERATOR NOTICE" + bullets, pdataOld); var stackStartFunction = "Welcome to " + cb.room_slug + "\u0027s room. " + cb.room_slug + " is running Sasha\u0027s Super 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 /ssbhelp, To view Fan Club commands type /ssbfchelp"; 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("Welcome to another day on Chaturbate. Have fun and earn many tokens.", 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("Noone will be able to chat except for your Mods and Fan Club Members. Did you mean to do this?\nFor more information, type \u0022/ssbhelp\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 Sasha\u0027s Super 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 /ssbhelp, To view Fan Club commands type /ssbfchelp", 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 + "Sasha\u0027s Super 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 you 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 Freesexcam 2011- 2024. All Rights Reserved.