Apps Home
|
Create an App
LOVER MACHINE
Author:
wmasterset
Description
Source Code
Launch App
Current Users
Created by:
Wmasterset
// String.prototype functions "use strict"; var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } String.prototype.equals = function (str) { var m = new RegExp(str); return this.match(m) != null; }; String.prototype.equalsIgnoreCase = function (str) { var m = new RegExp(str, "i"); return this.match(m) != null; }; String.prototype.capitalize = function () { return this.charAt(0).toUpperCase() + this.slice(1); }; if (!String.prototype.repeat) String.prototype.repeat = function (number) { return new Array(number + 1).join(this); }; if (cb == null) var cb = { changeRoomSubject: function changeRoomSubject(new_subject) {}, drawPanel: function drawPanel() {}, log: function log(message) { console.log(message); }, onDrawPanel: function onDrawPanel(func) {}, onEnter: function onEnter(func) {}, onLeave: function onLeave(func) {}, onMessage: function onMessage(func) {}, onShowStatus: function onShowStatus(func) {}, onTip: function onTip(func) {}, room_slug: "", sendNotice: function sendNotice(message, to_user, background, foreground, weight, to_group) { console.log(message); }, setTimeout: function setTimeout(func, msec) {}, settings_choices: [], settings: {}, tipOptions: function tipOptions(func) {}, limitCam_start: function limitCam_start(message, allowed_users) {}, limitCam_stop: function limitCam_stop() {}, limitCam_addUsers: function limitCam_addUsers(allowed_users) {}, limitCam_removeUsers: function limitCam_removeUsers(removed_users) {}, limitCam_removeAllUsers: function limitCam_removeAllUsers() {}, limitCam_userHasAccess: function limitCam_userHasAccess(user) {}, limitCam_allUsersWithAccess: function limitCam_allUsersWithAccess() {}, limitCam_isRunning: function limitCam_isRunning() {} }; var App = function App(name, version, type) { _classCallCheck(this, App); this.name = name; this.version = version; this.type = type; var that = this; this.setCbChoices = (function () { cb.settings_choices = [{ name: "header", type: "choice", choice1: "", choice2: "", label: "***** Settings for \"" + that.name + "\" *****", required: false }, { name: "enableNoticesOnStartup", type: "choice", choice1: "Yes", choice2: "No", defaultValue: "Yes", label: 'Enable torture notices as soon as the app starts?\nIf "No" then type "/tnotices on" when ready to start.' }, { name: "showTipCount", type: "choice", choice1: "Yes", choice2: "No", defaultValue: "Yes", // Keep it disabled since it makes practically no difference label: "Show total tips received on the app's panel?" }, { name: "invalidCmdWarn", type: "choice", choice1: "Yes", choice2: "No", defaultValue: "Yes", label: "Warn when an invalid command is entered?" }, { name: "roomTitle", type: "str", minLength: 1, maxLength: 128, defaultValue: "Torture!", label: "Room title. (Prices are automatically added.)" }, { name: "tortDevice", type: "choice", choice1: "Doxy (10 speeds)", choice2: "Original Hitachi (2 speeds)", choice3: "Hitachi Magic Wand (7 speeds)", choice4: "Cali Couture (2 speeds)", choice5: "Sybian with rotation", choice6: "Other", label: "Device that will be used in this session." }, { name: "numberOfSpeeds", type: "int", minValue: 1, label: 'Number of speeds that the device has. (Use this only if you chose "Other" above.)', required: false }, { name: "separator2", type: "choice", choice1: "", choice2: "", label: "***** Tip options settings ***** WARNING: Repeated prices are only allowed for Start, Stop (both Vibration and Rotation), Mute, and Unmute. All other options MUST NOT have repeated prices.", required: false }, { name: "tortStart", type: "int", minValue: 1, label: "Tokens to start torture." }, { name: "tortStop", type: "int", minValue: 1, label: "Tokens to stop torture." }, { name: "rotStart", type: "int", minValue: 1, label: "Tokens to start rotation. (Only applies to Sybian.)", required: false }, { name: "rotStop", type: "int", minValue: 1, label: "Tokens to stop rotation. (Only applies to Sybian.)", required: false }, { name: "powerUp", type: "int", minValue: 1, label: "Tokens to increase vibration speed. (Don't use this for single-speed devices.)", required: false }, { name: "powerDown", type: "int", minValue: 1, label: "Tokens to decrease vibration speed. (Don't use this for single-speed devices.)", required: false }, { name: "rotUp", type: "int", minValue: 1, label: "Tokens to increase rotation speed. (Only applies to Sybian.)", required: false }, { name: "rotDown", type: "int", minValue: 1, label: "Tokens to decrease rotation speed. (Only applies to Sybian.)", required: false }, { name: "separator3", type: "choice", choice1: "", choice2: "", label: "***** The settings below are optional. Leave them blank if you're not going to use them. *****", required: false }, { name: "muteAmount", type: "int", label: "Tokens to mute the broadcaster.", required: false }, { name: "unmuteAmount", type: "int", label: "Tokens to unmute the broadcaster.", required: false }, { name: "instaAmount", type: "int", label: "Tokens to toggle instacum.", required: false }, { name: "denialAmount", type: "int", label: "Tokens to toggle cum denial. (If the cum denials are stackable, tipping this amount will increase the total denial duration.)", required: false }, { name: "areDenialsStackable", type: "choice", choice1: "Yes", choice2: "No", defaultValue: "No", label: "Are your cum denials \"stackable\" instead of cancellable?" }, { name: "numOfDenialHours", type: "int", label: "Number of hours a single cum denial lasts. Use this only if the denials are stackable.", required: false }, { name: "denialCounter", type: "int", label: "Tokens to decrease the total cum denial duration. Use this only if the denials are stackable.", required: false }]; })(); this.callCbHandlers = (function () { cb.log("calling onmsg handler"); cb.onMessage(function (msg) { MsgHandler.onMessage(msg); }); cb.log("calling ontip handler"); cb.onTip(function (tip) { TipHandler.onTip(tip); }); cb.log("calling userhandler"); cb.onEnter(function (user) { UserHandler.onEnter(user); }); })(); }; var TortMain = (function (_App) { _inherits(TortMain, _App); function TortMain() { _classCallCheck(this, TortMain); _get(Object.getPrototypeOf(TortMain.prototype), "constructor", this).call(this, "De Haan's Torture", "1.4-r1", "app"); this.version_extra = null; // internal: script version - extra info (e.g. alpha1, beta1, rc1). set to null if stable this.version_type = "stable"; // internal: script version type (stable, alpha, beta, dev preview, experimental, release candidate) this.revision = 1; // internal: script revision (set to null if none). Don't use with experimental versions this.rc_version = null; // internal: script RC version number. Use only with release candidates this.author = "dehaan__"; // developer this.build_date = "2 October 2015"; // script build date // colors this.Color = { dark_green: "#002a15", med_green: "#0ad80a", lite_green: "#a2ffa2", dark_red: "#4a0000", med_red: "#d80a00", lite_red: "#ff0a11", dark_blue: "#001a70", med_blue: "#000adc", lite_blue: "#1144ff", holo_blue: "#33b5e5", mtrl_teal: "#009688", mtrl_bluegray_500: "#607d8b", mtrl_bluegray_700: "#364248", mtrl_bluegray_800: "#263238", pink_lace: "#ffddf4", white: "#fff", black: "#000", // misc syntax: "#995b00", notice_grn: "#284", notice_prp: "#330066", notice_red: "#e84a10", hilite: "#eee5ff", hvtext: "#d80a00", hvback: "#ffffbf", info: "#144d8c", error: "#b94a48" }; this.Command = { tnotices: "/tnotices", topt: "/topt", // Fc commands - for lexi fcstart: "/fcstart", fcstop: "/fcstop", fcunblock: "/fcunblock" }; this.DevCommand = { devdump: "/devdump" }; this.Flag = { dev: false, greenhl: false, bluehl: false, nohl: true, thl: false, rhl: false, shl: false }; this.List = { devList: [], fanList: [], tFanList: [] }; this.TCost = { start: 0, stop: 0, powerup: 0, powerdown: 0, // sybian only rotstart: 0, rotstop: 0, rotup: 0, rotdown: 0, // end sybian mute: 0, unmute: 0, instacum: 0, denial: 0 }; this.Misc = { start_time: new Date(), dash_line: "\u2014".repeat(28), dash_line_small: "-".repeat(48), box_line: "\u254c".repeat(28), room_host: cb.room_slug, tOpt: 'Type "' + this.Command.topt + '" for tip options.', tip_total: 0, min_speed: 1, max_speed: 0, def_speed: 1, min_rot_spd: 1, max_rot_spd: 10, def_rot_spd: 1, highest_tipper: null, highest_tipper_amt: 0, latest_tipper: null, latest_tipper_amt: 0, total_denials: 0, total_denial_hrs: 0 }; this.TFlag = { active: false, denial: false, insta: false, mute: false, notices: false, hitachi: false, hmax: false, hmin: false, dmax: false, dmin: false, sybian: false, rotactive: false, rmax: false, rmin: false }; } /***** TortureApp variables *****/ _createClass(TortMain, [{ key: "main", value: function main() { var that = this; var hasRev = function hasRev() { if (that.revision != null) return true; }; var isPreRelease = function isPreRelease() { if (that.version_type == "alpha" || that.version_type == "beta" || that.version_type == "devpreview" || that.version_type == "experimental") return true; }; var isRc = function isRc() { if (that.version_type == "release_candidate") return true; }; cb.sendNotice(dashLine + "\n\u25ba \"" + this.name + '" has started.', "", "", color.mtrl_bluegray_700, "bold"); if (Object.is(hasRev(), true)) { this.sysInfo("Version: " + this.version + " (Revision " + this.revision + ")"); } else if (Object.is(isPreRelease(), true)) { if (Object.is(isRc(), true)) this.sysInfo("Version: " + this.version + "-" + this.version_extra + " (Release Candidate " + this.rc_version + ")");else this.sysInfo("Version: " + this.version + "-" + this.version_extra); } else { if (this.version_extra != null) this.sysInfo("Version: " + this.version + "-" + this.version_extra);else this.sysInfo("Version: " + this.version); } this.sysInfo("Build date: " + this.build_date); cb.sendNotice(dashLineSml + "\n" + "\u25ba Written by: Mr. De Haan \xa9 2015" + "\n" + dashLine, "", "", color.mtrl_bluegray_700, "bold"); cb.sendNotice('Type "/topt" for torture tip options.\n' + 'Type "/topt all" to send these options to all viewers ' + "if you're a mod or the broadcaster.", "", "", color.notice_grn, "bold"); if (cb.settings.enableNoticesOnStartup == "Yes") { this.TFlag.notices = true; } else { this.TFlag.notices = false; cb.sendNotice(dashLine + "\n\u25ba \"" + this.name + '" has started with Action Notices DISABLED.\n' + "\u25ba Type \"/tnotices on\"" + "to enable them before starting your session.\n" + dashLine, broadcaster, color.hvback, color.hvtext, "bold"); } this.setDevice(); this.setRoomTitle(); } }, { key: "blockFcRequest", value: function blockFcRequest(user, mod) { if (user != null) { if (user != " " || user != "" || user != " ") /* Check for empty strings */{ if (this.isFcMember(user)) { if (!this.isUserBlocked(user)) { this.List.tFanList.push(user); cb.sendNotice("\u25ba Username " + '"' + user + '"' + " was blocked from requesting a free Start/Stop.", mod, "", color.notice_prp, "bold"); } else { this.sendError("This username was already blocked from requesting a free Start/Stop.", mod); } } else { this.sendError("Error: The specified username is not a fan club member. Aborting.", mod); } } } } }, { key: "dump", value: function dump(user) { var date = new Date(); var dump_info = dashLine + "\n\u25ba Dev dump"; dump_info += "\n\n\u25ba App info:"; dump_info += "\n\u25ba Name: " + this.name + " / Type: " + this.type + " / Version number: " + this.version + " / Version type: " + this.version_type + " / Version extra info: " + this.version_extra; dump_info += "\n\u25ba Time started: " + this.Misc.start_time + "\n\u25ba Time now: " + date; dump_info += "\n\u25ba Total tipped: " + this.Misc.tip_total; dump_info += "\n\u25ba Flags: (TortureApp.TFlag.active: " + this.TFlag.active + ") / (TortureApp.TFlag.denial: " + this.TFlag.denial + ")" + " / (TortureApp.TFlag.insta: " + this.TFlag.insta + ") / (TortureApp.TFlag.notices: " + this.TFlag.notices + ") / (TortureApp.TFlag.sybian: " + this.TFlag.sybian + ") / (TortureApp.Flag.dev: " + this.Flag.dev + ")" + "\n" + dashLine; return cb.sendNotice(dump_info, user, "", color.mtrl_bluegray_700, "bold"); } }, { key: "fcArrayPopulate", value: function fcArrayPopulate(user) { if (!cbjs.arrayContains(this.List.fanList, user)) this.List.fanList.push(user); } // Basic check if user is fanclub member. // This is a limited check, due to apps being unable to access cb's user list. }, { key: "isFcMember", value: function isFcMember(user) { return cbjs.arrayContains(this.List.fanList, user); } }, { key: "isUserBlocked", value: function isUserBlocked(user) { return cbjs.arrayContains(this.List.tFanList, user); } }, { key: "sendFcStartOrStop", value: function sendFcStartOrStop(user, option, mod) { if (user != null) { if (user != " " || user != "" || user != " ") /* Check for empty strings */{ if (this.isFcMember(user)) { if (!this.isUserBlocked(user)) { if (option != null) { if (option == "start") { if (tflag.active == false) { if (tflag.sybian == true) cb.sendNotice(dashLine + "\n\u25ba VIBRATION S T A R T ! \n" + dashLineSml, "", "#efe", "#090", "bold");else cb.sendNotice(dashLine + "\n\u25ba S T A R T ! \n" + dashLineSml, "", "#efe", "#090", "bold"); cb.sendNotice("\u25ba Start requested by fan club member \"" + user + '".\n' + dashLine, "", "#efe", "#090", "bold"); tflag.active = true; cb.drawPanel(); // Only call drawPanel() if torture was previously stopped or didn't start yet this.blockFcRequest(user, mod); } else { this.sendError("Torture was already started. Aborting.", mod); } } else if (option == "stop") { if (tflag.active == true) { if (tflag.sybian == true) cb.sendNotice(dashLine + "\n\u25ba VIBRATION S T O P ! \n" + dashLineSml, "", "#fee", "#f00", "bold");else cb.sendNotice(dashLine + "\n\u25ba S T O P ! \n" + dashLineSml, "", "#fee", "#f00", "bold"); cb.sendNotice("\u25ba Stop requested by fan club member \"" + user + '".\n' + dashLine, "", "#fee", "#f00", "bold"); tflag.active = false; cb.drawPanel(); // Only call drawPanel() if torture was de facto stopped this.blockFcRequest(user, mod); } else { this.sendError("Torture was already stopped or didn't start yet. Aborting.", mod); } } } } else { this.sendError("Error: The specified user already used his/her free Start/Stop.", mod); } } else { this.sendError("Error: The specified user is not a fan club member. Aborting.", mod); } } else { this.sendError("Error: You didn't specify the user who requested either a Start or Stop.", mod); this.sendError("The correct syntax for this function is " + '"/fcstart username"' + " or " + '"/fcstop username".', mod); } } else { this.sendError("Error: You didn't specify the user who requested either a Start or Stop.", mod); this.sendError("The correct syntax for this function is " + '"/fcstart username"' + " or " + '"/fcstop username".', mod); } } }, { key: "sendError", value: function sendError(msg, user) { cb.sendNotice("\u25ba " + msg, user, "", color.error, "bold"); } }, { key: "sendOptions", value: function sendOptions(user) { var tipOptStr = dashLine + "\n\u25ba \u25ba \u25ba TORTURE TIP OPTIONS \u25c4 \u25c4 \u25c4"; if (cb.settings.tortStart == cb.settings.tortStop) { tipOptStr += "\n\u25ba Vibration Start/Stop: " + cb.settings.tortStart; } else { tipOptStr += "\n\u25ba Vibration Start: " + cb.settings.tortStart; tipOptStr += "\n\u25ba Vibration Stop: " + cb.settings.tortStop; } if (maxSpeed != 1) { if (cb.settings.powerUp != null) tipOptStr += "\n\u25ba Vibration - Increase Speed: " + cb.settings.powerUp; if (cb.settings.powerDown != null) tipOptStr += "\n\u25ba Vibration - Decrease Speed: " + cb.settings.powerDown; } if (tflag.sybian == true) { if (cb.settings.rotStart != null && cb.settings.rotStop != null) { if (cb.settings.rotStart == cb.settings.rotStop) { tipOptStr += "\n\u25ba Rotation Start/Stop: " + cb.settings.rotStart; } else { tipOptStr += "\n\u25ba Rotation Start: " + cb.settings.rotStart; tipOptStr += "\n\u25ba Rotation Stop: " + cb.settings.rotStop; } } if (cb.settings.rotUp != null) tipOptStr += "\n\u25ba Rotation - Increase Speed: " + cb.settings.rotUp; if (cb.settings.rotDown != null) tipOptStr += "\n\u25ba Rotation - Decrease Speed: " + cb.settings.rotDown; } if (cb.settings.muteAmount != null && cb.settings.unmuteAmount != null) { if (cb.settings.muteAmount == cb.settings.unmuteAmount) { tipOptStr += "\n\u25ba Mute/Unmute: " + cb.settings.muteAmount; } else { tipOptStr += "\n\u25ba Mute: " + cb.settings.muteAmount; tipOptStr += "\n\u25ba Unmute: " + cb.settings.unmuteAmount; } } if (cb.settings.instaAmount != null) tipOptStr += "\n\u25ba Instacum toggle: " + cb.settings.instaAmount; if (cb.settings.areDenialsStackable == "No") { if (cb.settings.denialAmount != null) tipOptStr += "\n\u25ba Cum Denial toggle: " + cb.settings.denialAmount; } else { if (cb.settings.denialAmount != null) tipOptStr += "\n\u25ba Cum Denial - Increase Duration: " + cb.settings.denialAmount; if (cb.settings.denialCounter != null) tipOptStr += "\n\u25ba Cum Denial - Decrease Duration: " + cb.settings.denialCounter; } tipOptStr += "\n" + dashLine; if (user == "all") return cb.sendNotice(tipOptStr, "", "", color.notice_prp, "bold");else return cb.sendNotice(tipOptStr, user, "", color.notice_prp, "bold"); } }, { key: "setCost", value: function setCost() { // This function must be called only once, which will be during app startup cost.start = cb.settings.tortStart; cost.stop = cb.settings.tortStop; cost.powerup = cb.settings.powerUp; cost.powerdown = cb.settings.powerDown; if (tflag.sybian == true) { cost.rotstart = cb.settings.rotStart; cost.rotstop = cb.settings.rotStop; cost.rotup = cb.settings.rotUp; cost.rotdown = cb.settings.rotDown; } cost.mute = cb.settings.muteAmount; cost.unmute = cb.settings.unmuteAmount; cost.instacum = cb.settings.instaAmount; cost.denial = cb.settings.denialAmount; cost.dencounter = cb.settings.denialCounter; } }, { key: "setDevice", value: function setDevice() { var isDoxy = cb.settings.tortDevice == "Doxy (10 speeds)"; var isOgHitachi = cb.settings.tortDevice == "Original Hitachi (2 speeds)"; var isHitachiMw = cb.settings.tortDevice == "Hitachi Magic Wand (7 speeds)"; var isSybian = cb.settings.tortDevice == "Sybian with rotation"; var isCout = cb.settings.tortDevice == "Cali Couture (2 speeds)"; var isOtherDevice = cb.settings.tortDevice == "Other"; if (isDoxy) { maxSpeed = 10; cb.sendNotice("Device chosen: Doxy", broadcaster, "", color.holo_blue); } else if (isSybian) { maxSpeed = 10; maxRotSpeed = 10; this.TFlag.sybian = true; this.TFlag.rotactive = false; cb.sendNotice("Device chosen: Sybian", broadcaster, "", color.holo_blue); } else if (isOgHitachi) { maxSpeed = 2; this.TFlag.hitachi = true; cb.sendNotice("Device chosen: Hitachi", broadcaster, "", color.holo_blue); } else if (isHitachiMw) { maxSpeed = 7; cb.sendNotice("Device chosen: Magic Wand", broadcaster, "", color.holo_blue); } else if (isCout) { maxSpeed = 10; cb.sendNotice("Device chosen: Couture", broadcaster, "", color.holo_blue); } else if (isOtherDevice) { maxSpeed = cb.settings.numberOfSpeeds; cb.sendNotice("Device chosen: Other", broadcaster, "", color.holo_blue); } } }, { key: "setRoomTitle", value: function setRoomTitle() { // This function also must be called only once if (cb.settings.roomTitle != null) { this.setCost(); var roomSubject = cb.settings.roomTitle; if (cost.start == cost.stop) roomSubject += " Prices: Start/Stop - " + cost.start;else roomSubject += " Prices: Start - " + cost.start + " | Stop - " + cost.stop; if (maxSpeed != 1) { if (cost.powerup != null) roomSubject += " | Incr. Speed - " + cost.powerup; if (cost.powerdown != null) roomSubject += " | Decr. Speed - " + cost.powerdown; } if (tflag.sybian == true) { if (cost.rotstart != null && cost.rotstop != null) { if (cost.rotstart == cost.rotstop) roomSubject += " | Start/Stop Rotation - " + cost.rotstart;else roomSubject += " | Start Rotation - " + cost.rotstart + " | Stop Rotation - " + cost.rotstop; }if (cost.rotup != null) { roomSubject += " | Faster Rotation - " + cost.rotup; }if (cost.rotdown != null) { roomSubject += " | Slower Rotation - " + cost.rotdown; } } if (cost.mute != null && cost.unmute != null) { if (cost.mute == cost.unmute) roomSubject += " | Mute/Unmute - " + cost.mute;else roomSubject += " | Mute - " + cost.mute + " | Unmute - " + cost.unmute; } if (cost.instacum != null) roomSubject += " | Instacum - " + cost.instacum; if (cb.settings.areDenialsStackable == "No") { if (cost.denial != null) roomSubject += " | Cum Denial - " + cost.denial; } else { if (cost.denial != null) roomSubject += " | Add Cum Denial - " + cost.denial; if (cost.dencounter != null) roomSubject += " | Remove Cum Denial - " + cost.dencounter; } cb.changeRoomSubject(roomSubject); } } }, { key: "sysInfo", value: function sysInfo(msg) { if (arguments[1] == "nl") cb.sendNotice("\n\u25ba " + msg, "", "", color.mtrl_bluegray_700, "bold");else cb.sendNotice("\u25ba " + msg, "", "", color.mtrl_bluegray_700, "bold"); } }, { key: "toggleNotices", value: function toggleNotices() { if (arguments[0] == "on") this.TFlag.notices = true;else if (arguments[0] == "off") this.TFlag.notices = false; } }, { key: "unblockFcRequest", value: function unblockFcRequest(user, mod) { if (user != null) { if (user != " " || user != "" || user != " ") /* Check for empty strings */{ if (this.isFcMember(user)) { if (this.isUserBlocked(user)) { cbjs.arrayRemove(this.List.tFanList, user); cb.sendNotice("\u25ba Username " + '"' + user + '"' + " was unblocked from requesting a free Start/Stop.", mod, "", color.notice_prp, "bold"); } else { this.sendError("This username doesn't need to be unblocked from requesting a free Start/Stop.", mod); } } else { this.sendError("Error: The specified username is not a fan club member. Aborting.", mod); } } else { this.sendError("Error: You didn't specify the user that you want to unblock.", mod); this.sendError("The correct syntax for this function is " + '"/fcunblock username".', mod); } } else { this.sendError("Error: You didn't specify the user that you want to unblock.", mod); this.sendError("The correct syntax for this function is " + '"/fcunblock username".', mod); } } // To be used in Lexi's room only }, { key: "unblockFcRequestAlt", value: function unblockFcRequestAlt(user, mod) { if (user != null) { if (user != " " || user != "" || user != " ") /* Check for empty strings */{ if (this.isUserBlocked(user)) { cbjs.arrayRemove(this.List.tFanList, user); cb.sendNotice("\u25ba Username " + '"' + user + '"' + " was unblocked from using their free Start/Stop.", mod, "", color.notice_prp, "bold"); } else { this.sendError("This username doesn't need to be unblocked from using their free Start/Stop.", mod); } } else { this.sendError("Error: You didn't specify the user that you want to unblock.", mod); this.sendError("The correct syntax for this function is " + '"/fcunblock username".', mod); } } else { this.sendError("Error: You didn't specify the user that you want to unblock.", mod); this.sendError("The correct syntax for this function is " + '"/fcunblock username".', mod); } } }]); return TortMain; })(App); var TortureApp = new TortMain(); var color = TortureApp.Color; var broadcaster = TortureApp.Misc.room_host; var flag = TortureApp.Flag; var command = TortureApp.Command; var dashLine = TortureApp.Misc.dash_line; var dashLineSml = TortureApp.Misc.dash_line_small; var boxLine = TortureApp.Misc.box_line; var dSpeed = TortureApp.Misc.def_speed; var devcommand = TortureApp.DevCommand; var cost = TortureApp.TCost; var tflag = TortureApp.TFlag; var minSpeed = TortureApp.Misc.min_speed; var maxSpeed = TortureApp.Misc.max_speed; var totalDenials = TortureApp.Misc.total_denials; var totalDenialHours = TortureApp.Misc.total_denial_hrs; var numOfDenialHours = Number.parseInt(cb.settings.numOfDenialHours, 10); // sybian var minRotSpeed = TortureApp.Misc.min_rot_spd; var maxRotSpeed = TortureApp.Misc.max_rot_spd; var dRotSpeed = TortureApp.Misc.def_rot_spd; /***** End TortureApp vars *****/ var Handler = function Handler() { _classCallCheck(this, Handler); }; // empty var MsgHandler = (function (_Handler) { _inherits(MsgHandler, _Handler); function MsgHandler() { _classCallCheck(this, MsgHandler); _get(Object.getPrototypeOf(MsgHandler.prototype), "constructor", this).call(this, null); } _createClass(MsgHandler, null, [{ key: "onMessage", value: function onMessage(msg) { // msg variable var m = msg.m.split(" "); // user vars var u = msg.user; var isBc = u == broadcaster; var isDev = function isDev(user) { if (Object.is(user, "dehaan__") || Object.is(user, "themountainlion")) return true; }; var isFan = msg.in_fanclub; var isMod = msg.is_mod; var isValid = false; var isLx = broadcaster.equalsIgnoreCase("PrincessLexi__"); if (isLx) { if (tflag.notices == true) { if (!isFan && /:lexigo|:lexistop/gi.exec(msg.m)) { cb.sendNotice(dashLine + "\n\u25ba You're not allowed to do that unless you're a fan club member. Your message will be muted.\n" + dashLine, u, "", "#d10", "bold"); msg["X-Spam"] = true; } else { if (TortureApp.isUserBlocked(u) && /:lexigo|:lexistop/gi.exec(msg.m)) { cb.sendNotice(dashLine + "\n\u25ba You've already used your free Stop/Go.\n" + dashLine, u, "", "#d10", "bold"); msg["X-Spam"] = true; } else { if (/:lexigo/gi.exec(msg.m)) { if (tflag.active == false) tflag.active = true, cb.drawPanel(), TortureApp.List.tFanList.push(u);else cb.sendNotice(dashLine + "\n\u25ba Torture is already in progress, no need to do that.\n" + dashLine, u, "", "#d10", "bold"), msg["X-Spam"] = true; } else if (/:lexistop/gi.exec(msg.m)) { if (tflag.active == true) tflag.active = false, cb.drawPanel(), TortureApp.List.tFanList.push(u);else cb.sendNotice(dashLine + "\n\u25ba Torture is already stopped, no need to do that.\n" + dashLine, u, "", "#d10", "bold"), msg["X-Spam"] = true; } } } } } if (m[0].charAt(0) == "/") { msg["X-Spam"] = true; switch (m[0]) { case command.tnotices: isValid = true; if (isBc || isMod || isDev(u) && flag.dev == true) { if (m[1] != null) { if (m[1] == "on") { if (tflag.notices == false) { TortureApp.toggleNotices("on"); cb.sendNotice(dashLine + "\n\u25ba Torture notices are now ENABLED.\n" + dashLine, u, "", color.notice_grn, "bold"); } else { cb.sendNotice(dashLine + "\n\u25ba Torture notices are already enabled!\n" + dashLine, u, "", color.error, "bold"); } } else if (m[1] == "off") { if (tflag.notices == true) { TortureApp.toggleNotices("off"); cb.sendNotice(dashLine + "\n\u25ba Torture notices are now DISABLED.\n" + dashLine, u, "", color.notice_red, "bold"); } else { cb.sendNotice(dashLine + "\n\u25ba Torture notices are already disabled!\n" + dashLine, u, "", color.error, "bold"); } } else { cb.sendNotice("\u25ba \"" + m[1] + "\" is not a valid argument.", u, "", color.error, "bold"); } } else { cb.sendNotice("\u25ba Syntax: /tnotices <on/off>", u, "", color.syntax, "bold"); } } else { cb.sendNotice("\u25ba Not enough privileges to use \"" + m[0] + "\".\n" + "\u25ba Only moderators and the broadcaster can use this command.", u, "", color.error, "bold"); } break; case command.topt: isValid = true; if (m[1] == "all") { if (isBc || isMod || isDev(u) && flag.dev == true) { msg["X-Spam"] = false; msg["m"] = cbjs.arrayJoin(m, " ") + " (tip options sent to everyone)"; TortureApp.sendOptions("all"); } else { cb.sendNotice("\u25ba Not enough privileges to use \"" + m[0] + "\" with option \"" + m[1] + "\".\n" + "\u25ba Only moderators and the broadcaster can use this option.", u, "", color.error, "bold"); } } else { msg["X-Spam"] = true; TortureApp.sendOptions(u); } break; case command.fcstart: isValid = true; if (isMod || isDev(u) && flag.dev == true) { if (!isLx) { if (m[1] != null) { if (m[1] != " " || m[1] != "" || m[1] != " ") TortureApp.sendFcStartOrStop(m[1], "start", u);else TortureApp.sendError("Error: You didn't specify the user who requested a free Start.", u), TortureApp.sendError("The correct syntax for this function is " + '"/fcstart username".', u); } else { TortureApp.sendError("Error: You didn't specify the user who requested a free Start.", u); TortureApp.sendError("The correct syntax for this function is " + '"/fcstart username".', u); } } else { TortureApp.sendError("This function is disabled in this room.", u); } } else { cb.sendNotice("\u25ba Not enough privileges to use \"" + m[0] + "\".\n" + "\u25ba Only moderators can use this command.", u, "", color.error, "bold"); } break; case command.fcstop: isValid = true; if (isMod || isDev(u) && flag.dev == true) { if (!isLx) { if (m[1] != null) { if (m[1] != " " || m[1] != "" || m[1] != " ") TortureApp.sendFcStartOrStop(m[1], "stop", u);else TortureApp.sendError("Error: You didn't specify the user who requested a free Stop.", u), TortureApp.sendError("The correct syntax for this function is " + '"/fcstop username".', u); } else { TortureApp.sendError("Error: You didn't specify the user who requested a free Stop.", u); TortureApp.sendError("The correct syntax for this function is " + '"/fcstop username".', u); } } else { TortureApp.sendError("This function is disabled in this room.", u); } } else { cb.sendNotice("\u25ba Not enough privileges to use \"" + m[0] + "\".\n" + "\u25ba Only moderators can use this command.", u, "", color.error, "bold"); } break; case command.fcunblock: isValid = true; if (isMod || isDev(u) && flag.dev == true) { if (m[1] != null) { if (!isLx) { if (m[1] != " " || m[1] != "" || m[1] != " ") TortureApp.unblockFcRequest(m[1], u);else TortureApp.sendError("Error: You didn't specify the user that you want to unblock.", u), TortureApp.sendError("The correct syntax for this function is " + '"/fcunblock username".', u); } else { if (m[1] != " " || m[1] != "" || m[1] != " ") TortureApp.unblockFcRequestAlt(m[1], u);else TortureApp.sendError("Error: You didn't specify the user that you want to unblock.", u), TortureApp.sendError("The correct syntax for this function is " + '"/fcunblock username".', u); } } else { TortureApp.sendError("Error: You didn't specify the user that you want to unblock.", u); TortureApp.sendError("The correct syntax for this function is " + '"/fcunblock username".', u); } } else { cb.sendNotice("\u25ba Not enough privileges to use \"" + m[0] + "\".\n" + "\u25ba Only moderators can use this command.", u, "", color.error, "bold"); } break; case devcommand.devdump: isValid = true; if (isDev(u)) { if (m[1] == "dev") { if (!cbjs.arrayContains(TortureApp.List.devList, u)) { TortureApp.List.devList.push(u); flag.dev = true; } else { cbjs.arrayRemove(TortureApp.List.devList, u); flag.dev = false; } } else { TortureApp.dump(u); } } else { cb.sendNotice("\u25ba Not enough privileges to use \"" + m[0] + "\".\n" + "\u25ba Only the developer can use this command.", u, "", color.error, "bold"); } break; // dev case "/changehilite": isValid = true; if (isDev(u) && flag.dev == true) { if (m[1] != null) { if (m[1] == "blue") { if (flag.greenhl == true) flag.greenhl = false; if (flag.bluehl == false) flag.bluehl = true; if (flag.nohl == true) flag.nohl = false; } else if (m[1] == "green") { if (flag.bluehl == true) flag.bluehl = false; if (flag.greenhl == false) flag.greenhl = true; if (flag.nohl == true) flag.nohl = false; } else if (m[1] == "none") { if (flag.bluehl == true) flag.bluehl = false; if (flag.greenhl == true) flag.greenhl = false; if (flag.nohl == false) flag.nohl = true; } } } break; // start insta case "/startinsta": isValid = true; if (isBc || isMod || isDev && flag.dev == true) { if (tflag.insta == false) { tflag.insta = true; if (flag.denial == true) flag.denial = false; cb.drawPanel(); cb.sendNotice("\u25ba Instacum manually started.", u, "", color.holo_blue, "bold"); } else { cb.sendNotice("\u25ba Instacum already in progress.", u, "", color.holo_blue, "bold"); } } break; // start cum denial case "/startdenial": isValid = true; if (isBc || isMod || isDev && flag.dev == true) { if (tflag.denial == false) { tflag.denial = true; if (flag.insta == true) flag.insta = false; cb.drawPanel(); cb.sendNotice("\u25ba Cum denial manually started.", u, "", color.holo_blue, "bold"); } else { cb.sendNotice("\u25ba Cum denial already in progress.", u, "", color.holo_blue, "bold"); } } break; // reset insta case "/resetinsta": isValid = true; if (isBc || isMod || isDev && flag.dev == true) { if (tflag.insta == true) { tflag.insta = false; cb.drawPanel(); cb.sendNotice("\u25ba Instacum flag has been reset.", u, "", color.holo_blue, "bold"); } else { cb.sendNotice("\u25ba No need to reset the Instacum flag.", u, "", color.holo_blue, "bold"); } } break; // reset cum denial case "/resetdenial": isValid = true; if (isBc || isMod || isDev && flag.dev == true) { if (tflag.denial == true) { tflag.denial = false; cb.drawPanel(); cb.sendNotice("\u25ba Cum Denial flag has been reset.", u, "", color.holo_blue, "bold"); } else { cb.sendNotice("\u25ba No need to reset the Cum Denial flag.", u, "", color.holo_blue, "bold"); } } break; // reset insta and denial case "/resetall": isValid = true; if (isBc || isMod || isDev && flag.dev == true) { if (tflag.denial == true) { tflag.denial = false; if (tflag.insta == true) tflag.insta = false; cb.drawPanel(); cb.sendNotice("\u25ba Insta and Cum denial flags have been reset.", u, "", color.holo_blue, "bold"); } else { cb.sendNotice("\u25ba No need to reset the Insta and Cum Denial flags.", u, "", color.holo_blue, "bold"); } } break; // Stop nagging about crazynote commands case "/cn": case "/cnd": case "/cndh": case "/cnh": case "/bc": case "/pmm": case "/tm": case "/tbm": case "/tv": isValid = true; break; // t case "/teckhilite": isValid = true; if (u == "teck1234") { flag.thl ? flag.thl = false : flag.thl = true; cb.sendNotice("\u25ba Highlight " + (flag.thl == true ? "activated." : "deactivated."), u, "", color.holo_blue, "bold"); } break; // r case "/reckerhilite": isValid = true; if (u == "reckerpls") { flag.rhl ? flag.rhl = false : flag.rhl = true; cb.sendNotice("\u25ba Highlight " + (flag.rhl == true ? "activated." : "deactivated."), u, "", color.holo_blue, "bold"); } break; // s case "/smghilite": isValid = true; if (u == "smgfan77") { flag.shl ? flag.shl = false : flag.shl = true; cb.sendNotice("\u25ba Highlight " + (flag.shl == true ? "activated." : "deactivated."), u, "", color.holo_blue, "bold"); } break; case "/tiptotal": isValid = true; if (isDev) { if (Number.parseInt(m[1], 10)) { TortureApp.Misc.tip_total = Number.parseInt(m[1], 10); cb.log("Tip total set to " + m[1] + " tokens."); cb.drawPanel(); } } break; } if (isValid == false && cb.settings.invalidCmdWarn == "Yes") cb.sendNotice("\u25ba " + "\"" + m[0] + "\" isn't a valid command.", u, "", color.error, "bold"); } if (cbjs.arrayContains(TortureApp.List.devList, u)) { if (isDev(u)) { if (flag.nohl == false) { if (flag.greenhl == true) { msg.c = "#003925"; msg.background = "#e0f0e0"; } else if (flag.bluehl == true) { msg.c = "#364248"; msg.background = "#e0e6ec"; } } } } if (u == "teck1234") { if (flag.thl == true) msg.background = "#ffedcc"; }if (u == "reckerpls") { if (flag.rhl == true) msg.background = "#ceecf5"; }if (u == "smgfan77") { if (flag.shl == true) msg.background = "#6ff"; } if (isFan) TortureApp.fcArrayPopulate(u); return msg; } }]); return MsgHandler; })(Handler); var TipHandler = (function (_Handler2) { _inherits(TipHandler, _Handler2); function TipHandler() { _classCallCheck(this, TipHandler); _get(Object.getPrototypeOf(TipHandler.prototype), "constructor", this).call(this, null); } _createClass(TipHandler, null, [{ key: "onTip", value: function onTip(tip) { var viewer = tip.from_user; var tipAmount = Number.parseInt(tip.amount, 10); var isCout = cb.settings.tortDevice == "Cali Couture (2 speeds)"; var isDoxy = cb.settings.tortDevice == "Doxy (10 speeds)"; var isOgHitachi = cb.settings.tortDevice == "Original Hitachi (2 speeds)"; var isHitachiMw = cb.settings.tortDevice == "Hitachi Magic Wand (7 speeds)"; var isSybian = cb.settings.tortDevice == "Sybian with rotation"; var isOtherDevice = cb.settings.tortDevice == "Other"; var isSingleSpeedDevice = maxSpeed == 1; TortureApp.Misc.tip_total += tipAmount; if (tflag.notices == true) { switch (tipAmount) { case cb.settings.tortStart: if (cb.settings.tortStart != cb.settings.tortStop) { if (tflag.sybian == true) { if (tflag.active == false) { cb.sendNotice(dashLine + "\n\u25ba VIBRATION S T A R T ! \n" + dashLine, "", "#efe", "#090", "bold"); tflag.active = true; } else { cb.sendNotice(dashLine + "\n\u25ba Vibration was already started! \n" + dashLine, viewer, color.hilite, color.notice, "bold"); } } else { if (tflag.active == false) { cb.sendNotice(dashLine + "\n\u25ba S T A R T ! \n" + dashLine, "", "#efe", "#090", "bold"); tflag.active = true; } else { cb.sendNotice(dashLine + "\n\u25ba Torture was already started! \n" + dashLine, viewer, color.hilite, color.notice, "bold"); } } } else { if (tflag.sybian == true) { cb.sendNotice(dashLine + (tflag.active ? "\n\u25ba VIBRATION S T O P ! \n" : "\n\u25ba VIBRATION S T A R T ! \n") + dashLine, "", tflag.active ? "#fee" : "#efe", tflag.active ? "#f00" : "#090", "bold"); tflag.active ? tflag.active = false : tflag.active = true; } else { cb.sendNotice(dashLine + (tflag.active ? "\n\u25ba S T O P ! \n" : "\n\u25ba S T A R T ! \n") + dashLine, "", tflag.active ? "#fee" : "#efe", tflag.active ? "#f00" : "#090", "bold"); tflag.active ? tflag.active = false : tflag.active = true; } } break; case cb.settings.tortStop: if (cb.settings.tortStop != cb.settings.tortStart) { if (tflag.sybian == true) { if (tflag.active == true) { cb.sendNotice(dashLine + "\n\u25ba VIBRATION S T O P ! \n" + dashLine, "", "#fee", "#f00", "bold"); tflag.active = false; } else { cb.sendNotice(dashLine + "\n\u25ba Vibration was already stopped! \n" + dashLine, viewer, color.hilite, color.notice, "bold"); } } else { if (tflag.active == true) { cb.sendNotice(dashLine + "\n\u25ba S T O P ! \n" + dashLine, "", "#fee", "#f00", "bold"); tflag.active = false; } else { cb.sendNotice(dashLine + "\n\u25ba Torture was already stopped! \n" + dashLine, viewer, color.hilite, color.notice, "bold"); } } } else { break; } break; case cb.settings.rotStart: if (cb.settings.rotStart != cb.settings.rotStop) { if (tflag.sybian == true) { if (tflag.rotactive == false) { cb.sendNotice(dashLine + "\n\u25ba ROTATION S T A R T ! \n" + dashLine, "", "#efe", "#090", "bold"); tflag.rotactive = true; } else { cb.sendNotice(dashLine + "\n\u25ba Rotation was already started! \n" + dashLine, viewer, color.hilite, color.notice, "bold"); } } } else { if (tflag.sybian == true) { cb.sendNotice(dashLine + (tflag.rotactive ? "\n\u25ba ROTATION S T O P ! \n" : "\n\u25ba ROTATION S T A R T ! \n") + dashLine, "", tflag.active ? "#fee" : "#efe", tflag.active ? "#f00" : "#090", "bold"); tflag.rotactive ? tflag.rotactive = false : tflag.rotactive = true; } } break; case cb.settings.rotStop: if (cb.settings.rotStop != cb.settings.rotStart) { if (tflag.sybian == true) { if (tflag.rotactive = true) { cb.sendNotice(dashLine + "\n\u25ba ROTATION S T O P ! \n" + dashLine, "", "#fee", "#f00", "bold"); tflag.rotactive = false; } else { cb.sendNotice(dashLine + "\n\u25ba Rotation was already stopped! \n" + dashLine, viewer, color.hilite, color.notice_prp, "bold"); } } } else { break; } break; case cb.settings.powerUp: if (!isSingleSpeedDevice) { dSpeed++; if (isOgHitachi) { if (dSpeed >= 2) { dSpeed = 2; if (tflag.hmax == false) { cb.sendNotice(dashLine + "\n\u25ba F A S T E R ! - Speed: High\n" + dashLine, "", color.hilite, color.notice_prp, "bold"); tflag.hmax = true; tflag.hmin = false; } else { cb.sendNotice(dashLine + "\n\u25ba Maximum vibration speed already reached!\n" + dashLine, viewer, color.hilite, color.notice_prp, "bold"); } } } else { tflag.dmin = false; if (dSpeed >= maxSpeed) { dSpeed = maxSpeed; if (tflag.dmax == false) { cb.sendNotice(dashLine + "\n\u25ba M A X I M U M VIBRATION REACHED!\n" + dashLine, "", color.hilite, color.notice_prp, "bold"); tflag.dmax = true; } else { cb.sendNotice(dashLine + "\n\u25ba Maximum vibration speed already reached!\n" + dashLine, viewer, color.hilite, color.notice_prp, "bold"); } } else { if (isSybian) { cb.sendNotice(dashLine + "\n\u25ba F A S T E R VIBRATION! - Speed: " + dSpeed + "\n" + dashLine, "", color.hilite, color.notice_prp, "bold"); } else { cb.sendNotice(dashLine + "\n\u25ba F A S T E R ! - Speed: " + dSpeed + "/" + maxSpeed + "\n" + dashLine, "", color.hilite, color.notice_prp, "bold"); } } } } else { break; } break; case cb.settings.powerDown: if (!isSingleSpeedDevice) { dSpeed--; if (isOgHitachi) { if (dSpeed <= 1) { dSpeed = 1; if (tflag.hmin == false) { cb.sendNotice(dashLine + "\n\u25ba S L O W E R ! - Speed: Low\n" + dashLine, "", color.hilite, color.notice_prp, "bold"); tflag.hmin = true; tflag.hmax = false; } else { cb.sendNotice(dashLine + "\n\u25ba Minimum vibration speed already reached!\n" + dashLine, viewer, color.hilite, color.notice_prp, "bold"); } } } else { tflag.dmax = false; if (dSpeed <= minSpeed) { dSpeed = minSpeed; if (tflag.dmin == false) { cb.sendNotice(dashLine + "\n\u25ba M I N I M U M VIBRATION REACHED!\n" + dashLine, "", color.hilite, color.notice_prp, "bold"); tflag.dmin = true; } else { cb.sendNotice(dashLine + "\n\u25ba Minimum vibration speed already reached!\n" + dashLine, viewer, color.hilite, color.notice_prp, "bold"); } } else { if (isSybian) { cb.sendNotice(dashLine + "\n\u25ba S L O W E R VIBRATION! - Speed: " + dSpeed + "\n" + dashLine, "", color.hilite, color.notice_prp, "bold"); } else { cb.sendNotice(dashLine + "\n\u25ba S L O W E R ! - Speed: " + dSpeed + "/" + maxSpeed + "\n" + dashLine, "", color.hilite, color.notice_prp, "bold"); } } } } else { break; } break; case cb.settings.rotUp: if (isSybian) { dRotSpeed++; tflag.rmin = false; if (dRotSpeed >= maxRotSpeed) { dRotSpeed = maxRotSpeed; if (tflag.rmax == false) { cb.sendNotice(dashLine + "\n\u25ba M A X I M U M ROTATION REACHED!\n" + dashLine, "", color.hilite, color.notice_prp, "bold"); tflag.rmax = true; } else { cb.sendNotice(dashLine + "\n\u25ba Maximum rotation speed already reached!\n" + dashLine, viewer, color.hilite, color.notice_prp, "bold"); } } else { cb.sendNotice(dashLine + "\n\u25ba F A S T E R ROTATION! - Speed: " + dRotSpeed + "\n" + dashLine, "", color.hilite, color.notice_prp, "bold"); } } break; case cb.settings.rotDown: if (isSybian) { dRotSpeed--; tflag.rmax = false; if (dRotSpeed <= minRotSpeed) { dRotSpeed = minRotSpeed; if (tflag.rmin == false) { cb.sendNotice(dashLine + "\n\u25ba M I N I M U M ROTATION REACHED!\n" + dashLine, "", color.hilite, color.notice_prp, "bold"); tflag.rmin = true; } else { cb.sendNotice(dashLine + "\n\u25ba Minimum rotation speed already reached!\n" + dashLine, viewer, color.hilite, color.notice_prp, "bold"); } } else { cb.sendNotice(dashLine + "\n\u25ba S L O W E R ROTATION! - Speed: " + dRotSpeed + "\n" + dashLine, "", color.hilite, color.notice_prp, "bold"); } } break; case cb.settings.muteAmount: if (cb.settings.muteAmount != cb.settings.unmuteAmount) { if (tflag.mute == false) { cb.sendNotice(dashLine + "\n\u25ba M U T E D !\n" + dashLine, "", color.hilite, color.notice_prp, "bold"); tflag.mute = true; } else { cb.sendNotice(dashLine + "\n\u25ba The broadcaster is already muted.\n" + dashLine, viewer, color.hilite, color.notice_prp, "bold"); } } else { cb.sendNotice(dashLine + (tflag.mute ? "\n\u25ba U N M U T E D !\n" : "\n\u25ba M U T E D !\n") + dashLine, "", color.hilite, color.notice_prp, "bold"); tflag.mute ? tflag.mute = false : tflag.mute = true; } break; case cb.settings.unmuteAmount: if (cb.settings.unmuteAmount != cb.settings.muteAmount) { if (tflag.mute == true) { cb.sendNotice(dashLine + "\n\u25ba U N M U T E D !\n" + dashLine, "", color.hilite, color.notice_prp, "bold"); tflag.mute = false; } else { cb.sendNotice(dashLine + "\n\u25ba The broadcaster was either just unmuted or not yet muted.\n" + dashLine, viewer, color.hilite, color.notice_prp, "bold"); } } else { break; } break; case cb.settings.instaAmount: if (tflag.denial == true) tflag.denial = false; cb.sendNotice(dashLine + "\n\u25ba " + (tflag.insta ? "I N S T A C U M CANCELLED! \n" : "I N S T A C U M ! \n") + dashLine + "\n\u25ba Tip " + cb.settings.instaAmount + " tokens to " + (tflag.insta ? "ENABLE INSTACUM." : " CANCEL INSTACUM.") + "\n\u25ba " + TortureApp.Misc.tOpt + "\n" + dashLine, "", color.hilite, color.notice_prp, "bold"); tflag.insta ? tflag.insta = false : tflag.insta = true; break; case cb.settings.denialAmount: if (tflag.insta == true) tflag.insta = false; if (cb.settings.areDenialsStackable == "No") { cb.sendNotice(dashLine + "\n\u25ba " + (tflag.denial ? "C U M\u00a0\u00a0D E N I A L CANCELLED! \n" : "C U M\u00a0\u00a0D E N I A L ! \n") + dashLine + "\n\u25ba Tip " + cb.settings.denialAmount + " tokens to " + (tflag.denial ? "ENABLE CUM DENIAL." : " CANCEL CUM DENIAL.") + "\n\u25ba " + TortureApp.Misc.tOpt + "\n" + dashLine, "", color.hilite, color.notice_prp, "bold"); tflag.denial ? tflag.denial = false : tflag.denial = true; } else { if (tflag.denial = false) tflag.denial = true; totalDenialHours += numOfDenialHours; totalDenials = totalDenialHours / numOfDenialHours; cb.sendNotice(dashLine + "\n\u25ba C U M\u00a0\u00a0D E N I A L ADDED!\nHours added: " + numOfDenialHours + "\nTotal hours: " + totalDenialHours + " (" + totalDenials + " denials)\n" + dashLine, "", color.hilite, color.notice_prp, "bold"); } break; case cb.settings.denialCounter: if (cb.settings.areDenialsStackable == "Yes") { if (totalDenialHours > 0) { totalDenialHours -= numOfDenialHours; totalDenials = totalDenialHours / numOfDenialHours; cb.sendNotice(dashLine + "\n\u25ba C U M\u00a0\u00a0D E N I A L REMOVED!\nHours removed: " + numOfDenialHours + "\nTotal hours: " + totalDenialHours + " (" + totalDenials + " denials)\n" + dashLine, "", color.hilite, color.notice_prp, "bold"); if (totalDenialHours == 0) { if (tflag.denial == true) tflag.denial = false; cb.sendNotice(dashLine + "\n\u25ba All cum denials removed!\n" + dashLine, "", color.hilite, color.notice_prp, "bold"); } } } break; } // end switch (tipAmount) if (tipAmount > TortureApp.Misc.highest_tipper_amt) { TortureApp.Misc.highest_tipper_amt = tipAmount; TortureApp.Misc.highest_tipper = viewer; } TortureApp.Misc.latest_tipper = viewer; TortureApp.Misc.latest_tipper_amt = tipAmount; cb.drawPanel(); } } }]); return TipHandler; })(Handler); var UserHandler = (function (_Handler3) { _inherits(UserHandler, _Handler3); function UserHandler() { _classCallCheck(this, UserHandler); _get(Object.getPrototypeOf(UserHandler.prototype), "constructor", this).call(this, null); } _createClass(UserHandler, null, [{ key: "onEnter", value: function onEnter(user) { if (user.in_fanclub) TortureApp.fcArrayPopulate(user.user); } }]); return UserHandler; })(Handler); cb.onDrawPanel(function () { var userFriendlyState = ""; var tortStatus = ""; var muteStatus = ""; var currentSpeed = dSpeed; var currentRSpeed = dRotSpeed; var ht = TortureApp.Misc.highest_tipper; var latest = TortureApp.Misc.latest_tipper; var htAmt = TortureApp.Misc.highest_tipper_amt; var latestAmt = TortureApp.Misc.latest_tipper_amt; var hSpeed, rSpeed, gSpeed; // device conditions var isCout = cb.settings.tortDevice == "Cali Couture (2 speeds)"; var isDoxy = cb.settings.tortDevice == "Doxy (10 speeds)"; var isOgHitachi = cb.settings.tortDevice == "Original Hitachi (2 speeds)"; var isHitachiMw = cb.settings.tortDevice == "Hitachi Magic Wand (7 speeds)"; var isSybian = cb.settings.tortDevice == "Sybian with rotation"; var isOtherDevice = cb.settings.tortDevice == "Other"; // general conditions if (ht == null) ht = ""; if (latest == null) latest = ""; if (cost.mute != null) { if (cost.mute > 0) { if (tflag.mute == true) muteStatus = "Muted";else muteStatus = "Unmuted"; } else { muteStatus = "Disabled"; } } else { muteStatus = "Disabled"; } // rotation - sybian only if (isSybian) { if (tflag.rotactive == false) { rSpeed = "Stopped"; } else { if (currentRSpeed == maxRotSpeed) rSpeed = "Maximum";else if (currentRSpeed == minRotSpeed) rSpeed = "Maximum";else if (currentRSpeed > 0) rSpeed = currentRSpeed + "/" + maxRotSpeed; } } // speed if (isOgHitachi) { if (currentSpeed == 1) hSpeed = "Low";else if (currentSpeed == 2) hSpeed = "High"; } else if (isDoxy || isHitachiMw || isOtherDevice || isSybian || isCout) { if (currentSpeed == maxSpeed) gSpeed = "Maximum";else if (currentSpeed == minSpeed) gSpeed = "Minimum";else if (currentSpeed > 0) gSpeed = currentSpeed + "/" + maxSpeed; if (maxSpeed == 1) gSpeed = "Single Speed"; } if (tflag.insta == true) { tortStatus = "Instacum"; } else if (tflag.denial == true) { if (cb.settings.areDenialsStackable == "Yes") tortStatus = "Cum Denial (" + totalDenialHours + " hour(s))";else tortStatus = "Cum Denial"; } else { if (tflag.active == true) tortStatus = "In Progress";else tortStatus = "Stopped"; } if (cb.settings.showTipCount == "Yes") { if (isSybian) return { "template": "3_rows_of_labels", "row1_label": "Current status [Mute]: ", "row1_value": tortStatus + " [" + muteStatus + "]", "row2_label": "Vib. speed [Rotation]: ", "row2_value": gSpeed + " [" + rSpeed + "]", "row3_label": "Total tips received: ", "row3_value": TortureApp.Misc.tip_total };else if (isOgHitachi) return { "template": "3_rows_of_labels", "row1_label": "Current status [Mute]: ", "row1_value": tortStatus + " [" + muteStatus + "]", "row2_label": "Current speed: ", "row2_value": hSpeed, "row3_label": "Total tips received: ", "row3_value": TortureApp.Misc.tip_total };else return { "template": "3_rows_of_labels", "row1_label": "Current status [Mute]: ", "row1_value": tortStatus + " [" + muteStatus + "]", "row2_label": "Current speed: ", "row2_value": gSpeed, "row3_label": "Total tips received: ", "row3_value": TortureApp.Misc.tip_total }; } else { if (isSybian) return { "template": "3_rows_of_labels", "row1_label": "Current status [Mute]: ", "row1_value": tortStatus + " [" + muteStatus + "]", "row2_label": "Vibration speed: ", "row2_value": gSpeed, "row3_label": "Rotation speed: ", "row3_value": rSpeed };else if (isOgHitachi) return { "template": "3_rows_of_labels", "row1_label": "Current status: ", "row1_value": tortStatus, "row2_label": "Current speed: ", "row2_value": hSpeed, "row3_label": "Mute status: ", "row3_value": muteStatus };else return { "template": "3_rows_of_labels", "row1_label": "Current status: ", "row1_value": tortStatus, "row2_label": "Current speed: ", "row2_value": gSpeed, "row3_label": "Mute status: ", "row3_value": muteStatus }; } }); TortureApp.main();
© Copyright Freesexcam 2011- 2024. All Rights Reserved.