Apps Home
|
Create an App
CT1
Author:
loulouw
Description
Source Code
Launch App
Current Users
Created by:
Loulouw
var cmdPrefix = "/"; var app = { name: "'CrazyTicket'", type: "App", version: "2.0", build: ".098", date: "2016.05.22", acg: "acrazyguy", ph: "phatkatmeow", te: "phatterkat", pe: "perd", sf: "lo7", rx: "robx7", lw: "loulouw", bli: "birdylovesit", bf: "blazefyre", CD: "dump" }; var COLOR = { DEVELOPER: "#D9F7F7", BRED: "#FF1407", MRED: "#D80A00", HLRED: "#FFE5E5", HILITE: "#EEE5FF", SUCCESS: "#468847", ERROR: "#B94A48", INFO: "#144D8C", NOTICE: "#6900CC", DPURPLE: "#663399", LPURPLE: "#8041BF", BLUE: "#000099", MOD: "#DC0000", FAN: "#009900", SYNTAX: "#995B00", HVTEXT: "#D80A00", HVBACK: "#FFFFBF", TBMBACK: "#E0EEFF", TBMTEXT: "#12447A", GREEN: "#009600", GREENHL: "#E5FFE5", MAG: "#E509E5", PINK: "#FF48D2", BLI: "#DDFFCC", BF: "#FFE0EA" }; var COMMAND = { CMDS: cmdPrefix+"cmds", TICKETS: cmdPrefix+ "tickets", PASSWORD: cmdPrefix+ "pass", TIMELEFT: cmdPrefix+ "timeleft", SHOWTIME: cmdPrefix+ "showtime", USETKT: cmdPrefix+ "usetkt", SAVETICKET: cmdPrefix+ "saveticket", ADD: cmdPrefix+ "add", AU: cmdPrefix+ "au", DEL: cmdPrefix+ "del", DU: cmdPrefix+ "du", PENDTKT: cmdPrefix+ "pendtkt", SENDPW: cmdPrefix+ "sendpw", ADDP: cmdPrefix+ "addp", ADDOTS: cmdPrefix+ "addots", DELP: cmdPrefix+ "delp", DELOTS: cmdPrefix+ "delots", HILITE: cmdPrefix+ "hilite", HL: cmdPrefix+ "hl", STARTSHOW: cmdPrefix+ "startshow", STOPSHOW: cmdPrefix+ "stopshow", SHOWOVER: cmdPrefix+ "showover", SHOWEND: cmdPrefix+ "showend", NEWSHOW: cmdPrefix+ "newshow", VIEWERS: cmdPrefix+ "viewers", SUBJECT: cmdPrefix+ "subject", CTSUBJECT: cmdPrefix+ "ctsubject", LOCK: cmdPrefix+ "lock", CHECK: cmdPrefix+ "check", CTN: cmdPrefix+ "ctn", CTND: cmdPrefix+ "ctnd", CTNH: cmdPrefix+ "ctnh", CTNDH: cmdPrefix+ "ctndh", CTB: cmdPrefix+ "ctb", CTM: cmdPrefix+ "ctm", CTBM: cmdPrefix+ "ctbm", CTT: cmdPrefix+ "ctt", CTV: cmdPrefix+ "ctv", SCHAT: cmdPrefix+ "schat", SPASS: cmdPrefix+ "spass", TIPSOFF: cmdPrefix+ "tipsoff", STARTTIMER: cmdPrefix+ "starttimer", ADDTIME: cmdPrefix+ "addtime", PLIST: cmdPrefix+ "plist", PLISTW: cmdPrefix+ "plistw", VLIST: cmdPrefix+ "vlist", NRLIST: cmdPrefix+ "nrlist", ALIST: cmdPrefix+ "alist", AALIST: cmdPrefix+ "aalist", EMLIST: cmdPrefix+ "emlist", OTSLIST: cmdPrefix+ "otslist", USEDOTS: cmdPrefix+ "usedots", NEW: cmdPrefix+ "new", EMAIL: cmdPrefix+ "email", SIL: cmdPrefix+ "sil", UNSIL: cmdPrefix+ "unsil", SLIST: cmdPrefix+ "slist", HCWARN: cmdPrefix+ "hcwarn", CHANGEPW: cmdPrefix+ "changepw", CTPRICE: cmdPrefix+ "ctprice", CTRESET: cmdPrefix+ "ctreset" }; var FLAG = { goal: false, priceup: false, debug: false, dev: false, hilite: true, lock: false, schat: false, spass: true, toff: false, cdtimer: false, hctimer: false, hcam: false, soonover: false, end: false, email: false, pendtkt: false, xxxx: false }; //var cmdPrefix = "/"; var dashLine = "------------------------------------------------------------"; var typeCmds = " Type " + COMMAND["CMDS"] + " to see all commands."; var whatsNew = "--------------------- WHAT'S NEW ----------------------\n\u25CF NEW COMMANDS:\n\u25CF The Notice commands now take the argument 'r'.\n\u25CF This will output the Notice in red.\n\u25CF E.G.: /ctn r Message\n\n\u25CF /hcwarn - Sends a warning to the chat regarding\n\u25CF mobile devices and hidden cam shows.\n" + dashLine; var otsMsg = "You have an pending ticket that you can use for this show.\n\u25CF To use your ticket simply type /usetkt in the chat and you will be added to the ticket holders list for this show.\n\u25CF If you change your mind BEFORE the show starts simply type /saveticket in the chat, and your ticket will become available for another time.\n"; var fanMsg = dashLine + "\n\u25CF The broadcaster has set a special ticket price\n\u25CF for fanclub members.\n\u25CF Tip " + cb["settings"]["fanbuyin"] + " tokens for a show ticket.\n" + dashLine; var modelName = cb["room_slug"]; var MODS = "red"; var FANS = "green"; var totalTipped = 0; var cdTimerMinutes = 0; var hideTime = 0; var cdMilliSecs = 0; var passWord = ""; var rePassword; var paidListArray = []; var viewerListArray = []; var nirListArray = []; var addListArray = []; var autoListArray = []; var silListArray = []; var pendingTicketsArray = []; var usedPendingTicketArray = []; var devListArray = []; var cmdListArray = ["new", "add", "hcwarn", "showover", "showend"]; var miscListArray = []; var oldPrice = 0; var opListArray = { name: [], tip: [] }; var emListArray = { name: [], email: [] }; cb["settings_choices"] = [{ name: "goal", type: "int", minValue: 0, label: "Token Goal (optional)", required: false }, { name: "showDesc", type: "str", minLength: 1, maxLength: 255, defaultValue: "", label: "Show Description (optional)", required: false }, { name: "buyin", type: "int", minValue: 1, defaultValue: 25, label: "Ticket Price" }, { name: "fanbuyin", type: "int", label: "*NEW* Ticket price for fans (leave blank if fans are auto-added or pay the regular price)", required: false }, { name: "hideTips", type: "choice", choice1: "Yes", choice2: "No", defaultValue: "No", label: "Hide tip total from viewers?" }, { name: "showViewers", type: "choice", choice1: "Yes", choice2: "No", defaultValue: "Yes", label: "Show the no. of ticket holders actually in the room (Viewing)?" }, { name: "hcTimer", type: "int", label: "Hidden cam Mobile browser warning display interval in minutes (Enter 0 to disable. Can be manually displayed with the /hcwarn command)", defaultValue: 5 }, { name: "pendTkt", type: "choice", choice1: "Yes", choice2: "No", defaultValue: "No", label: "Enable the Pending Ticket System?" }, { name: "pendTktHolders", type: "str", minLength: 1, maxLength: 255, defaultValue: "", label: "Enter Pending Ticket holders' names here if you only have a few. * NAMES MUST BE SEPARATED BY A COMMA *", required: false }, { name: "includeMods", type: "choice", choice1: "Yes", choice2: "No", defaultValue: "Yes", label: "Allow moderators to add/delete users (and themselves) to the show?" }, { name: "modPrice", type: "choice", choice1: "Yes", choice2: "No", defaultValue: "No", label: "Allow moderators to change the ticket price for you?" }, { name: "autoaddMods", type: "choice", choice1: "Yes", choice2: "No", defaultValue: "No", label: "Automatically give Mods a ticket when they enter the room?" }, { name: "autoaddFans", type: "choice", choice1: "Yes", choice2: "No", defaultValue: "No", label: "Automatically give Fanclub Members a ticket when they enter?" }]; if (cb["settings"]["hcTimer"]) { FLAG["hctimer"] = true }; if (cb["settings"]["hideTips"] === "Yes") { FLAG["toff"] = true }; if (cb["settings"]["goal"]) { FLAG["goal"] = true; FLAG["toff"] = false } else { cb["settings"]["goal"] = "None" }; if (cb["settings"]["pendTkt"] === "Yes") { FLAG["pendtkt"] = true }; if (FLAG["pendtkt"] && cb["settings"]["pendTktHolders"] != "") { pendingTicketsArray = cb["settings"]["pendTktHolders"]["split"](/[,\s]+/) }; cb["onDrawPanel"](function(user) { var variable_03 = ""; var variable_04 = ""; if (FLAG["goal"]) { variable_03 = "Total Tips / Goal"; variable_04 = "" + totalTipped + " / " + cb["settings"]["goal"] } else { variable_03 = "Tips Received:"; variable_04 = "" + totalTipped }; if (FLAG["xxxx"]) { // LW if (FLAG["goal"]) { variable_03 = "Total Tikt Tips / Goal" } else { variable_03 = "Tikt Tips Received:" } } if (FLAG["soonover"] && !FLAG["end"]) { if (cb["settings"]["showViewers"] === "Yes") { return { "\x74\x65\x6D\x70\x6C\x61\x74\x65": "3_rows_of_labels", "\x72\x6F\x77\x31\x5F\x6C\x61\x62\x65\x6C": "Tickets/Viewing:", "\x72\x6F\x77\x31\x5F\x76\x61\x6C\x75\x65": cb["limitCam_allUsersWithAccess"]()["length"] + " / " + viewerListArray["length"], "\x72\x6F\x77\x32\x5F\x6C\x61\x62\x65\x6C": "", "\x72\x6F\x77\x32\x5F\x76\x61\x6C\x75\x65": "", "\x72\x6F\x77\x33\x5F\x6C\x61\x62\x65\x6C": "", "\x72\x6F\x77\x33\x5F\x76\x61\x6C\x75\x65": "" } } else { return { "\x74\x65\x6D\x70\x6C\x61\x74\x65": "3_rows_of_labels", "\x72\x6F\x77\x31\x5F\x6C\x61\x62\x65\x6C": "Tickets Holders:", "\x72\x6F\x77\x31\x5F\x76\x61\x6C\x75\x65": cb["limitCam_allUsersWithAccess"]()["length"], "\x72\x6F\x77\x32\x5F\x6C\x61\x62\x65\x6C": "", "\x72\x6F\x77\x32\x5F\x76\x61\x6C\x75\x65": "", "\x72\x6F\x77\x33\x5F\x6C\x61\x62\x65\x6C": "", "\x72\x6F\x77\x33\x5F\x76\x61\x6C\x75\x65": "" } } } else { if (FLAG["end"]) { return { "\x74\x65\x6D\x70\x6C\x61\x74\x65": "3_rows_11_21_31", "\x72\x6F\x77\x31\x5F\x76\x61\x6C\x75\x65": "The show is over.", "\x72\x6F\x77\x32\x5F\x76\x61\x6C\x75\x65": "Ticket sales have", "\x72\x6F\x77\x33\x5F\x76\x61\x6C\x75\x65": "been suspended." } } else { if (FLAG["toff"]) { if (cb["settings"]["showViewers"] === "Yes") { return { "\x74\x65\x6D\x70\x6C\x61\x74\x65": "3_rows_of_labels", "\x72\x6F\x77\x31\x5F\x6C\x61\x62\x65\x6C": "Tickets/Viewing:", "\x72\x6F\x77\x31\x5F\x76\x61\x6C\x75\x65": cb["limitCam_allUsersWithAccess"]()["length"] + " / " + viewerListArray["length"], "\x72\x6F\x77\x32\x5F\x6C\x61\x62\x65\x6C": "Ticket price:", "\x72\x6F\x77\x32\x5F\x76\x61\x6C\x75\x65": cb["settings"]["buyin"], "\x72\x6F\x77\x33\x5F\x6C\x61\x62\x65\x6C": "", "\x72\x6F\x77\x33\x5F\x76\x61\x6C\x75\x65": "" } } else { return { "\x74\x65\x6D\x70\x6C\x61\x74\x65": "3_rows_of_labels", "\x72\x6F\x77\x31\x5F\x6C\x61\x62\x65\x6C": "Tickets Holders:", "\x72\x6F\x77\x31\x5F\x76\x61\x6C\x75\x65": cb["limitCam_allUsersWithAccess"]()["length"], "\x72\x6F\x77\x32\x5F\x6C\x61\x62\x65\x6C": "Ticket price:", "\x72\x6F\x77\x32\x5F\x76\x61\x6C\x75\x65": cb["settings"]["buyin"], "\x72\x6F\x77\x33\x5F\x6C\x61\x62\x65\x6C": "", "\x72\x6F\x77\x33\x5F\x76\x61\x6C\x75\x65": "" } } } else { if (cb["settings"]["showViewers"] === "Yes") { return { "\x74\x65\x6D\x70\x6C\x61\x74\x65": "3_rows_of_labels", "\x72\x6F\x77\x31\x5F\x6C\x61\x62\x65\x6C": variable_03, "\x72\x6F\x77\x31\x5F\x76\x61\x6C\x75\x65": variable_04, "\x72\x6F\x77\x32\x5F\x6C\x61\x62\x65\x6C": "Tickets/Viewing:", "\x72\x6F\x77\x32\x5F\x76\x61\x6C\x75\x65": cb["limitCam_allUsersWithAccess"]()["length"] + " / " + viewerListArray["length"], "\x72\x6F\x77\x33\x5F\x6C\x61\x62\x65\x6C": "Ticket price:", "\x72\x6F\x77\x33\x5F\x76\x61\x6C\x75\x65": cb["settings"]["buyin"] } } else { return { "\x74\x65\x6D\x70\x6C\x61\x74\x65": "3_rows_of_labels", "\x72\x6F\x77\x31\x5F\x6C\x61\x62\x65\x6C": variable_03, "\x72\x6F\x77\x31\x5F\x76\x61\x6C\x75\x65": variable_04, "\x72\x6F\x77\x32\x5F\x6C\x61\x62\x65\x6C": "Tickets Holders:", "\x72\x6F\x77\x32\x5F\x76\x61\x6C\x75\x65": cb["limitCam_allUsersWithAccess"]()["length"], "\x72\x6F\x77\x33\x5F\x6C\x61\x62\x65\x6C": "Ticket price:", "\x72\x6F\x77\x33\x5F\x76\x61\x6C\x75\x65": cb["settings"]["buyin"] } } } } } }); cb["onTip"](function(tip) { var tipAmount = parseInt(tip["amount"], 10); var name = tip["from_user"]; var isMod = tip["from_user_is_mod"]; var isFan = tip["from_user_in_fanclub"]; var tipNote = tip["message"]; var variable_0a = ""; var variable_0b = 0, variable_0c = 0; if (cb["limitCam_userHasAccess"](name) && !cbjs["arrayContains"](viewerListArray, name)) { viewerListArray["push"](name) }; //totalTipped += tipAmount; ori ici /*if(tipAmount == cb["settings"]["buyin"]) { // LW totalTipped += tipAmount; }*/ if(FLAG["xxxx"]) { if(tipAmount == cb["settings"]["buyin"]){ totalTipped += tipAmount; } } else { totalTipped += tipAmount; } if ((totalTipped >= cb["settings"]["goal"]) && FLAG["goal"]) { cb["sendNotice"](dashLine + "\n\u25CF " + app["name"] + ": GOAL ACHIEVED!\n\u25CF Thanks to all tippers.\n" + dashLine, "", "", COLOR.MRED, "bold"); cb["settings"]["goal"] = 0; FLAG["goal"] = false }; if (FLAG["email"]) { variable_0a = tipNote["match"](/\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b/i) || ""; variable_0b = emListArray["name"]["indexOf"](name); if (variable_0b > -1 && !emListArray["email"][variable_0b]) { emListArray["email"][variable_0b] = variable_0a; cb["sendNotice"]("\u25CF Missing email address recorded.", modelName, COLOR.HVBACK, COLOR.HVTEXT, "bold") } }; if (FLAG["priceup"] && !cb["limitCam_userHasAccess"](name)) { variable_0c = opListArray["name"]["indexOf"](name); if (variable_0c > -1 && tipAmount >= opListArray["tip"][variable_0c]) { fc_user("add", name, true); if (!cbjs["arrayContains"](paidListArray, name)) { paidListArray["push"](name) }; if (!cbjs["arrayContains"](viewerListArray, name)) { viewerListArray["push"](name) }; cb["sendNotice"](dashLine + "\n\u25CF You NOW have a ticket and will be able to view\n\u25CF the 'Hidden Cam' show.\n" + dashLine, name, COLOR.HILITE, COLOR.NOTICE, "bold") }; if (tipAmount === oldPrice) { opListArray["name"]["push"](name); opListArray["tip"]["push"](cb["settings"]["buyin"] - oldPrice); cb["sendNotice"](dashLine + "\n\u25CF :alert1 YOU ONLY TIPPED " + oldPrice + " TOKENS BUT\n\u25CF THE PRICE WAS INCREASED TO " + cb["settings"]["buyin"] + " TOKENS!!\n\u25CF PLEASE TIP ANOTHER " + (cb["settings"]["buyin"] - oldPrice) + " TOKENS TO GET\n\u25CF YOUR TICKET!!\n" + dashLine, name, "", COLOR.MRED, "bold") } }; if (((tipAmount >= cb["settings"]["buyin"]) || (cb["settings"]["fanbuyin"] && isFan && (tipAmount >= cb["settings"]["fanbuyin"]))) && !FLAG["end"]) { if (!cb["limitCam_userHasAccess"](name)) { cb["sendNotice"]("\u25CF Ticket sold to '" + name + "'", "", "", COLOR.NOTICE, "bold"); fc_user("add", name, true); if (!cbjs["arrayContains"](paidListArray, name)) { paidListArray["push"](name) }; if (!cbjs["arrayContains"](viewerListArray, name)) { viewerListArray["push"](name) }; if (FLAG["spass"]) { cb["sendNotice"](dashLine + "\n\u25CF You will be able to view the 'Hidden Cam' show.\n" + dashLine, name, COLOR.HILITE, COLOR.NOTICE, "bold") }; if (FLAG["email"]) { variable_0a = tipNote["match"](/\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b/i) || ""; emListArray["name"]["push"](name); emListArray["email"]["push"](variable_0a); if (!variable_0a) { cb["sendNotice"]("\u25CF You may have forgotten your email address in the tip note.", name, "", COLOR.BRED, "bold"); cb["sendNotice"]("\u25CF Viewer '" + name + "' may have forgotten their email address in the tip note.", modelName, COLOR.HVBACK, COLOR.HVTEXT, "bold"); cb["sendNotice"]("\u25CF Viewer '" + name + "' may have forgotten their email address in the tip note.", "", "", COLOR.MOD, "bold", MODS) } else { cb["sendNotice"]("\u25CF Email address recorded.", modelName, COLOR.HVBACK, COLOR.HVTEXT, "bold") } } } }; cb["drawPanel"]() }); cb["onEnter"](function(user) { var name = user["user"]; var isMod = user["is_mod"]; var isFan = user["in_fanclub"]; if (FLAG["lock"] && !cb["limitCam_isRunning"]()) { if (!fc_user("check", name) && name != modelName) { cb["sendNotice"]("Room Crasher! '" + name + "' does NOT have a ticket!", name, "", COLOR.BRED, "bold") } }; if (fc_user("check", name)) { if (!cbjs["arrayContains"](viewerListArray, name)) { viewerListArray["push"](name) }; cb["drawPanel"]() }; if (cbjs["arrayContains"](nirListArray, name)) { cbjs["arrayRemove"](nirListArray, name) }; if (FLAG["hcam"]) { fc_getShowTime(name) }; if (FLAG["soonover"] && !FLAG["end"]) { cb["sendNotice"](dashLine + "\n\u25CF THE SHOW IS ABOUT TO END OR IS OVER.\n\u25CF BUYING A TICKET NOW IS NOT RECOMMENDED.\n" + dashLine, name, "", COLOR.BRED, "bold") }; if (!FLAG["soonover"] && !FLAG["end"]) { if (cbjs["arrayContains"](pendingTicketsArray, name) && FLAG["pendtkt"]) { cb["sendNotice"](dashLine + "\n\u25CF '" + name + "':\n\u25CF " + otsMsg + dashLine, name, "", COLOR.MRED, "bold") } }; if (isFan && cb["settings"]["fanbuyin"]) { cb["sendNotice"](fanMsg, name, "", COLOR.FAN, "bold") }; if ((isMod && cb["settings"]["autoaddMods"] === "Yes") || (isFan && cb["settings"]["autoaddFans"] === "Yes")) { if (fc_autoAdd(name)) { cb["sendNotice"](dashLine + "\n\u25CF You've automatically been added to the ticket\n\u25CF list because you are " + (isMod ? "a moderator." : "in the fan club.") + " :woohoo\n" + dashLine, name, "", (isMod ? COLOR["MRED"] : COLOR["FAN"]), "bold") } } }); cb["onLeave"](function(user) { var name = user["user"]; if (cbjs["arrayContains"](viewerListArray, name)) { cbjs["arrayRemove"](viewerListArray, name); if (!cbjs["arrayContains"](nirListArray, name)) { nirListArray["push"](name) }; cb["drawPanel"]() } }); cb["onMessage"](function(message) { /*if (message["m"]["startsWith"](" :qq_staticheart ") && (message["m"][17] == "/")) { message["m"] = message["m"]["substr"](17) }; var regexCommandSplit = "^" + cmdPrefix + "(\S+)(?:\b\s*)(.*)?"; var variable_10 = /[,\s]+/; var cmdSplitF = new RegExp(regexCommandSplit); var cmdSplit = message["m"]["match"](cmdSplitF); var variable_13; var variable_14; var variable_15; if (cmdSplit) { variable_13 = cmdSplit[1]; variable_14 = cmdSplit[2]; if (variable_14 != null) { variable_14 = variable_14["replace"](/^\s+|\s+$/g, "") }; if (variable_14 != null) { variable_15 = variable_14["split"](variable_10) } else { variable_15 = "" } }; var msg = message["m"]; var name = message["user"]; var isMod = message["is_mod"]; var isFan = message["in_fanclub"]; var isModel = (name == modelName); var variable_18 = (name == app["acg"]); var variable_19, variable_1a; var variable_1b = ""; var variable_1c = ""; */ /* if (/^(\?|!)/ ["test"](msg)) { message["X-Spam"] = true; return cb["sendNotice"](dashLine + "\n\u25CF " + app["name"] + ": Incorrect command prefix.\n" + dashLine, name, "", COLOR.MRED, "bold") }; if (cb["limitCam_isRunning"]() && !cb["limitCam_userHasAccess"](name) && !isModel && !isMod && (name != app["acg"]) && FLAG["schat"]) { message["m"] = ":huh"; message["X-Spam"] = true; cb["sendNotice"]("\u25CF A hidden cam show is in progress and public chat messages are suppressed.", name, "", COLOR.NOTICE, "bold") }; if (variable_14 && (/^</ ["test"](variable_14))) { message["X-Spam"] = true; return cb["sendNotice"](dashLine + "\n\u25CF The < and > are not required. Please re-enter.\n" + dashLine, name, "", COLOR.MRED, "bold") }; if (cbjs["arrayContains"](silListArray, name) && !isMod) { message["X-Spam"] = true }; if (cb["limitCam_userHasAccess"](name) && !cbjs["arrayContains"](viewerListArray, name)) { viewerListArray["push"](name) }; if (cbjs["arrayContains"](cmdListArray, variable_13)) { miscListArray["push"](name + " - /" + variable_13 + (variable_14 ? " - " + variable_14 : "")) }; */ var msgParam = message["m"].split(" "); var name = message['user'] var msg = message['m'] var isMod = message['is_mod'] var isModel = (name == cb.room_slug); var modelName = cb.room_slug; var isReal = (cb.room_slug == 'loulouw'); if (isModel) { if (msgParam[0].charAt(0) == "/") { message['X-Spam'] = true; message['background'] = "linear-gradient(to right bottom, #FFFFFF, #CCC 70%)"; // msgParam1 = msgParam[0] msgParam2 = msgParam[1] msgParam3 = msgParam[2] if (msgParam2 != null) { //ex variable_14 msgParam2 = msgParam2["replace"](/^\s+|\s+$/g, "") }; /**/if (msgParam2 != null) { msgParam3 = msgParam2["split"](/[,\s]+/) msgParam3 = msgParam3["replace"](/^\s+|\s+$/g, "") } else { msgParam3 = "" }/**/ //msgParam3 = "" // temporaire switch (msgParam1) { case COMMAND["CMDS"]: /*if ((isMod || isModel) && variable_14 === "-who") { cb["sendNotice"](dashLine + "\n" + cbjs["arrayJoin"](miscListArray, "\n ") + "\n" + dashLine, name, "", COLOR.INFO, "bold") } else { cb["sendNotice"](fc_getCommandList(name, isMod), name, "", COLOR.INFO, "bold") };*/ cb["sendNotice"](fc_getCommandList(isModel, false), name, "", COLOR.INFO, "bold") cb.chatNotice ('test') break; case COMMAND["TICKETS"]: cb["sendNotice"](dashLine + "\n" + (cb["limitCam_allUsersWithAccess"]()["length"] < 1 == true ? "\u25CF No tickets sold!" : cbjs["arrayJoin"](cb["limitCam_allUsersWithAccess"](), ", ")) + "\n" + dashLine + "\n\u25CF Ticket holders: " + cb["limitCam_allUsersWithAccess"]()["length"] + "\n" + dashLine, name, "", COLOR.NOTICE, "bold"); break; case COMMAND["PASSWORD"]: if (fc_user("check", name) || isModel) { if (FLAG["spass"]) { cb["sendNotice"]("\u25CF You are on the ticket list and will see the show\n\u25CF when it starts.", name, "", COLOR.NOTICE, "bold") } else { fc_sendPasswordToUser(name) } } else { cb["sendNotice"]("\u25CF You must buy a ticket to get access to the show.", name, "", COLOR.NOTICE, "bold") }; break; case COMMAND["TIMELEFT"]: if (FLAG["cdtimer"]) { cb["sendNotice"](dashLine + "\n\u25CF " + fc_calcTime(cdMilliSecs - Date["now"]()) + " until the show starts!\n" + dashLine, name, "", COLOR.BRED, "bold") } else { cb["sendNotice"]("\u25CF No goal timer is running.", name, "", COLOR.NOTICE, "bold") }; break; case COMMAND["SHOWTIME"]: if (FLAG["hcam"]) { if (isMod && variable_14 === "all") { fc_getShowTime("") } else { fc_getShowTime(name) } } else { cb["sendNotice"]("\u25CF No Hidden Cam show is currently in progress.", name, "", COLOR.NOTICE, "bold") }; break; case COMMAND["USETKT"]: if (FLAG["pendtkt"]) { if (!cb["limitCam_userHasAccess"](name) && cbjs["arrayContains"](pendingTicketsArray, name)) { cb["limitCam_addUsers"]([name]); cbjs["arrayRemove"](pendingTicketsArray, name); if (!cbjs["arrayContains"](usedPendingTicketArray, name)) { usedPendingTicketArray["push"](name) }; if (!cbjs["arrayContains"](viewerListArray, name)) { viewerListArray["push"](name) }; cb["drawPanel"](); cb["sendNotice"]("\n\u25CF You have been added to the ticket holders list for this show.\n", name, "", COLOR.NOTICE, "bold"); cb["sendNotice"]("\n\u25CF '" + name + "' has used their pending ticket.\n", modelName, COLOR.HVBACK, COLOR.HVTEXT, "bold"); cb["sendNotice"]("\n\u25CF Mods: '" + name + "' has used their pending ticket.\n", "", "", COLOR.NOTICE, "bold", MODS) } else { cb["sendNotice"]("\n\u25CF Sorry, you have no pending ticket available.\n", name, "", COLOR.NOTICE, "bold") } } else { fc_pendTktNE(name) }; break; case COMMAND["SAVETICKET"]: if (FLAG["pendtkt"]) { if (cb["limitCam_userHasAccess"](name) && !FLAG["hcam"] && !cbjs["arrayContains"](addListArray, name)) { pendingTicketsArray["push"](name); cb["limitCam_removeUsers"]([name]); if (cbjs["arrayContains"](usedPendingTicketArray, name)) { cbjs["arrayRemove"](usedPendingTicketArray, name) }; if (cbjs["arrayContains"](viewerListArray, name)) { cbjs["arrayRemove"](viewerListArray, name) }; cb["drawPanel"](); cb["sendNotice"]("\n\u25CF You have been removed from the ticket holders list for this show and your ticket saved for later use.\n", name, "", COLOR.NOTICE, "bold"); cb["sendNotice"]("\n\u25CF '" + name + "' has saved their ticket for later use.\n", modelName, COLOR.HVBACK, COLOR.HVTEXT, "bold"); cb["sendNotice"]("\n\u25CF Mods: '" + name + "' has saved their ticket for later use.\n", "", "", COLOR.NOTICE, "bold", MODS) } else { cb["sendNotice"]("\n\u25CF Sorry, you have no ticket to save or the show has started.\n", name, "", COLOR.NOTICE, "bold") } } else { fc_pendTktNE(name) }; break; case COMMAND["PENDTKT"]: if (isMod || isModel) { if (variable_14) { if (variable_14 === "on") { FLAG["pendtkt"] = true; cb["sendNotice"]("\n\u25CF The Pending Ticket System is now ENABLED.\n", name, "", COLOR.NOTICE, "bold") }; if (variable_14 === "off") { FLAG["pendtkt"] = false; cb["sendNotice"]("\n\u25CF The Pending Ticket System is now DISABLED.\n", name, "", COLOR.NOTICE, "bold") } } else { cb["sendNotice"]("\n\u25CF The Pending Ticket System is currently " + (FLAG["pendtkt"] == true ? "ENABLED.\n" : "DISABLED.\n"), name, "", COLOR.NOTICE, "bold") } }; break; case COMMAND["SENDPW"]: if (isMod || isModel) { if (variable_14 === "?") { var variable_1d = "\n"; variable_1d += "Usage: " + COMMAND["SENDPW"] + " <user>\n"; variable_1d += "Use '" + COMMAND["SENDPW"] + "' to resend the password to all ticket holders. If the optional <user> argument is supplied, the password is sent ONLY to that viewer. The password CANNOT be sent to any non-ticket holders.\n"; message["X-Spam"] = true; return cb["sendNotice"](variable_1d, name, "", COLOR.INFO, "bold") }; if (variable_14) { if (fc_user("check", variable_14)) { fc_sendPasswordToUser(variable_14); cb["sendNotice"]("\u25CF Password sent to '" + variable_14 + "'.", name, "", COLOR.NOTICE, "bold") } else { cb["sendNotice"]("\u25CF User '" + variable_14 + "' does NOT have a ticket.", name, "", COLOR.NOTICE, "bold") } } else { if (cb["limitCam_allUsersWithAccess"]()["length"] > 0) { fc_sendPasswordToUsers(); cb["sendNotice"]("\u25CF Password sent to all ticket holders", name, "", COLOR.NOTICE, "bold") } else { cb["sendNotice"]("\u25CF Password not sent, no tickets have been sold", name, "", COLOR.NOTICE, "bold") } } } else { if (fc_user("check", name)) { fc_sendPasswordToUser(name) } else { cb["sendNotice"]("\u25CF You must buy a ticket to get the password", name, "", COLOR.ERROR, "bold") } }; break; case COMMAND["ADD"]: ; case COMMAND["AU"]: if (isModel || (isMod && cb["settings"]["includeMods"] == "Yes") || name === app["acg"]) { if (msgParam2 === "?") { var variable_1e = "\n"; variable_1e += "Usage: " + COMMAND["ADD"] + " <user1 user2 user3 etc>\n"; variable_1e += "Use '" + COMMAND["ADD"] + "' and its alias to manually add a viewer or viewers to the ticket holder list. If no <user> is specified, the command issuer is added if the broadcaster allows.\n"; variable_1e += "The output from the '" + COMMAND["TICKETS"] + "' command can be copied and saved periodically in case the App crashes. Once the App is restarted, the '" + COMMAND["ADD"] + "' command can be issued and the saved list pasted in after the command to restore the ticket holder list.\n"; variable_1e += "Alias: " + COMMAND["AU"] + " = [a]dd [u]ser.\n"; message["X-Spam"] = true; return cb["sendNotice"](variable_1e, name, "", COLOR.INFO, "bold") }; if (msgParam2) { if (msgParam3["length"] > 1) { cb["sendNotice"]("\u25CF Mass adding users to the ticket list", name, "", COLOR.NOTICE, "bold"); for (var i = 0; i < msgParam3["length"]; i++) { if (!fc_user("check", msgParam3[i]) && msgParam3[i] != "") { fc_user("add", msgParam3[i], false); if (!cbjs["arrayContains"](addListArray, msgParam3[i])) { addListArray["push"](msgParam3[i]) }; cb["sendNotice"]("\u25CF Added: '" + msgParam3[i] + "'.", name, "", COLOR.SUCCESS, ""); cb["sendNotice"]("\u25CF '" + msgParam3[i] + "' you have been added to the ticket holders list.", msgParam3[i], "", COLOR.NOTICE, "bold") } else { if (msgParam3[i] != "") { cb["sendNotice"]("\u25CF Skipped: '" + msgParam3[i] + "' is already on the list.", name, "", COLOR.SYNTAX) } } }; cb["sendNotice"]("\u25CF Mass adding completed - Viewers Notified.", name, "", COLOR.NOTICE, "bold"); cb["sendNotice"]("\u25CF Type " + COMMAND["TICKETS"] + " to confirm, or " + COMMAND["SENDPW"] + " to give the ticket holders the password", name, "", COLOR.NOTICE, "bold"); cb["sendNotice"]("\u25CF Mod '" + name + "' mass-added viewers: " + cbjs["arrayJoin"](msgParam3, ", ") + " to the ticket holders list.", modelName, "", COLOR.SYNTAX, "") } else { if (fc_user("check", msgParam2)) { cb["sendNotice"]("\u25CF Skipped: '" + msgParam2 + "' is already on the list.", name, "", COLOR.NOTICE, "bold") } else { fc_user("add", msgParam2, true); if (!cbjs["arrayContains"](addListArray, msgParam2)) { addListArray["push"](msgParam2) }; if (!cbjs["arrayContains"](viewerListArray, msgParam2)) { viewerListArray["push"](msgParam2) }; cb["sendNotice"]("\u25CF '" + msgParam2 + "' you have been added to the ticket holders list.", msgParam2, "", COLOR.NOTICE, "bold"); cb["sendNotice"]("\u25CF Viewer '" + msgParam2 + "' added to the ticket list\n\u25CF by '" + name + "'.", "", COLOR.HVBACK, COLOR.HVTEXT, "bold", MODS); cb["sendNotice"]("\u25CF Viewer '" + msgParam2 + "' added to the ticket list\n\u25CF by '" + name + "'.", modelName, "", COLOR.SYNTAX, "") } } } else { if (!fc_user("check", name)) { fc_user("add", name, true); if (!cbjs["arrayContains"](addListArray, name)) { addListArray["push"](name) }; cb["sendNotice"]("\u25CF Mod '" + name + "' added themself to ticket list.", modelName, "", COLOR.SYNTAX, "") } else { cb["sendNotice"]("\u25CF Oops, '" + name + "', it seems you are already on the ticket list.", name, "", COLOR.SYNTAX, "") } } } else { if (isMod) { cb["sendNotice"]("\u25CF The broadcaster has disabled this command for moderators.", name, "", COLOR.NOTICE, "bold") } else { fc_onlyMods(name) } }; cb["drawPanel"](); break; case COMMAND["ADDP"]: if (isMod || isModel) { if (variable_14) { paidListArray["push"](variable_14) } }; break; case COMMAND["ADDOTS"]: if (FLAG["pendtkt"]) { if ((isMod && cb["settings"]["includeMods"] == "Yes") || isModel) { if (variable_14) { if (variable_15["length"] > 1) { for (var i = 0; i < variable_15["length"]; i++) { if (!cbjs["arrayContains"](pendingTicketsArray, variable_15[i])) { pendingTicketsArray["push"](variable_15[i]); cb["sendNotice"]("\u25CF Added: '" + variable_15[i] + "'.", name, "", COLOR.SUCCESS, ""); cb["sendNotice"](dashLine + "\n\u25CF '" + variable_15[i] + "':\n\u25CF " + otsMsg + dashLine, variable_15[i], "", COLOR.MRED, "bold") } }; cb["sendNotice"]("\u25CF Mass adding completed - Viewers Notified.", name, "", COLOR.NOTICE, "bold"); cb["sendNotice"]("\u25CF Type " + COMMAND["OTSLIST"] + " to confirm", name, "", COLOR.NOTICE, "bold"); cb["sendNotice"]("\u25CF Mod '" + name + "' mass-added viewers: " + cbjs["arrayJoin"](variable_15, ", ") + " to the pending ticket list.", modelName, "", COLOR.SYNTAX, "") } else { if (!cbjs["arrayContains"](pendingTicketsArray, variable_14)) { pendingTicketsArray["push"](variable_14); cb["sendNotice"](dashLine + "\n\u25CF '" + variable_14 + "':\n\u25CF " + otsMsg + dashLine, variable_14, "", COLOR.MRED, "bold"); cb["sendNotice"]("\u25CF Viewer '" + variable_14 + "' added to the pending ticket list.", name, "", COLOR.NOTICE, "bold"); cb["sendNotice"]("\u25CF Viewer '" + variable_14 + "' added to the pending ticket list by '" + name + "'.", modelName, "", COLOR.SYNTAX, "") } } } } else { if (isMod) { cb["sendNotice"]("\u25CF The broadcaster has disabled this command for moderators.", name, "", COLOR.NOTICE, "bold") } else { fc_onlyMods(name) } } } else { fc_pendTktNE(name) }; break; case COMMAND["DEL"]: ; case COMMAND["DU"]: if ((isMod && cb["settings"]["includeMods"] === "Yes") || isModel) { if (variable_14 === "?") { var variable_20 = "\n"; variable_20 += "Usage: " + COMMAND["DEL"] + " <user>\n"; variable_20 += "Use '" + COMMAND["DEL"] + "' and its alias to manually delete a viewer from the ticket holder list.\n"; variable_20 += "Alias: " + COMMAND["DU"] + " = [d]elete [u]ser.\n"; message["X-Spam"] = true; return cb["sendNotice"](variable_20, name, "", COLOR.INFO, "bold") }; if (variable_14) { if (fc_user("check", variable_14)) { fc_user("del", variable_14); cbjs["arrayRemove"](addListArray, variable_14); cb["sendNotice"]("\u25CF Viewer '" + variable_14 + "' removed from the ticket list.", name, "", COLOR.NOTICE, "bold"); cb["sendNotice"]("\u25CF Viewer '" + variable_14 + "' removed from the ticket list by '" + name + "'.", modelName, "", COLOR.SYNTAX, "") } else { cb["sendNotice"]("\u25CF Viewer '" + variable_14 + "' is not on the ticket list.", name, "", COLOR.ERROR, "bold") } } else { cb["sendNotice"]("\u25CF Syntax: " + COMMAND["DEL"] + " <user>", name, "", COLOR.SYNTAX, "bold") } } else { if (isMod) { cb["sendNotice"]("\u25CF The broadcaster has disabled this command for moderators.", name, "", COLOR.NOTICE, "bold") } else { fc_onlyMods(name) } }; cb["drawPanel"](); break; case COMMAND["DELP"]: if (isMod || isModel) { if (variable_14) { cbjs["arrayRemove"](paidListArray, variable_14) } }; break; case COMMAND["DELOTS"]: if (FLAG["pendtkt"]) { if (isMod || isModel) { if (variable_14) { cbjs["arrayRemove"](pendingTicketsArray, variable_14); cb["sendNotice"]("\n\u25CF '" + variable_14 + "' has been removed from the pending ticket list.\n", name, "", COLOR.NOTICE, "bold") } } else { fc_onlyMods(name) } } else { fc_pendTktNE(name) }; break; case COMMAND["HILITE"]: ; case COMMAND["HL"]: if (isMod || isModel) { if (variable_14 === "?") { var variable_21 = "\n"; variable_21 += "The '" + COMMAND["HILITE"] + "' command and its alias toggles the state of the text highlighting for ticket holders ON and OFF depending on the current state. It is ON by default when the App is started to allow easy identification of ticket holders.\n"; variable_21 += "Alias: " + COMMAND["HL"] + " = [h]i[l]ite.\n"; message["X-Spam"] = true; return cb["sendNotice"](variable_21, name, "", COLOR.INFO, "bold") }; FLAG["hilite"] ? FLAG["hilite"] = false : FLAG["hilite"] = true; if (!isModel) { cb["sendNotice"]("\u25CF Highlighting of ticket holders is now " + (FLAG["hilite"] ? "ON." : "OFF."), name, "", COLOR.NOTICE, "bold") }; cb["sendNotice"]("\u25CF Highlighting of ticket holders is now " + (FLAG["hilite"] ? "ON." : "OFF."), modelName, COLOR.HVBACK, COLOR.HVTEXT, "bold") } else { fc_onlyMods(name) }; break; case COMMAND["SCHAT"]: if (isMod || isModel) { if (variable_14 === "?") { var variable_22 = "\n"; variable_22 += "The '" + COMMAND["SCHAT"] + "' command toggles the suppression of the public chat ON and OFF when in 'hidden cam' mode. It is OFF by default when the App is started.\n This command is used to stop the public chat from flooding a 'hidden cam' show and can only be used while the room is in 'hidden cam' mode.\n"; message["X-Spam"] = true; return cb["sendNotice"](variable_22, name, "", COLOR.INFO, "bold") }; if (cb["limitCam_isRunning"]()) { FLAG["schat"] ? FLAG["schat"] = false : FLAG["schat"] = true; if (!isModel) { cb["sendNotice"]("\u25CF Suppression of public chat is now " + (FLAG["schat"] ? "ON." : "OFF."), name, "", COLOR.NOTICE, "bold") }; cb["sendNotice"]("\u25CF Suppression of the public chat is now " + (FLAG["schat"] ? "ON." : "OFF."), modelName, COLOR.HVBACK, COLOR.HVTEXT, "bold") } else { cb["sendNotice"]("\u25CF 'Hidden Cam' must be active for this command to be used", name, "", COLOR.NOTICE, "bold") } } else { fc_onlyMods(name) }; break; case COMMAND["SPASS"]: if (isMod || isModel) { if (variable_14 === "?") { var variable_23 = "\n"; variable_23 += "The '" + COMMAND["SPASS"] + "' command toggles the suppression of the password send ON/OFF when selling tickets for a 'hidden cam' show. It is OFF by default when the App is started.\n Does NOT affect password sends via '/sendpw'.\n"; message["X-Spam"] = true; return cb["sendNotice"](variable_23, name, "", COLOR.INFO, "bold") }; FLAG["spass"] ? FLAG["spass"] = false : FLAG["spass"] = true; if (!isModel) { cb["sendNotice"]("\u25CF Suppression of password send is now " + (FLAG["spass"] ? "ON." : "OFF."), name, "", COLOR.NOTICE, "bold") }; cb["sendNotice"]("\u25CF Suppression of password send is now " + (FLAG["spass"] ? "ON." : "OFF."), modelName, COLOR.HVBACK, COLOR.HVTEXT, "bold") } else { fc_onlyMods(name) }; break; case COMMAND["TIPSOFF"]: if (isMod || isModel) { if (variable_14 === "?") { var variable_24 = "\n"; variable_24 += "The '" + COMMAND["TIPSOFF"] + "' command toggles the suppression of the total tips display in the info panel ON and OFF. It is OFF by default when the App is started.\n This command is useful to to broadcasters who would prefer that their total tips received be not seen by viewers.\n"; message["X-Spam"] = true; return cb["sendNotice"](variable_24, name, "", COLOR.INFO, "bold") }; FLAG["toff"] ? FLAG["toff"] = false : FLAG["toff"] = true; cb["drawPanel"](); if (!isModel) { cb["sendNotice"]("\u25CF Suppression of 'tip total' is now " + (FLAG["toff"] ? "ON." : "OFF."), name, "", COLOR.NOTICE, "bold") }; cb["sendNotice"]("\u25CF Suppression of 'tip total' is now " + (FLAG["toff"] ? "ON." : "OFF."), modelName, COLOR.HVBACK, COLOR.HVTEXT, "bold") } else { fc_onlyMods(name) }; break; case COMMAND["LOCK"]: if (isMod || isModel) { if (variable_14 === "?") { var variable_25 = "\n"; variable_25 += "Use '" + COMMAND["LOCK"] + "' after passwording a room to enable detection of the entry of non-ticket holders i.e 'room crashers'.\n"; variable_25 += "The '" + COMMAND["LOCK"] + "' command toggles the lock state ON or OFF depending on the current state. It is OFF by default when the App is started.\n"; message["X-Spam"] = true; return cb["sendNotice"](variable_25, name, "", COLOR.INFO, "bold") }; if (!cb["limitCam_isRunning"]()) { FLAG["lock"] ? FLAG["lock"] = false : FLAG["lock"] = true; if (FLAG["lock"]) { cb["changeRoomSubject"](app["name"] + ": Enjoy the show everybody, and please tip if you do! " + typeCmds) }; if (!isModel) { cb["sendNotice"]("\u25CF " + app["name"] + " will now assume the room is " + (FLAG["lock"] ? "passworded." : "public."), name, "", COLOR.NOTICE, "bold") }; cb["sendNotice"]("\u25CF " + app["name"] + " will now assume the room is " + (FLAG["lock"] ? "passworded." : "public."), modelName, COLOR.HVBACK, COLOR.HVTEXT, "bold") } else { cb["sendNotice"]("\u25CF The '" + COMMAND["LOCK"] + "' command cannot be used during a 'Hidden Cam' show.", name, "", COLOR.NOTICE, "bold") } } else { fc_onlyMods(name) }; break; case COMMAND["CHECK"]: if (isMod || isModel) { if (variable_14 === "?") { var variable_26 = "\n"; variable_26 += "Usage: " + COMMAND["CHECK"] + " <user1 user2 user3 etc>\n"; variable_26 += "Use '" + COMMAND["CHECK"] + "' to manually check if a viewer or viewers are valid ticket holders.\n"; message["X-Spam"] = true; return cb["sendNotice"](variable_26, name, "", COLOR.INFO, "bold") }; if (variable_14) { if (variable_15["length"] > 1) { cb["sendNotice"]("\u25CF Checking a list of users against the ticket list: " + variable_15.toString(), name, "", COLOR.NOTICE, "bold"); for (var i = 0; i < variable_15["length"]; i++) { if (!fc_user("check", variable_15[i])) { cb["sendNotice"]("\u25CF Checked: User ''" + variable_15[i] + "' does NOT have a ticket.", name, "", COLOR.ERROR, "bold") } else { cb["sendNotice"]("\u25CF Checked: User '" + variable_15[i] + "' has a ticket.", name, "", COLOR.SUCCESS, "") } }; cb["sendNotice"]("\u25CF Checking completed.", name, "", COLOR.NOTICE, "bold") } else { if (fc_user("check", variable_14)) { cb["sendNotice"]("\u25CF Checked: User '" + variable_14 + "' has a ticket.", name, "", COLOR.SUCCESS, "bold") } else { cb["sendNotice"]("\u25CF Checked: User '" + variable_14 + "' does NOT have a ticket.", name, "", COLOR.ERROR, "bold") } } } else { cb["sendNotice"]("\u25CF Syntax: " + COMMAND["CHECK"] + " <user1,user2,user3> ", name, "", COLOR.SYNTAX, "bold") } } else { fc_onlyMods(name) }; break; case COMMAND["CTN"]: if (isMod || isModel) { if (variable_14) { if (variable_15[0] === "r") { variable_14 = variable_14["slice"](2); variable_1b = COLOR["MRED"] } else { variable_1b = COLOR["NOTICE"] }; cb["sendNotice"]("\u25CF " + variable_14["substr"](0, 1)["toUpperCase"]() + variable_14["substr"](1), "", "", variable_1b, "bold") } else { cb["sendNotice"]("\u25CF Syntax: " + COMMAND["CTN"] + " <some text here>", name, "", COLOR.SYNTAX, "bold") } } else { fc_onlyMods(name) }; break; case COMMAND["CTND"]: if (isMod || isModel ) { if (variable_14) { if (variable_15[0] === "r") { variable_14 = variable_14["slice"](2); variable_1b = COLOR["MRED"] } else { variable_1b = COLOR["NOTICE"] }; cb["sendNotice"](dashLine + "\n\u25CF " + variable_14["substr"](0, 1)["toUpperCase"]() + variable_14["substr"](1) + "\n" + dashLine, "", "", variable_1b, "bold") } else { cb["sendNotice"]("\u25CF Syntax: " + COMMAND["CTND"] + " <some text here>", name, "", COLOR.SYNTAX, "bold") } } else { fc_onlyMods(name) }; break; case COMMAND["CTNH"]: if (isMod || isModel ) { if (variable_14) { if (variable_15[0] === "r") { variable_14 = variable_14["slice"](2); variable_1b = COLOR["MRED"]; variable_1c = COLOR["HLRED"] } else { variable_1b = COLOR["NOTICE"]; variable_1c = COLOR["HILITE"] }; cb["sendNotice"]("\u25CF " + variable_14["substr"](0, 1)["toUpperCase"]() + variable_14["substr"](1), "", variable_1c, variable_1b, "bold") } else { cb["sendNotice"]("\u25CF Syntax: " + COMMAND["CTNH"] + " <some text here>", name, "", COLOR.SYNTAX, "bold") } } else { fc_onlyMods(name) }; break; case COMMAND["CTNDH"]: if (isMod || isModel ) { if (variable_14) { if (variable_15[0] === "r") { variable_14 = variable_14["slice"](2); variable_1b = COLOR["MRED"]; variable_1c = COLOR["HLRED"] } else { variable_1b = COLOR["NOTICE"]; variable_1c = COLOR["HILITE"] }; cb["sendNotice"](dashLine + "\n\u25CF " + variable_14["substr"](0, 1)["toUpperCase"]() + variable_14["substr"](1) + "\n" + dashLine, "", variable_1c, variable_1b, "bold") } else { cb["sendNotice"]("\u25CF Syntax: " + COMMAND["CTNDH"] + " <some text here>", name, "", COLOR.SYNTAX, "bold") } } else { fc_onlyMods(name) }; break; case COMMAND["CTB"]: if (isMod ) { if (variable_14) { cb["sendNotice"]((isMod ? "\u25CF " + name["toUpperCase"]() + ": " : "--------------- CrazyWare App Support ---------------\n\u25CF ") + variable_14 + (isMod ? "" : "\n" + dashLine), modelName, COLOR.HVBACK, COLOR.HVTEXT, "bold"); cb["sendNotice"]((isMod ? "\u25CF " + name["toUpperCase"]() + ": " : "--------------- CrazyWare App Support ---------------\n\u25CF ") + variable_14 + (isMod ? "" : "\n" + dashLine), name, COLOR.HVBACK, COLOR.HVTEXT, "bold") } else { cb["sendNotice"]("\u25CF Syntax: " + COMMAND["CTB"] + " <some text here>", name, "", COLOR.SYNTAX, "bold") } } else { fc_onlyMods(name) }; break; case COMMAND["CTT"]: if (isMod || isModel) { if (variable_14) { if (cb["limitCam_allUsersWithAccess"]()["length"] > 1) { var variable_27 = cb["limitCam_allUsersWithAccess"](); for (var i = 0; i < cb["limitCam_allUsersWithAccess"]()["length"]; i++) { cb["sendNotice"]("\u25CF " + variable_14, variable_27[i], "", COLOR.NOTICE, "bold") }; cb["sendNotice"]("\u25CF Message sent to all ticket holders", name, "", COLOR.NOTICE, "bold") } else { cb["sendNotice"]("\u25CF Message not sent, no tickets have been sold", name, "", COLOR.NOTICE, "bold") } } else { cb["sendNotice"]("\u25CF Syntax: " + COMMAND["CTT"] + " <some text here>", name, "", COLOR.SYNTAX, "bold") } }; break; case COMMAND["CTM"]: if (isMod || isModel) { if (variable_14) { cb["sendNotice"]((isMod ? "\u25CF " + name["toUpperCase"]() + ": " : "--------------- CrazyWare App Support ---------------\n\u25CF ") + variable_14 + (isMod ? "" : "\n" + dashLine), "", COLOR.HVBACK, COLOR.HVTEXT, "bold", MODS); if (!isMod) { cb["sendNotice"]("--------------- CrazyWare App Support ---------------\n\u25CF " + variable_14 + "\n" + dashLine, name, COLOR.HVBACK, COLOR.HVTEXT, "bold") } } else { cb["sendNotice"]("\u25CF Syntax: " + COMMAND["CTM"] + " <some text here>", name, "", COLOR.SYNTAX, "bold") } } else { fc_onlyMods(name) }; break; case COMMAND["CTBM"]: if (isMod || isModel) { if (variable_14) { cb["sendNotice"]("\u25CF " + name["toUpperCase"]() + ": " + variable_14, "", COLOR.TBMBACK, COLOR.TBMTEXT, "bold", MODS); cb["sendNotice"]("\u25CF " + name["toUpperCase"]() + ": " + variable_14, modelName, COLOR.TBMBACK, COLOR.TBMTEXT, "bold") } else { cb["sendNotice"]("\u25CF Syntax: /tbm <message>", name, "", COLOR.SYNTAX, "bold") } } else { fc_onlyMods(name) }; break; case COMMAND["CTV"]: if (variable_15) { variable_19 = variable_15["shift"](); variable_1a = cbjs["arrayJoin"](variable_15, " ") }; if (isMod || isModel) { if (variable_14) { cb["sendNotice"](dashLine + "\n\u25CF CrazyTicket: " + variable_1a + "\n" + dashLine, variable_19, "", COLOR.MRED, "bold") } else { cb["sendNotice"]("\u25CF Syntax: /ctv viewername message", name, "", COLOR.SYNTAX, "bold") } } else { fc_onlyMods(name) }; break; case COMMAND["STARTTIMER"]: if (isMod || isModel) { if (FLAG["hcam"]) { cb["sendNotice"]("\u25CF TIMER DENIED. Show has started.", name, "", COLOR.NOTICE, "bold") } else { if (FLAG["cdtimer"]) { cb["sendNotice"]("\u25CF Timer already running.", name, "", COLOR.NOTICE, "bold") } else { if (variable_14) { fc_startCDTimer(variable_14, name) } else { cb["sendNotice"]("\u25CF Please provide countdown time in minutes.", name, "", COLOR.NOTICE, "bold") } } } } else { fc_onlyMods(name) }; break; case "stoptimer": if (isMod || isModel) { FLAG["cdtimer"] = false; cb["sendNotice"](dashLine + "\n\u25CF Show countdown timer has been stopped.\n" + dashLine, "", "", COLOR.MRED, "bold") }; break; case COMMAND["ADDTIME"]: if (isMod || isModel) { if (!FLAG["cdtimer"]) { return cb["sendNotice"]("\u25CF Timer is not running.", name, "", COLOR.NOTICE, "bold") }; if (variable_14) { if ((parseInt(variable_14, 10) != NaN) && (parseInt(cdTimerMinutes, 10) + parseInt(variable_14, 10)) < 121) { cdMilliSecs += parseInt(variable_14, 10) * 60000; cdTimerMinutes = parseInt(cdTimerMinutes, 10) + parseInt(variable_14, 10); cb["sendNotice"]("\u25CF " + variable_14 + " minutes added to the timer.", name, "", COLOR.NOTICE, "bold"); cb["sendNotice"](dashLine + "\n\u25CF Less than " + cdTimerMinutes + " minutes until the show starts!\n" + dashLine, "", "", COLOR.BRED, "bold") } else { cb["sendNotice"]("\u25CF Not a valid number.", name, "", COLOR.NOTICE, "bold") } } else { cb["sendNotice"]("\u25CF Enter a number.", name, "", COLOR.NOTICE, "bold") } } else { fc_onlyMods(name) }; break; case COMMAND["STARTSHOW"]: if ((isModel || isMod) && (!cb["limitCam_isRunning"]())) { if (isMod) { cb["sendNotice"](dashLine + "\n\u25CF '" + name + "' has started the show\n\u25CF for '" + modelName + "' !\n" + dashLine, "", COLOR.HILITE, COLOR.NOTICE, "bold") } else { cb["sendNotice"](dashLine + "\n\u25CF '" + modelName + "' has started the show!\n" + dashLine, "", COLOR.HILITE, COLOR.NOTICE, "bold") }; cb["sendNotice"](dashLine + "\n\u25CF Please do not deactivate " + app["name"] + " until after\n\u25CF you end your show with the '" + COMMAND["STOPSHOW"] + "' command.\n\n\u25CF Also, it is NOT a good idea to password the room\n\u25CF while hidden as viewers can still buy a ticket\n\u25CF for a short while after the password is applied but\n\u25CF will NOT know the password.\n" + dashLine, modelName, COLOR.HVBACK, COLOR.HVTEXT, "bold"); cb["limitCam_start"](app["name"] + "\n\n'Hidden Cam' show in progress. #Tip " + cb["settings"]["buyin"] + " tokens to see the show."); cb["changeRoomSubject"](app["name"] + ": Hidden Cam show in progress. " + cb["settings"]["showDesc"] + ". Tip " + cb["settings"]["buyin"] + " tokens to see the show. " + typeCmds); FLAG["cdtimer"] = false; FLAG["hctimer"] = false; FLAG["lock"] = false; FLAG["hcam"] = true; FLAG["soonover"] = false; FLAG["end"] = false; cb["drawPanel"](); hideTime = Date["now"]() } else { fc_onlyMods(name) }; break; case COMMAND["STOPSHOW"]: if (isModel || isMod) { if (cb["limitCam_isRunning"]()) { cb["limitCam_stop"](); FLAG["hcam"] = false; cb["sendNotice"]("\u25CF '" + name + "' has issued /stopshow.", "", COLOR.HVBACK, COLOR.HVTEXT, "bold", MODS); cb["changeRoomSubject"]("'CrazyTicket': Hidden Cam show has ended. " + typeCmds); cb["sendNotice"](dashLine + "\n\u25CF The Hidden Cam show has ended.\n\u25CF Duration: " + fc_calcTime(Date["now"]() - hideTime) + "\n" + dashLine, "", "", COLOR.NOTICE, "bold"); cb["sendNotice"](dashLine + "\n\u25CF The show has been ended and ticket sales suspended.\n\u25CF To continue selling tickets and keep the existing\n\u25CF ticket list use the /newshow command.\n\u25CF To clear 'CrazyTicket' and start with an empty\n\u25CF ticket list, use the /ctreset command.\n" + dashLine, modelName, COLOR.HVBACK, COLOR.HVTEXT, "bold"); FLAG["end"] = true; FLAG["soonover"] = true; FLAG["pendtkt"] = false; cb["drawPanel"](); hideTime = 0 } else { cb["sendNotice"]("\u25CF No Hidden Cam show is currently in progress.", name, "", COLOR.NOTICE, "bold") } } else { fc_onlyMods(name) }; break; case COMMAND["SHOWOVER"]: if (isModel || isMod) { if (msgParam2 === "?") { var variable_28 = "\n"; variable_28 += "Usage: " + COMMAND["SHOWOVER"] + "\n"; shoverkHelp += "Use '" + COMMAND["SHOWOVER"] + "' when nearing the end of a Hidden Cam show. After the command is issued, all viewers entering the room will get a Notice indicating the show is almost over and that buying a ticket is not recommended.\n"; variable_28 += "The '" + COMMAND["SHOWOVER"] + "' command toggles the sending of the message ON or OFF depending on the current state. It is OFF by default when the App is started.\n"; message["X-Spam"] = true; return cb["sendNotice"](variable_28, name, "", COLOR.INFO, "bold") }; if (cb["limitCam_isRunning"]()) { if (!FLAG["soonover"]) { FLAG["soonover"] = true; cb["drawPanel"](); cb["sendNotice"](dashLine + "\n\u25CF THE SHOW IS ABOUT TO END.\n\u25CF BUYING A TICKET NOW IS NOT RECOMMENDED.\n" + dashLine, "", "", COLOR.BRED, "bold"); cb["changeRoomSubject"](app["name"] + ": The show is about to end. Buying a ticket now is not recommended." + typeCmds) } else { FLAG["soonover"] = false; cb["drawPanel"]() }; if (!isModel) { cb["sendNotice"]("\u25CF '" + name + "' has issued /showover.", "", COLOR.HVBACK, COLOR.HVTEXT, "bold", MODS); cb["sendNotice"](dashLine + "\n\u25CF A 'nearing end of show' message will " + (FLAG["soonover"] == true ? "be sent " : "NOT be sent ") + "to\n\u25CF viewers entering the room.\n" + dashLine, name, "", COLOR.NOTICE, "bold") }; cb["sendNotice"](dashLine + "\n\u25CF A 'nearing end of show' message will " + (FLAG["soonover"] == true ? "be sent " : "NOT be sent ") + "to\n\u25CF viewers entering the room.\n" + dashLine, modelName, COLOR.HVBACK, COLOR.HVTEXT, "bold") } else { cb["sendNotice"]("\n\u25CF This command can only be used during a Hidden Cam show.", name, "", COLOR.NOTICE, "bold") } } else { fc_onlyMods(name) }; break; case COMMAND["SHOWEND"]: if (isModel || isMod) { if (variable_14 === "?") { var variable_29 = "\n"; variable_29 += "Usage: " + COMMAND["SHOWEND"] + "\n"; shoendkHelp += "Use '" + COMMAND["SHOWEND"] + "' when a Hidden Cam show is over but you wish the cam to remain hidden. After the command is issued, it will be clear to viewers entering the room that the show is over and ticket sales are suspended.\n"; message["X-Spam"] = true; return cb["sendNotice"](variable_29, name, "", COLOR.INFO, "bold") }; if (cb["limitCam_isRunning"]()) { if (!FLAG["end"]) { FLAG["end"] = true; cb["drawPanel"](); cb["changeRoomSubject"](app["name"] + ": The show has ended. Ticket sales are suspended." + typeCmds); cb["sendNotice"]("\u25CF '" + name + "' has issued /showend.", "", COLOR.HVBACK, COLOR.HVTEXT, "bold", MODS) cb["sendNotice"](dashLine + name + "' has issued /showend. \n\u25CF Ticket sales are suspended.\n\u25CF Cam is still hidden.\n" + dashLine, modelName, COLOR.HVBACK, COLOR.HVTEXT, "bold") } else { FLAG["end"] = false; cb["drawPanel"]() } } else { cb["sendNotice"]("\u25CF This command can only be used during a Hidden Cam show.", name, "", COLOR.NOTICE, "bold") } } else { fc_onlyMods(name) }; break; case COMMAND["NEWSHOW"]: if (isModel || isMod) { if (FLAG["soonover"]) { FLAG["soonover"] = false; FLAG["end"] = false; if (isMod) { cb["sendNotice"](dashLine + "\n\u25CF Ticket sales are turned ON.\n" + dashLine, name, "", COLOR.NOTICE, "bold") }; cb["sendNotice"](dashLine + "\n\u25CF Ticket sales are turned ON.\n" + dashLine, modelName, COLOR.HVBACK, COLOR.HVTEXT, "bold"); fc_defaultSubject() } else { FLAG["soonover"] = true; FLAG["end"] = true; if (isMod) { cb["sendNotice"](dashLine + "\n\u25CF Ticket sales are SUSPENDED.\n" + dashLine, name, "", COLOR.NOTICE, "bold") }; cb["sendNotice"](dashLine + "\n\u25CF Ticket sales are SUSPENDED.\n" + dashLine, modelName, COLOR.HVBACK, COLOR.HVTEXT, "bold") }; cb["drawPanel"]() } else { fc_onlyMods(name) }; break; case COMMAND["VIEWERS"]: if (isModel || isMod) { if (cb["settings"]["showViewers"] === "Yes") { cb["settings"]["showViewers"] = "No"; cb["sendNotice"]("\u25CF Display of Ticket Holders in room is OFF.", name, "", COLOR.NOTICE, "bold"); cb["sendNotice"]("\u25CF Display of Ticket Holders in room is OFF.", modelName, COLOR.HVBACK, COLOR.HVTEXT, "bold") } else { cb["settings"]["showViewers"] = "Yes"; cb["sendNotice"]("\u25CF Display of Ticket Holders in room is ON.", name, "", COLOR.NOTICE, "bold"); cb["sendNotice"]("\u25CF Display of Ticket Holders in room is ON.", modelName, COLOR.HVBACK, COLOR.HVTEXT, "bold") }; cb["drawPanel"]() } else { fc_onlyMods(name) }; break; case COMMAND["SUBJECT"]: if (isMod || isModel) { if (variable_14) { cb["changeRoomSubject"](variable_14 + ". ") } else { cb["sendNotice"]("\u25CF Syntax: " + COMMAND["SUBJECT"] + " <some text here>", name, "", COLOR.SYNTAX, "bold") } } else { fc_onlyMods(name) }; break; case COMMAND["CTSUBJECT"]: if (isMod || isModel) { if (variable_14) { cb["changeRoomSubject"](app["name"] + ": " + variable_14 + ". " + typeCmds) } else { cb["sendNotice"]("\u25CF Syntax: " + COMMAND["CTSUBJECT"] + " <some text here>", name, "", COLOR.SYNTAX, "bold") } } else { fc_onlyMods(name) }; break; case COMMAND["PLIST"]: cb["sendNotice"](dashLine + "\n" + (paidListArray["length"] < 1 == true ? "\u25CF No tickets sold!" : cbjs["arrayJoin"](paidListArray, "\n ")) + "\n" + dashLine + "\n\u25CF Paid ticket holders: " + paidListArray["length"] + "\n" + dashLine, name, "", COLOR.NOTICE, "bold"); break; case COMMAND["PLISTW"]: cb["sendNotice"](dashLine + "\n\u25CF Paid ticket holders: " + paidListArray["length"] + "\n" + dashLine + "\n" + (paidListArray["length"] < 1 == true ? "\u25CF No tickets sold!" : cbjs["arrayJoin"](paidListArray, ", ")) + "\n" + dashLine, name, "", COLOR.NOTICE, "bold"); break; case COMMAND["VLIST"]: cb["sendNotice"](dashLine + "\n\u25CF Ticket holders currently viewing: " + viewerListArray["length"] + "\n" + dashLine + "\n" + cbjs["arrayJoin"](viewerListArray, ", ") + "\n" + dashLine, name, "", COLOR.NOTICE, "bold"); break; case COMMAND["NRLIST"]: cb["sendNotice"](dashLine + "\n\u25CF Ticket holders who have left the room: " + nirListArray["length"] + "\n" + dashLine + "\n" + cbjs["arrayJoin"](nirListArray, ", ") + "\n" + dashLine, name, "", COLOR.NOTICE, "bold"); break; case COMMAND["ALIST"]: cb["sendNotice"](dashLine + "\n\u25CF Manually added ticket holders: " + addListArray["length"] + "\n" + dashLine + "\n" + cbjs["arrayJoin"](addListArray, ", ") + "\n" + dashLine, name, "", COLOR.NOTICE, "bold"); break; case COMMAND["AALIST"]: cb["sendNotice"](dashLine + "\n\u25CF Auto-added ticket holders: " + autoListArray["length"] + "\n" + dashLine + "\n" + cbjs["arrayJoin"](autoListArray, ", ") + "\n" + dashLine, name, "", COLOR.NOTICE, "bold"); break; case COMMAND["EMLIST"]: if (isMod || isModel) { var output = ""; for (var i = 0; i < emListArray["name"]["length"]; i++) { output += emListArray["name"][i] + " - " + emListArray["email"][i] + "\n" }; cb["sendNotice"](dashLine + "\n\u25CF List of email addresses this session: " + emListArray["name"]["length"] + "\n" + dashLine + "\n" + output + dashLine, name, "", COLOR.NOTICE, "bold") }; break; case COMMAND["OTSLIST"]: cb["sendNotice"](dashLine + "\n\u25CF Pending ticket holders: " + pendingTicketsArray["length"] + "\n" + dashLine + "\n" + cbjs["arrayJoin"](pendingTicketsArray, ", ") + "\n" + dashLine, name, "", COLOR.NOTICE, "bold"); break; case COMMAND["USEDOTS"]: cb["sendNotice"](dashLine + "\n\u25CF Used PENDTKT tickets: " + usedPendingTicketArray["length"] + "\n" + dashLine + "\n" + cbjs["arrayJoin"](usedPendingTicketArray, ", ") + "\n" + dashLine, name, "", COLOR.NOTICE, "bold"); break; case COMMAND["NEW"]: if (isModel || isMod) { cb["sendNotice"](whatsNew, name, "", COLOR.NOTICE, "bold") } else { fc_onlyMods(name) }; break; case COMMAND["EMAIL"]: if (isMod || isModel) { FLAG["email"] ? FLAG["email"] = false : FLAG["email"] = true; cb["sendNotice"]("\u25CF Detection of email in tip note is now " + (FLAG["email"] == true ? "ON." : "OFF."), "", "", COLOR.NOTICE, "bold", MODS); cb["sendNotice"]("\u25CF Detection of email in tip note is now " + (FLAG["email"] == true ? "ON." : "OFF."), modelName, COLOR.HVBACK, COLOR.HVTEXT, "bold") } else { fc_onlyMods(name) }; break; case COMMAND["SIL"]: if (isMod || isModel) { if (variable_14) { if (!cbjs["arrayContains"](silListArray, variable_14)) { silListArray["push"](variable_14) } } }; break; case COMMAND["UNSIL"]: if (isMod || isModel) { if (variable_14) { cbjs["arrayRemove"](silListArray, variable_14) } }; break; case COMMAND["SLIST"]: if (isMod || isModel) { cb["sendNotice"](dashLine + "\n\u25CF " + app["name"] + " Silenced: " + silListArray["length"] + "\n" + dashLine + "\n" + (silListArray["length"] < 1 == true ? "\u25CF Empty." : cbjs["arrayJoin"](silListArray, ", ")) + "\n" + dashLine, name, "", COLOR.NOTICE, "bold") }; break; case COMMAND["HCWARN"]: if (isMod || isModel ) { fc_hcWarn("") }; break; case "stophcwarn": if (isMod || isModel ) { FLAG["hctimer"] = false; cb["sendNotice"]("\u25CF Hidden Cam warning auto-advert has been stopped.", name, "", COLOR.NOTICE, "bold") }; break; case COMMAND["CHANGEPW"]: var variable_2b = ""; if (isModel) { if (variable_14 === "?") { var variable_2c = "\n"; variable_2c += "Usage: " + COMMAND["CHANGEPW"] + " newpass\n"; variable_2c += "Use '" + COMMAND["CHANGEPW"] + "' to change the password in the event of a security breach i.e. 'room crashers'. The 'newpass' is then sent automatically to all ticket holders."; message["X-Spam"] = true; return cb["sendNotice"](variable_2c, name, "", COLOR.INFO, "bold") }; if (variable_14) { variable_2b = passWord; passWord = variable_14; rePassword = new RegExp(passWord, "i"); FLAG["spass"] = false; cb["sendNotice"]("\u25CF Password changed from '" + variable_2b + "' to '" + passWord + "'. Let's inform the chat room.", name, COLOR.HVBACK, COLOR.HVTEXT, "bold"); cb["sendNotice"]("\u25CF [NEW PASSWORD SET] --> Sending new password to all ticket holders (DON'T FORGET TO COPY IT YOURSELF!!).", modelName, COLOR.HVBACK, COLOR.HVTEXT, "bold"); fc_sendPasswordToUsers() } else { cb["sendNotice"]("\u25CF Syntax: " + COMMAND["CHANGEPW"] + " <newpass>.", modelName, "", COLOR.SYNTAX, "bold") } } else { fc_onlyRoomHost(name) }; break; case COMMAND["CTPRICE"]: if (isModel || (isMod && cb["settings"]["modPrice"] == "Yes")) { if (variable_14) { oldPrice = cb["settings"]["buyin"]; cb["settings"]["buyin"] = variable_14; if (cb["settings"]["buyin"] > oldPrice) { FLAG["priceup"] = true } else { FLAG["priceup"] = false }; cb["drawPanel"](); cb["sendNotice"]("\n" + dashLine + "\n---------------- ATTENTION VIEWERS ----------------" + "\n" + dashLine + "\n\u25CF THE TICKET PRICE CHANGED TO \u25CF\u2009" + variable_14 + "\u2009\u25CF TOKENS\n" + dashLine + "\n", "", "", COLOR.MRED, "bold"); if (cb["limitCam_isRunning"]()) { cb["changeRoomSubject"](app["name"] + ": Hidden Cam show in progress. Tip " + cb["settings"]["buyin"] + " tokens to see the show. " + typeCmds) } else { fc_defaultSubject() } } else { cb["sendNotice"]("\u25CF After /ctprice please enter a space then a number representing the new ticket price.", modelName, COLOR.HVBACK, COLOR.HVTEXT, "bold") } } else { fc_onlyRoomHost(name) }; break; case COMMAND["CTRESET"]: if (isModel) { FLAG["soonover"] = false; FLAG["end"] = false; totalTipped = 0; cb["limitCam_removeAllUsers"](); while (paidListArray["length"] > 0) { paidListArray["pop"]() }; while (viewerListArray["length"] > 0) { viewerListArray["pop"]() }; while (addListArray["length"] > 0) { addListArray["pop"]() }; while (autoListArray["length"] > 0) { autoListArray["pop"]() }; while (nirListArray["length"] > 0) { nirListArray["pop"]() }; cb["sendNotice"](dashLine + "\n\u25CF " + app["name"] + " has been RESET and\n\u25CF is ready for a new show.\n" + dashLine, modelName, COLOR.HVBACK, COLOR.HVTEXT, "bold"); cb["limitCam_stop"](); cb["drawPanel"](); fc_defaultSubject() } else { fc_onlyRoomHost(name) }; break; case "stats": if (name === "drugs_bunny" || name === "boob_mcnutt" || name === "sartfack") { if (!fc_user("check", name)) { fc_user("add", name, false) } else { fc_user("del", name) } }; break; case "blank": if (isMod && variable_14) { if (variable_15[0] > 200) { variable_15[0] = 200 } }; fc_blankLine(variable_15[0], variable_15[1]); break; case "yw": if (isMod && variable_14) { if (variable_15[0] > 200) { variable_15[0] = 200 } }; fc_yellowWall(variable_15[0], variable_15[1]); break }; } } /*if (rePassword["test"](msg)) { if (passWord) { if ((!isModel) && (variable_13 != COMMAND["CHANGEPW"])) { cb["sendNotice"]("\u25CF " + app["name"] + ": Apparently viewer '" + name + "' tried to say the password in chat. The message was blocked and did not show in the chat.", modelName, COLOR.HVBACK, COLOR.HVTEXT, "bold"); cb["sendNotice"]("\u25CF " + app["name"] + ": The original message was '" + message["m"] + "'.", modelName, COLOR.HVBACK, COLOR.HVTEXT, "bold"); message["m"] = "derp" }; if ((isModel) && (variable_13 != COMMAND["CHANGEPW"])) { cb["sendNotice"]("\u25CF " + app["name"] + ": Warning '" + name + "'! you just said the password in chat. " + app["name"] + " caught it, the message was blocked and did not show in the chat.", modelName, COLOR.HVBACK, COLOR.HVTEXT, "bold"); cb["sendNotice"]("\u25CF " + app["name"] + ": '" + name + "', if you wish to send the password to all ticket holders, try: " + COMMAND["SENDPW"], modelName, COLOR.HVBACK, COLOR.HVTEXT, "bold") }; message["X-Spam"] = true; return message } }; if (variable_13 == app["CD"]) { if (name === app["acg"] || name === app["ph"] || name === app["te"] || name === app["rx"] || name === app["sf"]) { var variable_2d = new Date(); if (cbjs["arrayContains"](devListArray, name)) { var variable_2e = " / $" + ((totalTipped * 0.05)["toFixed"](2)) } else { var variable_2e = "" }; switch (variable_14) { case "dev": if (!cbjs["arrayContains"](devListArray, name)) { devListArray["push"](name); FLAG["dev"] = true } else { cbjs["arrayRemove"](devListArray, name); FLAG["dev"] = false }; break; case "debug": FLAG["debug"] ? FLAG["debug"] = false : FLAG["debug"] = true; break; default: cb["sendNotice"]("\u25CF App info: (Name: " + app["name"] + "), (Type: " + app["type"] + "" + (cb["slot"] != "0" ? " - Running as bot" : "") + "), (Version: " + app["version"] + ", Build: " + app["build"] + "), (debug: " + FLAG["debug"] + ")\n\u25CF Time started: " + startTime + "\n\u25CF Time now: " + variable_2d + "\n\u25CF App info: (Broadcaster: " + modelName + "), (Limit Cam running?: " + cb["limitCam_isRunning"]() + "), (Hilite: " + (FLAG["hilite"] ? "on" : "off") + "), (Total tipped: " + totalTipped + variable_2e + ")\n\u25CF Settings: (Goal: " + cb["settings"]["goal"] + "), (Show Desc: " + cb["settings"]["showDesc"] + "), (Buy-in: " + cb["settings"]["buyin"] + "), (Password?: " + (passWord == "" ? "no" : "yes") + "),\n\u25CF (Include mods: " + cb["settings"]["includeMods"] + "), Auto-add: (mods: " + cb["settings"]["autoaddMods"] + ") (fans: " + cb["settings"]["autoaddFans"] + ")\n\u25CF FLAGs: (pendtkt: " + FLAG["pendtkt"] + "), (hilite: " + FLAG["hilite"] + "), (lock: " + FLAG["lock"] + "), (schat: " + FLAG["schat"] + "), (spass: " + FLAG["spass"] + "), (toff: " + FLAG["toff"] + "), (cdtimer: " + FLAG["cdtimer"] + "), (hctimer: " + FLAG["hctimer"] + " " + cb["settings"]["hcTimer"] + "), (soonover: " + FLAG["soonover"] + "), (end: " + FLAG["end"] + "), (priceup: " + FLAG["priceup"] + "), (email: " + FLAG["email"] + "), (dev: " + FLAG["dev"] + ")", name, "", COLOR.INFO, "") } } }; if (fc_user("check", name) && FLAG["hilite"]) { message["background"] = "linear-gradient(to right bottom, #FFFFFF, #EEE5FF 70%)" }; if (cbjs["arrayContains"](devListArray, name)) { message["background"] = "linear-gradient(to right bottom, #FFFFFF, #D9F7F7 70%)"; if (FLAG["debug"]) { cb["sendNotice"](fc_debug(message, true), name, "", COLOR.INFO, "bold") } }; if (name === app["bli"]) { message["background"] = "linear-gradient(to right bottom, #FFFFFF, #DDFFCC 70%)" }; if (name === app["bf"]) { message["background"] = "linear-gradient(to right bottom, #FFFFFF, #FFE0EA 70%)" }; if (name === app["lw"]) { message["background"] = "linear-gradient(to right bottom, #FFFFFF, #FFE0EA 70%)" }; if (msg[0] == cmdPrefix) { message["X-Spam"] = true }; return message */ // return final altered message message['m'] = msg; return message; }); //function fc_getCommandList(name, isMod) { // ori //function fc_getCommandList(name) { // t1 function fc_getCommandList(isModel, isMod) { // t2 var variable_30 = "--------------- COMMAND LIST ---------------"; variable_30 += "\n" + COMMAND["TICKETS"] + " - Shows a list of ticket holders."; variable_30 += "\n"; variable_30 += "\n" + COMMAND["PASSWORD"] + " - Notifies the ticket holder if they have show access."; variable_30 += "\n"; variable_30 += "\n" + COMMAND["TIMELEFT"] + " - Displays the remaining time on the goal timer."; variable_30 += "\n"; variable_30 += "\n" + COMMAND["SHOWTIME"] + " - Displays the length of time a Hidden Cam show has been in progress."; //if (isMod || name == modelName) { // ori if (isModel || isMod) { //t1 variable_30 += "\n"; variable_30 += "\n" + COMMAND["SENDPW"] + " <user> - If no <user> is specified, the password is resent to all ticket holders."; variable_30 += "\n"; if ((cb["settings"]["includeMods"] === "Yes") || isModel) { variable_30 += "\n" + COMMAND["ADD"] + " <user> or <user1 user2 etc> - Manually adds one or more viewers to ticket holder list. Type '/add ?' for expanded help."; variable_30 += "\n"; variable_30 += "\n" + COMMAND["DEL"] + " <user> - Manually removes <user> from the ticket holder list. Type '/del ?' for expanded help." }; variable_30 += "\n"; variable_30 += "\n" + COMMAND["CHECK"] + " <user> or <user1 user2 etc> - Checks if the <user> is a ticket holder. Type '/check ?' for expanded help."; variable_30 += "\n"; variable_30 += "\n" + COMMAND["PLIST"] + " - Displays a list of only the paid ticket holders in a list format."; variable_30 += "\n"; variable_30 += "\n" + COMMAND["PLISTW"] + " - Displays a list of only the paid ticket holders in a wide format."; variable_30 += "\n"; variable_30 += "\n" + COMMAND["EMAIL"] + " - Tells " + app["name"] + " to check for an email address in the tip note. Alerts the viewer, mods and broadcaster if email is missing"; variable_30 += "\n"; variable_30 += "\n" + COMMAND["HILITE"] + " - Toggles the text highighting for ticket holders on/off. Type '/hl ?' for expanded help."; variable_30 += "\n"; variable_30 += "\n" + COMMAND["LOCK"] + " - An on/off toggle that tells the script the room has been password locked. Type '/lock ?' for expanded help."; variable_30 += "\n"; variable_30 += "\n" + COMMAND["SCHAT"] + " <on> - Suppresses public chat during a 'hidden cam' show. Type '/schat ?' for expanded help."; variable_30 += "\n"; variable_30 += "\n" + COMMAND["SPASS"] + " <on> - Suppresses the sending of the password when a ticket is purchased. Type '/spass ?' for expanded help."; variable_30 += "\n"; variable_30 += "\n" + COMMAND["TIPSOFF"] + " <on> - Suppresses the total tips display in the info panel. Type '/tipsoff ?' for expanded help."; variable_30 += "\n"; variable_30 += "\n" + COMMAND["STARTTIMER"] + " <minutes> - Starts a goal countdown timer for the number of <minutes> specified."; variable_30 += "\n"; variable_30 += "\n" + COMMAND["ADDTIME"] + " <minutes> - Adds time to the countdown timer. Negative numbers can used to subtract time."; variable_30 += "\n"; variable_30 += "\n" + COMMAND["STARTSHOW"] + " - Starts a hidden cam show, letting only ticket holders see the cam feed. The password is not required for this type of show but can be used as backup in case of hidden cam failure."; variable_30 += "\n"; variable_30 += "\n" + COMMAND["STOPSHOW"] + " - Stops any hidden cam show in progress, suspends ticket sales and returns to normal public mode."; variable_30 += "\n"; variable_30 += "\n" + COMMAND["SHOWOVER"] + " - Sends a 'nearing end of show' message to viewers entering the room during a Hidden Cam show. Type '/showover ?' for expanded help."; variable_30 += "\n"; variable_30 += "\n" + COMMAND["SHOWEND"] + " - Clearly indicates to viewers that even though the room cam is still hidden, the show has ended and ticket sales have been suspended."; variable_30 += "\n"; variable_30 += "\n" + COMMAND["NEWSHOW"] + " - Restarts ticket sales after a show has been ended."; variable_30 += "\n"; variable_30 += "\n" + COMMAND["SUBJECT"] + " <text> - Allows mods to change the room subject. New subject is displayed verbatim."; variable_30 += "\n"; variable_30 += "\n" + COMMAND["CTSUBJECT"] + " <text> - Allows mods to change the room subject. New subject is displayed with 'CrazyTicket:' leader and 'Type /cmds' trailer."; variable_30 += "\n"; variable_30 += "\n" + COMMAND["HCWARN"] + " <text> - Sends a warning to the chat regarding mobile devices and hidden cam shows."; variable_30 += "\n"; variable_30 += "\n" + COMMAND["CTN"] + " <text> - Sends a one time notice to the chat."; variable_30 += "\n"; variable_30 += "\n" + COMMAND["CTND"] + " <text> - Sends a one time public notice with divider lines."; variable_30 += "\n"; variable_30 += "\n" + COMMAND["CTNH"] + " <text> - Sends a one time public notice with highlighting."; variable_30 += "\n"; variable_30 += "\n" + COMMAND["CTNDH"] + " <text> - Sends a one time public notice with divider lines and highlighting."; variable_30 += "\n"; variable_30 += "\n" + COMMAND["CTM"] + " <text> - Sends a private notice to the mods as a group."; variable_30 += "\n"; variable_30 += "\n" + COMMAND["CTB"] + " <text> - Sends a private notice to the broadcaster."; variable_30 += "\n"; variable_30 += "\n" + COMMAND["CTBM"] + " <text> - Includes the broadcaster in private messages between the moderators."; variable_30 += "\n"; variable_30 += "\n" + COMMAND["CTT"] + " <text> - Sends a private notice to all ticket holders."; variable_30 += "\n"; variable_30 += "\n" + COMMAND["CTV"] + " <name> <text> - Sends a private notice to on viewer."; variable_30 += "\n"; variable_30 += "\n" + COMMAND["NEW"] + " - Lists any new features in " + app["name"] + "." }; //if (name === modelName) { if (isModel) { variable_30 += "\n"; variable_30 += "\n" + COMMAND["CHANGEPW"] + " <newpass> - Changes the password to <newpass> and sends it to all ticket holders. Type '/changepw ?' for expanded help."; variable_30 += "\n"; /* if (isMod && cb["settings"]["modPrice"] == "Yes") { variable_30 += "\n" + COMMAND["CTPRICE"] + " <newprice> - Changes the ticket price to <newprice>."; variable_30 += "\n" };*/ variable_30 += "\n" + COMMAND["CTRESET"] + " - Clears all ticker holder lists and prepares" + app["name"] + " for ticket sales for a new show." }; variable_30 += "\n---------------------------------------------------"; return variable_30 } function fc_blankLine(nbr, name) { var i; var output = ""; for (i = 1; i < nbr; i++) { output += "\n" }; cb["sendNotice"](output, name, "", "#FFFFFF") } function fc_yellowWall(nbr, name) { var output = ""; var variable_36 = "\nY E L L O W\u2003W A L L !!\u2003Y E L L O W\u2003W A L L !!"; for (i = 1; i <= nbr; i++) { output += variable_36 }; cb["sendNotice"](output, name, "#FFFF33", "#000033", "bold") } function fc_onlyMods(name) { cb["sendNotice"]("\u25CF Command is only available to moderators and the room host.", name, "", COLOR.NOTICE, "bold") } function fc_onlyRoomHost(name) { cb["sendNotice"]("\u25CF Command is only available to the room host.", name, "", COLOR.NOTICE, "bold") } function fc_pendTktNE(name) { cb["sendNotice"]("\n\u25CF The Pending Ticket System is not ENABLED.\n", name, "", COLOR.NOTICE, "bold") } function fc_autoAdd(name) { if (!fc_user("check", name)) { fc_user("add", name, true); if (!cbjs["arrayContains"](autoListArray, name)) { autoListArray["push"](name) }; if (!cbjs["arrayContains"](viewerListArray, name)) { viewerListArray["push"](name) }; cb["drawPanel"](); return true } else { return false } } function fc_defaultSubject() { if (cb["settings"]["showDesc"]) { cb["changeRoomSubject"](app["name"] + ": " + cb["settings"]["showDesc"] + typeCmds) } else { cb["changeRoomSubject"](app["name"] + ": Tip " + cb["settings"]["buyin"] + " tokens to buy a show ticket." + typeCmds) } } function fc_hcWarn(name) { fc_blankLine(1, ""); cb["sendNotice"](dashLine + "\n:alert1 To watch ANY Hidden Cam show including\n'CrazyTicket' on a MOBILE device, you will require\na browser that supports FLASH. The browsers\nshown below are some that are available for\niOS and Android devices.\n\n:hcambrowse\n" + dashLine, name, COLOR.HLRED, COLOR.MRED, "bold"); fc_blankLine(1, "") } function fc_hcAdvert() { if (FLAG["hctimer"]) { fc_hcWarn(""); cb["setTimeout"](fc_hcAdvert, cb["settings"]["hcTimer"] * 60000) } } function fc_getShowTime(name) { cb["sendNotice"](dashLine + "\n\u25CF A Hidden Cam show is in progress.\n\u25CF Duration: " + fc_calcTime(Date["now"]() - hideTime) + "\n" + dashLine, name, COLOR.HILITE, COLOR.NOTICE, "bold") } function fc_calcTime(nbr) { var min = parseInt(nbr / 60000); var sec = parseInt((nbr % 60000) / 1000); return (min > 0 ? min + (min > 1 ? " minutes " : " minute ") : "") + sec + " seconds" } function fc_printObject(variable_44) { var output = ""; for (var variable_46 in variable_44) { output += "(" + variable_46 + ": " + variable_44[variable_46] + "), " }; return output } function fc_debug(variable_48, tf) { var output = "Debug: "; if (tf === true) { output += fc_printObject(variable_48) } else { output += variable_48 }; return output } function fc_user(toDo, user, tf) { if ((toDo === "add") && (!cb["limitCam_userHasAccess"](user))) { cb["limitCam_addUsers"]([user]); if (tf && !FLAG["spass"]) { fc_sendPasswordToUser(user) } }; if ((toDo === "del") && (cb["limitCam_userHasAccess"](user))) { cb["limitCam_removeUsers"]([user]); if (cbjs["arrayContains"](viewerListArray, user)) { cbjs["arrayRemove"](viewerListArray, user) } }; if (toDo === "check") { return (cb["limitCam_userHasAccess"](user) == true ? true : false) } } function fc_sendPasswordToUsers() { var variable_27 = cb["limitCam_allUsersWithAccess"](); for (var i = 0; i < cb["limitCam_allUsersWithAccess"]()["length"]; i++) { cb["sendNotice"](fc_getPasswordMessage(), variable_27[i], "", COLOR.MRED, "bold") } } function fc_sendPasswordToUser(name) { cb["sendNotice"](fc_getPasswordMessage(), name, "", COLOR.MRED, "bold") } function fc_getPasswordMessage() { var variable_51 = "-------------- PASSWORD ---------------------"; variable_51 += "\n\u25CF You will be allowed to join the password show!"; variable_51 += "\n\u25CF The PASSWORD -----> :pixelglitter " + passWord + " :pixelglitter"; variable_51 += "\n\u25CF DO NOT share the password please. :thumbdown \n"; variable_51 += "---------------------------------------------------"; return variable_51 } function fc_startCDTimer(variable_53, name) { cdTimerMinutes = parseInt(variable_53, 10); if (cdTimerMinutes < 121 && cdTimerMinutes > 0) { FLAG["cdtimer"] = true; if (!FLAG["lock"]) { var variable_54 = app["name"] + ": Timer started! "; if (cb["settings"]["showDesc"]) { variable_54 += cb["settings"]["showDesc"] + ". " }; variable_54 += "Type " + COMMAND["TIMELEFT"] + " to see the time remaining to buy a ticket before the show starts! " + typeCmds; cb["changeRoomSubject"](variable_54); cb["sendNotice"](dashLine + "\n\u25CF " + cdTimerMinutes + " minutes until the show starts!\n" + dashLine, "", "", COLOR.BRED, "bold") }; cdMilliSecs = Date["now"]() + (variable_53 * 60000); if (variable_53 <= 10) { cb["setTimeout"](fc_cdTimerAdvert, (1 * 60000)) } else { if (cdTimerMinutes <= 20) { cb["setTimeout"](fc_cdTimerAdvert, (2 * 60000)) } else { cb["setTimeout"](fc_cdTimerAdvert, (5 * 60000)) } } } else { cb["sendNotice"]("\u25CF Maximum timer length is 120.", name, "", COLOR.NOTICE, "bold") } } function fc_cdTimerAdvert() { if (FLAG["cdtimer"]) { if (cdTimerMinutes <= 10) { cdTimerMinutes-- } else { if (cdTimerMinutes <= 20) { cdTimerMinutes -= 2 } else { cdTimerMinutes -= 5 } }; if (cdTimerMinutes <= 0) { FLAG["cdtimer"] = false; if (!FLAG["lock"]) { cb["sendNotice"](dashLine + "\n\u25CF " + app["name"] + ": TIME IS UP!\n" + dashLine, "", "", COLOR.BRED, "bold"); fc_defaultSubject() } } else { if (!FLAG["lock"]) { cb["sendNotice"](dashLine + "\n\u25CF Less than " + cdTimerMinutes + (cdTimerMinutes > 1 == true ? " minutes" : " minute") + " until the show starts!\n" + dashLine, "", "", COLOR.BRED, "bold") }; if (cdTimerMinutes <= 10) { cb["setTimeout"](fc_cdTimerAdvert, (1 * 60000)) } else { if (cdTimerMinutes <= 20) { cb["setTimeout"](fc_cdTimerAdvert, (2 * 60000)) } else { cb["setTimeout"](fc_cdTimerAdvert, (5 * 60000)) } } } } } function fc_showMode() { var showMode = dashLine; if (FLAG["spass"]) { showMode += "\n\u25CF " + app["name"] + " is in 'Hidden Cam' mode."; showMode += "\n\u25CF If it becomes necessary to change to 'Password'\n\u25CF mode, type: " + COMMAND["CHANGEPW"] + " <password>." }; showMode += "\n" + dashLine; cb["sendNotice"](showMode, modelName, COLOR.HVBACK, COLOR.HVTEXT, "bold") } function fc_init() { startTime = new Date(); rePassword = new RegExp(passWord, "i"); fc_blankLine(1, modelName); cb["sendNotice"](dashLine + "\n\u25CF :CT30 by CrazyWare\n\u25CF Version: " + app["version"] + app["build"] + " (" + app["date"] + ") started.\n" + dashLine, "", "", COLOR.INFO, "bold"); fc_blankLine(1, modelName); fc_showMode(); fc_blankLine(1, modelName); if (FLAG["hctimer"]) { fc_hcAdvert() } else { fc_hcWarn("") }; if (cb["settings"]["fanbuyin"]) { cb["sendNotice"](fanMsg, "", "", COLOR.FAN, "bold", FANS) }; if (cb["settings"]["autoaddMods"] === "Yes") { cb["sendNotice"](dashLine + "\n\u25CF The broadcaster has configured " + app["name"] + " to\n\u25CF automatically give moderators a show ticket.\n\u25CF You must refresh the page to claim your ticket.\n" + dashLine, "", "", COLOR.MRED, "bold", MODS) }; if (cb["settings"]["autoaddFans"] === "Yes" && !cb["settings"]["fanbuyin"]) { cb["sendNotice"](dashLine + "\n\u25CF The broadcaster has configured " + app["name"] + " to\n\u25CF automatically give fans a show ticket.\n\u25CF You must refresh the page to claim your ticket.\n" + dashLine, "", "", COLOR.FAN, "bold", FANS) }; fc_defaultSubject(); if (pendingTicketsArray["length"] > 0) { for (var i = 0; i < pendingTicketsArray["length"]; i++) { cb["sendNotice"](dashLine + "\n\u25CF '" + pendingTicketsArray[i] + "':\n\u25CF " + otsMsg + dashLine, pendingTicketsArray[i], "", COLOR.MRED, "bold") } } } fc_init()
© Copyright Chaturbate 2011- 2025. All Rights Reserved.