Bots Home
|
Create an App
Chat Controller
Author:
sdf
Description
Source Code
Launch Bot
Current Users
Created by:
Sdf
// / <reference path="~/Scripts/Chaturbate.js" /> var choosemode = "Bot"; // set to App, Bot // colours var Colours = { AliceBlue: "#F0F8FF", AntiqueWhite: "#FAEBD7", Aqua: "#00FFFF", Aquamarine: "#7FFFD4", Azure: "#F0FFFF", Beige: "#F5F5DC", Bisque: "#FFE4C4", Black: "#000000", BlanchedAlmond: "#FFEBCD", Blue: "#0000FF", BlueViolet: "#8A2BE2", Brown: "#A52A2A", BurlyWood: "#DEB887", CadetBlue: "#5F9EA0", Chartreuse: "#7FFF00", Chocolate: "#D2691E", Coral: "#FF7F50", CornflowerBlue: "#6495ED", Cornsilk: "#FFF8DC", Crimson: "#DC143C", Cyan: "#00FFFF", DarkBlue: "#00008B", DarkCyan: "#008B8B", DarkGoldenRod: "#B8860B", DarkGrey: "#A9A9A9", DarkGreen: "#006400", DarkKhaki: "#BDB76B", DarkMagenta: "#8B008B", DarkOliveGreen: "#556B2F", DarkOrange: "#FF8C00", DarkOrchid: "#9932CC", DarkRed: "#8B0000", DarkSalmon: "#E9967A", DarkSeaGreen: "#8FBC8F", DarkSlateBlue: "#483D8B", DarkSlateGrey: "#2F4F4F", DarkTurquoise: "#00CED1", DarkViolet: "#9400D3", DeepPink: "#FF1493", DeepSkyBlue: "#00BFFF", DimGrey: "#696969", DodgerBlue: "#1E90FF", FireBrick: "#B22222", FloralWhite: "#FFFAF0", ForestGreen: "#228B22", Fuschia: "#FF00FF", Gainsboro: "#DCDCDC", GhostWhite: "#F8F8FF", Gold: "#FFD700", GoldenRod: "#DAA520", Grey: "#808080", Green: "#008000", GreenYellow: "#ADFF2F", HoneyDew: "#F0FFF0", HotPink: "#FF69B4", IndianRed: "#CD5C5C", Indigo: "#4B0082", Ivory: "#FFFFF0", Khaki: "#F0E68C", Lavender: "#E6E6FA", LavenderBlush: "#FFF0F5", LawnGreen: "#7CFC00", LemonChiffon: "#FFFACD", LightBlue: "#ADD8E6", LightCoral: "#F08080", LightCyan: "#E0FFFF", LightGoldenRodYellow: "#FAFAD2", LightGrey: "#D3D3D3", LightGreen: "#90EE90", LightPink: "#FFB6C1", LightSalmon: "#FFA07A", LightSeaGreen: "#20B2AA", LightSkyBlue: "#87CEFA", LightSlateGrey: "#778899", LightSteelBlue: "#B0C4DE", LightYellow: "#FFFFE0", Lime: "#00FF00", LimeGreen: "#32CD32", Linen: "#FAF0E6", Magenta: "#FF00FF", Maroon: "#800000", MediumAquaMarine: "#66CDAA", MediumBlue: "#0000CD", MediumOrchid: "#BA55D3", MediumPurple: "#9370DB", MediumSeaGreen: "#3CB371", MediumSlateBlue: "#7B68EE", MediumSpringGreen: "#00FA9A", MediumTurquoise: "#48D1CC", MediumVioletRed: "#C71585", MidnightBlue: "#191970", MintCream: "#F5FFFA", MistyRose: "#FFE4E1", Moccasin: "#FFE4B5", NavajoWhite: "#FFDEAD", Navy: "#000080", OldLace: "#FDF5E6", Olive: "#808000", OliveDrab: "#6B8E23", Orange: "#FFA500", OrangeRed: "#FF4500", Orchid: "#DA70D6", PaleGoldenRod: "#EEE8AA", PaleGreen: "#98FB98", PaleTurquoise: "#AFEEEE", PaleVioletRed: "#DB7093", PapayaWhip: "#FFEFD5", PeachPuff: "#FFDAB9", Peru: "#CD853F", Pink: "#FFC0CB", Plum: "#DDA0DD", PowderBlue: "#B0E0E6", Purple: "#800080", Red: "#FF0000", RosyBrown: "#BC8F8F", RoyalBlue: "#4169E1", SaddleBrown: "#8B4513", Salmon: "#FA8072", SandyBrown: "#F4A460", SeaGreen: "#2E8B57", SeaShell: "#FFF5EE", Sienna: "#A0522D", Silver: "#C0C0C0", SkyBlue: "#87CEEB", SlateBlue: "#6A5ACD", SlateGrey: "#708090", Snow: "#FFFAFA", SpringGreen: "#00FF7F", SteelBlue: "#4682B4", Tan: "#D2B48C", Teal: "#008080", Thistle: "#D8BFD8", Tomato: "#FF6347", Turquoise: "#40E0D0", Violet: "#EE82EE", Wheat: "#F5DEB3", White: "#FFFFFF", WhiteSmoke: "#F5F5F5", Yellow: "#FFFF00", YellowGreen: "#9ACD32", WizardColour: "#0000FF", NecromancerColour: "#800080", HighestTipperBCol: "#E6E6FA", MagicUserBCol: "#F5F5F5", AutomoderatorColour: "#FFA500", NagColour: "#FF0000", LeaderBoardColour: "#BA025D", GoalColour: "#DAA520", TipJarColour: "#6A5ACD", TipMenuColour: "#FF0000", NotifierColour: "#4169E1", TalkColour: "#000000", SayColour: "#000000", VipColour: "#FFF5EE", ThankyouMessageColour: "#FF7F50", BlueWelcomeColour: "#0000FF", GreyWelcomeColour: "#696969" }; // Constants const DevTeam = { Name: "Laguna Studios East", CEO: "LagunaDistortion", DonateMe: "simplypleasurable", HeadDev: "Smokersexual", ThisVersion: "*NEW*Use /moderator-message Like the /say command, but to moderators, VIPs and room owner only." }; const AppName = "Chat Controller " + choosemode + " 4.2"; const SupportMessage = "Contact " + DevTeam.HeadDev + " on KIK at AlfredVButler for support. Thanks for using " + AppName; const FMIModule = 0; // module numbers const MultiGoalModule = 1; const AuthorModule = 2; const StealthModule = 3; const MagicModule = 4; const NagModule = 5; const RoomModule = 6; const AutoModeratorModule = 7; const NotifierModule = 8; const TipJarModule = 9; const LeaderBoardModule = 10; const ShowModule = 11; //the 3 talking areas (not implemented yet) const MainChat = 0; const NoticesInChat = 1; const GreyChat = 2; const Conferenceroom = 3; const Dungeon = 4; const FrogMessages = [ // magic messages "\"Ribbit!\"", "\"Croak!\"", "hops around, chasing flies and other insects around the room."]; const DuctTapeMessages = [ "\"mumble grumble mumble mumble\"", "fidgets around trying to escape the tape.", "tries to speak, but the duct tape prevents it!"]; const FrogTapeMessages = [ "makes muffled frog noises.", "hops around trying to escape the tape.", "tries to croak, but the duct tape prevents it!"]; const CatMessages = [ "\"Meow!\"", "\"Purrrrrrrr!\"", "is playing with a ball of yarn."]; const CatTapeMessages = [ "makes muffled cat noises.", "claws inneffectively at the tape.", "tries to meow, but the duct tape prevents it!"]; var Row1_Default = "Nobody Loves " + SlugName + " :/"; // default row values when running in app mode var Row2_Default = "Last Tipper: " + LastTip; var Row3_Default = (cb.settings.RequestPrice > 0) ? "Tip " + cb.settings.RequestPrice + " if you want a request!" : cb.settings.RoomMessage; var HashTagString_Default = "#couple #bareback #married #fuck #pussy #ass #tits #dildo"; // Variables var AppMode = true; var yellowwall = false; var silent = false; var automodandmagic = false; var invisible = false; var lagunamode = false; var noautomode = false; var HashTagString = ""; var TotalTips = 0; var LastTip = "-- (0)"; var SlugName = "Laguna"; var camMessage = ""; var EmptyTipMsg = "Nobody Loves " + SlugName + " :/"; var Row1 = "Nobody Loves " + SlugName + " :/"; var Row2 = "Last Tipper: " + LastTip; var Row3 = (cb.settings.RequestPrice > 0) ? "Tip " + cb.settings.RequestPrice + " if you want a request!" : cb.settings.RoomMessage; var Row3_Message = Row3; // var nicknames = cb.settings.NickNames.replace(/\s/g, "").split("@"); var BlueCount = 0; // the next 4 variables kept global as they are used in more than the magic module var GreyCount = 0; var WizardCount = 0; var NecromancerCount = 0; var MuteLevel = 0; var SavedMuteLevel = 0; var NoOneIsMonitoringGreys = false; var ModeratorsVIP = false; var BroadcasterModeratorsVIP = false; var BroadcasterOnly = false; var AllGreyChat = true; var GreyGIF = true; var mhspresent = false; var spamkillinvisible = false; var TwoWay = ""; //in chat 2 way private comms var FirstSpeaker = ""; //in chat 2 way private comms var StartRequest = cb.settings.RequestPrice; var StartTitle = cb.settings.RoomTitle; var StartHashtag = cb.settings.HashTags; var ThankyouMessage = ""; var CurrentRoomTitle = ""; var ShowTipInTitle = false; var howOftenToDisplayGoal = 20; var selfadvert = 0; var whichSpell = 0; var useslash = false; var useexclaim = false; var usetilde = false; var usehash = false; var editedname = ""; var notifyTip = ":upgrade,:letsplayguys,:motivation,:comonguys2,:comeontipguys,:bestshow-ever,:tipsshow"; var notifyBlue = ":letsplayguys,:motivation,:comonguys2,:comeontipguys,:bestshow-ever,:tipsshow"; var Tippers = { Highest: { name: "", totalTips: 0 }, List: [] }; var DungeonList = [{ name: "" }]; var ConferenceroomList = [{ name: "" }]; var NotifierList = [{ message: "" }]; var TipList = [{ tipamount: 0 }, { tipoption: "" }]; var ThanksList = [{ thanksamount: 0 }, { thanksmessage: "" }]; var UserList = [{ name: "" }, { userID: 0 }, { arrivalTime: Date.now() }, { weighting: 0 }, { frog: false }, { silence: false }, // silence a user, they wont know they are silenced { ducttape: false }, { cat : false }, { necromancer: false }, { wizard: false }, { automoderated: false }, { whichspell: 0 }, { moderator: false }, { showUID: false }, { has_tokens: false }, { has_tipped: 0 }, { boring_blue: false }, { awesome_person: false }, { probably_awesome_person: false }, { VIP: false }, { roomID: 0 // 0 = main chat 1 = subscribed to notices }, { they_left: false }, { is_a_fan: false }]; // kept global as it is used by more than one module var show = { highestTotal: false, messageInput: false, tipInput: false, gender: false }; var currentNotifierList = ""; var doWeNag = true; // boring blue nagger var delayToNag = 5; //minutes var delayBetweenNag = 2; var leaderboarddelay = 20; //minutes var leaderboardcount = 0; var leaderboardon = true; var NagMessage = "Are you enjoying the show? Interract with me more often, to stop these messages."; var nextUID = 0; // User List database index var PowerUser = false; // if room owner, mod or VIP var DEBUG = false; var out = ""; var Help = { set: function (intA) { switch (intA) { case 1: return "set"; case 2: return "/set-1, /set-2, /set-3 (3 rows of text below camera), /set-request, /set-title, /set-update, /set-spam, /set-rules, /set-talk, /set-hashtags, and /set-<!#~/> for command prefixes."; case 3: return "/set-<row>-<string> (<row> 1 to 3, <string> may contain spaces) to set rows 1 to 3 to a string value. \n/set-request-<amount> (<amount> is a number) sets the request price in tokens (set to 0 to disable), \n/set-title-<string> (<string> may contain spaces) sets the room title to a new value, retains existing hashtags, \n/set-hashtag-#tag1,#tag2,#tag3,... (no spaces), replace existing hashtags, retain existing title.\n/set-<! / ~ or #>-<on/off> enables or disables various command prefixes e.g. if you run ultrabot, you can issue a /set-/-off command so this apps commands dont go to ultrabot as well.\n/set-leaderboard-<on/off> to toggle the tip leader board display on or off, it will appear infrequently if switched on.\n/set-thanks-<message> replace existing thankoyu on tip message."; case 4: return "/set-update-<on/off> allows the title to update on receipt of a tip, \n/set-nag-<on/off/notify/delay/interval/message>-<n>/<message> sets up the inactive blue nagger, see /help-nag.\n/set-talk-<name> (<name> is any user in chat) allows a private two way chat with <name> to be held in main chat (using the /talk-<message> command), \n/set-spam-<on/off> when automoderator is active, stops the room owner seeing the spam, set to on so you can monitor what is going on (see also /show-spam).\n/set-rules-<on/off/ban/spam/0 thru 6> when automoderator is active, turns the text filtering rules on or off, see /help-automod.\n/set-gif-off mutes all GIF images, use /nice or /vip to bypass this, /set-gif-on to allow GIFs again.\n/set-stealth-<item>-<on/off> switched various aspects of the app output on or off, where <item> can be error (warning/error messages), chat (all notices),row (the 3 lines under the camera), text (all of those previous 3 items), author, magic (authors and magic user colour highlights), titles, or all (everything).\nAlso see help on tipjar, notifier, multigoal, tipmenu for /set commands relating to these modules."; } }, reset: function (intA) { switch (intA) { case 1: return "reset"; case 2: return "tips, 1, 2, 3, all, request, title, talk... returns these to their default state for " + AppName + "."; case 3: return "/reset-<row> (<row> 1 to 3 or all) sets the row back to its default value, sets all rows back to their default value \n/reset-tips sets the total tips back to 0, has no effect on multi goal tips (see /goal command to do that), \n/reset-request reset tip request amount to that specified at app start"; case 4: return "/reset-title sets room title back to the one chosen on app start, \n/reset-update restores the initial update title on tip setting at app start, \n/reset-talk allows either participant in a private two way chat to end the chat.\n/reset-stealth sets app output back to the default."; } }, apporbot: function (intA) { switch (intA) { case 1: return "apporbot"; case 2: return "There are two versions of " + AppName + ", the app and the bot. According to the CB website, apps can update the room title and rows 1 to 3 under the camera, and bots cannot."; case 3: return "However, bots have been known to update the room title, so who knows for sure. Upon starting " + AppName + ", the app/bot defaults to the correct type. Standard disclaimer: If " + AppName + " breaks, you get to keep both pieces."; case 4: return "As far as how " + AppName + " behaves, in bot mode FMI is disabled, Tip Jar is pointless, and the Multi Goal module is limited to outputting details in the chat area. Various set, show and reset commands relating to rows 1 to 3 and the room title will also be disabled or simply not work.\nOnce started, the full command line inertface is there for use in all versions.\n If you use apps, like crazyticket or the ohmibod apps, then use one the bot version. KIK me at AlftedVButler for help in English. "; } }, features: function (intA) { switch (intA) { case 1: return "features"; case 2: return "Welcome to " + AppName + ", the app that helps you regain control of chat, adds VIPs and magic users act as enhanced moderators, and in most cases, with no need to restart the app/bot to make the changes occur. It has the usual rotating notifier, tip menu, multi goal, automod, leaderboard, and tip jar. It also has the following features:"; case 3: return "1) A total grey spam solution (see /help-mute and /help-quick), you can choose who gets to see grey messages. You can say goodye to all those adverts for free tokens. 2) The ability to persist some data between app runs. If you remember to access the certain data stored in the app (via the /sh command, most commands may be abbreviated e.g. /sh = /show), you can enter it in on the next app start. \n3) A fun magic system, frogs, cats and duct tape.\n4) Grey friendly automoderator if the total grey spam solution is switched off (greys have helped to fine tune it). Kills most of that spam too (see /help-automod).\n5) Anyone can be made VIP's and given near rights to control this app/bot, useful if you have an offputting red wall in your chat, let your moderators be blue. Regular Moderators have same access to the app/bot as VIPs."; case 4: return "6) Works with any other app/bot out there by having 4 different command prefixes / ~ # and !. If you use another app/bot that uses / # ~ or ! to control it, you switch to one of the others to control this app/bot.\n7) User IDs as well as usernames for use in commands, saves having to figure out how to type those long weird names people use in chat.\n8) All parts of " + AppName + " can be stealthed to reduce messages in chat.\n9)It is modular, so you need not run all of the features. See /help-modular for more info.\n10) No need to restart " + AppName + " if you want to change things, a command system exists to make changes to settings while the app/bot is running. IMPORTANT, restarting the app/not will lose any internally held data, like who has tipped you, restarting " + AppName + " is a last resort option, use the command system instead.\n11) Can be runs as an App, Bot."; } }, modular: function (intA) { switch (intA) { case 1: return "modular"; case 2: return AppName + " is split in to modules, you may activate or deactivate these at ny time. Some will require additional commands."; case 3: return "1) The /mm command (see /help-mm) controls which modules are running. \n2) FMI - This controls output to rows 1, 2 and 3. Enabling FMI allows these rows to display things like the current goal from MultiGoal, highest tipper, special messages, see /help-fmi. \n3) MultiGoal. A tip for goals system, up to 10 of them. See /help-multigoal and /help-goal (being the commands used to update the goals on the fly while " + AppName +" is runing)\n4) Author/VIP gives the app authors VIP rights, and highlights them in chat.\n5) Stealth allows you to enable or disable output from the app/bot while the underlying modules continue to run, useful for busy rooms. Deactivating turns all non essential app/bot output off."; case 4: return "6) Magic can be switched off if you want, cant imagine why youd want to though ;).\n7) Nag is the inactive blue nagger, you can set it to remind these blues to interract every few minutes.\n8) Automoderator, kills much of the crap in chat, if the magic module is active, it may turn offenders in to frogs.\n9) Notifier, a rotating notifier that lets you have a timed selection of messags appearing in chat.\n10) TipJar, a Tip Jar system featurng a starting tip threshold, and control over the rate of decrease.\n11) LeaderBoard, kees track of the top three tippers and tells the room about them occasionally.\n12) TipMenu, a token tip sensitive tip menu, broadcaster is notified if a menu item is tipped for.\n13) Shoe, provides a way to show tips, top tipper crown and User IDs against a users name. The user ID can be toggled with the /show-uid command."; } }, roomtitle: function (intA) { switch (intA) { case 1: return "roomtitle"; case 2: return "It is desirable to modify the room title via the app, for while that can be done in other ways, this app wont know about those changes and may overwrite. Room titles come in 3 parts, the room name, the last tip received, and hashtags. Room titles are officially App mode only, but if you can get it to work in Bot mode, feel free to use the Bot version of this."; case 3: return "1) The /set-title-<some text> will set the room title to <some text> e.g. /set-text-Welcome to the hottest show on CB. /reset-title will return the title and hashtags to that specified at app start.\n2) /set-hastag-<hashtags> will append a comma separated list of hashtags to the room title. e.g. /set-hashtag-#ohmibod,#dildo,#vibrate,#tip,#magic. There is no way to add/remove specific hastags, or reset the hashtag string on its own at this point." case 4: return "3) /set-update-<on/off> will cause the last tip information to be included in the rtoom title. /reset-update will revert thte App to the setting used in App start."; } }, fmi: function (intA) { switch (intA) { case 1: return "fmi"; case 2: return "The App version of " + AppName + " can update rows 1, 2 and 3 below the camera. As a rule, row 1 shows the total tips received, row 2 shows the last tipper or tipjar details (see /help-tipjar), and row 3 is the request price. When FMI is activated., row 3 is a rotating series of messages."; case 3: return "Row 1 starts with an indicator that nobody loves you, a way of saying there have been no tips. A tip will update this to show the current running total. \nRow 2 shows the last tipper or tipjar details.\nRow 3 is either just the request price if FMI is deactivated, or it cycles between the Welcome message (incorporating the last tip receioved), total tipped so far, the person who has tipped the most (other apps call this person the MVP for some reason), the tip request price (if set), a custom message (defaults to prompting the viewer to ask for your Amazon wish list), the next goal (if multigoal module is active), if FMI is activated. "; case 4: return "Use /set-1-message to change Row 1, likewise /set-2- and /set-3-. When FMI is deactivated, those new values remain until a tip/tipjar activity which may cause an update. When FMI is activated, the row 3 message is incorporated in to the rotating sequence of messages, and replaces the Amazon message. Use /reset-1, 2, 3 or all to set these thre rows back to the default values."; } }, automod: function (intA) { switch (intA) { case 1: return "automod"; case 2: return "There is an autmoderator built in, the idea is that by default, greys are automoderated and blues arent, a grey cen be moved to unmoderated (/nice command) and a blue can be moved to automoderated (/unnice command). Automoderator removes many unwanted messages from the general viewers chat if there are no mute modes in place for grey chat (see /help-mute). As room owner or moderator, you still get to see the grey messages that Automoderator picks up, along with the automod rule it broke, in order to decide what action to take. All aspects of Automoderator can be toggled on or off. Sell also /help-ban, /help-nice, /help-allow, /help-mute and /help-silence commands to effectively direct chat towards the style you want."; case 3: return "To go with automoderator. there is /show-rules to show what rules are on/off, and the banned word list which can be copy/pasted for use in the next app start. The /set-rule command enables or disable rules.\n/set-rule-<number> e.g. /set-rule-3 to toggle automod rule 3 on or off. /set-rule-on to switch all rules on, /set-rule-off to switch them all off, /set-rule-spam to enable the spam killer rules only. /set-rule-ban to toggle the banned phrase check on or off.\nThe rules attempt to be fairly grey friendly, so PM is blocked but 10pm is allowed, if the PM request blocker rule is enabled."; case 4: return "Use the /set-gif-on/off command to control grey GIFs, this one does not block smileys :). The Automoderator uses the magic module to cast spells on people who break the rules, as well as remove the offending message text.\nPM requests are generally let through with a warning that they may not be accepted.\n Use /show-spam to view the last 10 rejected messages.\nOccasionally a new word/phrase/website you want banned suddenly appears in chat. You may use the /ban-phrase command. There are up to 100 phrases you can ban. Use/unban-phrase to remove a ban. Use /show-rules to show the banned phrases."; } }, mute: function (intA) { switch (intA) { case 1: return "mute"; case 2: return "/mute and /allow /unallow. The big feature of the app, say goodbye to grey spam, your blues and other greys will see it no more if you enable this feature. The default mute level is (/mute-off) is to allow all grey chat through, to be processesd by the automoderator. This makes the app behave like every other automod app out there. However, those pesky spammers always find ways round automoderators, most of the app updates have been automod rule updates. If you want a permanent end to this spam advertising of other sites, then the other mute modes are for you.\nIf you care nothing for greys, use /mute-all - this hides most grey chat from everyone, even yourself, moderators, and VIPs. Greys are advised of this on room entry. Automoderation is ongoing, so you will see automoderator messages if they do banned stuff, and such things can be muted by the /set-spam-off for the broadcaster, or the /silence-grey command for everyone else. You may /nice, or /allow any grey to let them through this mute filter.\nUse /show-mute to see what mute level is in effect."; case 3: return "Most broadcasters, however, welcome greys who behave well. Put your moderators to work instead, but this time by passing nice greys in to chat, rather than removing bad ones! Use /mute-vip to set things up that your moderators and VIPs can see grey messages. Nobody else will see them, with the same autmoderator caveat as above reporting banned activities. Greys will be told about their limited audience, which does not include the broadcaster. Again, use /nice, or /allow to let them type. You may leave greys in this muted state and talk to them.\n/nice will make a user exempt from mute and automoderation. /allow will make a user exempot from muting but not automoderation. /unnice will make a user subject to automoderation but not the mute, /unallow will mute the person. You can do this to any user except the room owner. Moderators and VIPs may also issue the commanfs, so if you want to mute or autmoderate those, you need to ummoderate, or /unvip them."; case 4: return "Use the /mute-normal to include the broadcaster in the list of grey message viewers, greys will be told the broadcaster can see their messages on room entry. This is useful if you have no moderators, and is the setting recommended if you want to see grey chat, but keep it hidden from the rest of the room.\nWhen grey chat displays in a mute filter, it is now displayed as notices e.g. \"Notice: Grey ebl(11) (hi), use the /allow-ebl command to let them type.\" It contains the grey name, user ID, and their message, and the command you can copy/paste in to chat to let them talk in chat subject to automoderation.\nIt wont stop blue spammers, to do that you can /unnice the blue who is spaming to make then subject ot automoderation, or /unallow to make the subject to the mute. These are blues rare though. You can also use the /silence-cheap (see /help-silence) command to force blue blues to tip before typing, or lockdown mode (/silence-all) to stop everyone if a blue fight breaks out.\nGreys subject to muting are informed on each message. Blues subject to muting get a reminder for each message so they can take action to remedy the bad behaviour that got them muted."; } }, nag: function (intA) { switch (intA) { case 1: return "nag"; case 2: return AppName + " lets you monitor inactive blues, those people who may have tokens, but who just sit there and freeload without typing or tipping. You can go kick them out of the room, you can PM them to illicit a conversation. Disabling the module does not stop the monitoring of such blues, but any information gathered about their activity is hidden. By default the module is NOT active, and only the room owner and mods/VIPs see the messages, blues are unaware of the monitoring until they get the message saying theyu have been spotted not interracting."; case 3: return "The blue viewer in question will get reminders to interract if /set-nag-notify has been issued. /set-nag-off is the equivalent of having the nag module disabled, and /set-nag-on just informs the room owner and mods/VIPs about these blues, without nagging the blues about it.\nUse /set-nag-message-<message> to define the nag message the blues get if the module is active and notify is set."; case 4: return "Use /set-nag-delay-<n> set the delay, in minutes, before a blue is deemd inactive. /set-nag-interval-<n> setsh the interval betwewn nag messages to the blue (again if notify is set). Greys are not monitored, silent greys are useful for boosting viewer numbers. IMPORTANT, it is advisable to switch this module off if you enter a private, or password show, unfortunately it is not possible to detect this, so you or a VIP/Moderator has to enter the /mm-d-nag command. This is bacause as soon as you go in to pvt/password area, all other users are unable tin interract, so eventually will be shown up as inactive by this module, which may distract from the pvt/password show."; } }, colour: function (intA) { switch (intA) { case 1: return "colour"; case 2: return "Various modules/aspects of the app/bot can have different colours assigned to their output in chat, colours are in the hex triplet format describing RGB values. Examples of such colours may be seen if you view the source code of this app."; case 3: return "Use the /set-colour-<object>-<RRGGBB> to change the colour of <object> to #RRGGBB value. e.g. /set-colour-tipjar-FF0000 would cause the Tip Jar output to be colour #FF0000 (or red). The word color may be used instead of colour. If <RRGGBB> is left blank, the colour reverts to its default setting. The defaults may be seen during app start, where most colours are there to be modified if need be."; case 4: return "<object> can be one of magic (magic user), high (highest tipper), wizard, necromancer, nag (inactive blue monitor), leader (leadeboard), notifier (rotating notifier), tipmenu, tipjar, goal (multigoal), talk (/talk command, default black), say (/say command, default black), thanks (thankyou message colour). "; } }, color: function (intA) { switch (intA) { case 1: return "color"; } }, multigoal: function (intA) { switch (intA) { case 1: return "multigoal"; case 2: return "The App version of " + AppName + " will integrate with FMI to display the next goal on row 3. Other than that, functionality is identical between app and bot. It can run with tip menu and tip jar if you opt to have all three systems in operation."; case 3: return "Use the screen at app start to set up your multigoal, you can have up to 30 of them at this time. The multi goal list needed to reach them are entered as a comma separated list, and it should be noted that a text editor is a better place to set up a multi goal, and that can then be copy pasted in to this app at startup, and also in to the /goal-set-<comma separated multigoal list> command if you need to change the goals at any time. Use /show-goal to list the current goals, use a text editor to alter it, and copy/paste in to the /goal-set- command or multigoal area on app start. Generally restarting the app is a bad idea."; case 4: return "You may use the other /goal commands to reconfigure the goals while the app is running. See /help-goal for further information.\nUse /say-goal to broadcast the next goal to the room if in bot mode.\nExample of a 3 option <comma separated multigoal list> - 10,top off,20,bottom off,50,get hard"; } }, tips: function (intA) { switch (intA) { case 1: return "tips"; case 2: return AppName + " attempts to keep track of the tipping. Use /show-tip to see who has tipped so far. WARNING and app restart deletes this data."; case 3: return "The FMI module can display total tips, highest tipper and latest tipper, in rows 1 to 3, see .help-fmi.\n/set-update-<on/off> enables a tip to cause a room title update.\n/set-request-<amount> e.g. /set-request-25 sets the request tip amount, this is displayed by FMI too. \n/set-request-0 disables the request feature and \reset-request restoes the value to that specifed at App start. See also /help-tipmenu"; case 4: return "Tips are used by the nag module (see /help-nag) to determine how long to wait until a blue is deemd to be inactive, suffice it to say that a heavy tipper will never be flagged as inactive.\n/reset-tips clears out tipped total in the App, iti is still possible to view who tipped what with /show-tip.\nThe goal module also tracks tips in its own right to keep track of goals met. /goal-reset-tips sets the tips monitored to 0, which allows you to restart the goals from the start, see /help-goal for further information on the goal module.\nThere is a tip leaderboard, it appears every 5 minutes in chat, and can be switched on or off with /set-leaderboard-on or /set-leaderboard-off"; } }, tipmenu: function (intA) { switch (intA) { case 1: return "tipmenu"; case 2: return AppName + " has a tip menu system that lets you specify a menu of requests and the tips needed to triger them, the app will notify the room when any tip matches the menu, it is in effect a rotating notifier that is sensitive to tips. You may have multiple items with the same tip amount. The tip menu can run in conjunction with multi goal and tip jar.\nUse /set-tip-on to enable the tip menu, /set-tip-off ti disable it"; case 3: return "The tip menu is a comma separated list at app start. Use /show-notifier to view the tip menu and rotating notifier settings. Use /set-tip-<comma separated tip menu> to set a new tip menu. e.g. /set-tip-50,go hard,300,dildo ass,1000-have sex /set-tip- clears the tip menu, and is in effect a /set-tip-off.\n/set-tip-time-5 will set the tip menu to appear every 5 minutes, replace 5 with any time in minutes."; case 4: return "Instead of building in advanced tip menu editing like there is for multi goal, the user may use /show-notifier to list the current menu and use a text editor to alter the values, then supply the edited text as part of the /set-tip- command. The tip menu may contain GIFs, but it will probabaly look messy."; } }, notifier: function (intA) { switch (intA) { case 1: return "notifier"; case 2: return AppName + " has a rotating notifier system that lets you specify a list of notices for display in chat. It also has the ability to set the frequency of notices in minutes. It does not react to tips, unlike tip menu."; case 3: return "The notifier is a comma separated list at app start. Use /show-notifier to view the tip menu and rotating notifier settings. Use /set-notifier-time- to set the frequency (in minutes) e.g. /set-notifier-time-5 would set the notifier interval to 5 minutes per message.\nUse /set-notifier-on to enable notifier, /set-notifier-off to disable it.\nTo set a new rotatintg notifier, use /set-notifier-<comma separated messages> e.g. /set-notifier-welcome to my room,please tip,follow me on twitter"; case 4: return "Instead of building in advanced notifier editing like there is for multi goal, the user may use /show-notifier to list the current notices and use a text editor to alter the values, then supply the edited text as part of the /set-notifier- command. The notifier may contain GIFs."; } }, tipjar: function (intA) { switch (intA) { case 1: return "tipjar"; case 2: return AppName + " has a tip jar system that lets you determine if there has been enough tipping to warrant a show. The tip jar can run in conjunction with multi goal and tip menu, ideally it only run in App mode, as that updates the display in real time, in bot mode there are only occasional notices."; case 3: return "The tip jar is set up at app start, it has an interval (in seconds) for tip jar deductions, and an ammount (tokens) to be deducted every interval. e.g a value of 1 token every 5 seconds means that tippers need to maintain a tipping rate of 12tkns/min to keep a show going, how high you go depeds on your tippers. If you can persuade them to tip 100tkns/minute, then you should go for it.\nAesthecially, frequent updates to the tip jar look nicer, but may strain the chat if its busy, adjust to suit your needs.\nUse /set-jar-off to pause the tip jar, /set-jar-on to resume the tip jar, it will remember the tokens in the jar unless the tip jar is restarted with the module manager (see /help-modular)."; case 4: return "Use /show-jar to output the tip jar settings. Use /set-jar-<frequency>-<amount>-<start> to set the frequency of deduction, the amount to deduct, and the start point (how much of a tip is required initially to start yhr Tip Jar).\n If you feel there have been enough tips from many users to get the Tip Jar going, you may type /set-jar-start-<ammount> to get the Tip Jar started manualy."; } }, say: function (intA) { switch (intA) { case 1: return "say"; case 2: return "In chat global messaging - /say-<message> (<message> may contain spaces), /say-goal"; case 3: return "/say sends the string message as a notice to the room. Use /talk to communicate between two users (see /help-talk), use /tell-<user>-<message> to send someone a direct message. /say-goal works if multi goal is active, the current goal is broadcast to the room. If module FMI is active, the goal is broadcast to the room every 5 minutes, so this is of use if the FMI module is deactivated.\n/say may also be used to message between a pvt and main chat. A broadcaster in a pvt may /say a status to the people outside the pvt, moderators/VIPs outside the pvt may get a message through to all in the pvt using /say. The message in a /say is exempt from automoderation."; } }, moderator: function (intA) { switch (intA) { case 1: return "moderator"; case 2: return "In chat moderator messaging - /moderator-<message> (<message> may contain spaces)"; case 3: return "/moderator sends the string message as a notice to the moderators, room owned and any VIP users. Use /tell-<user>-<message> to send someone a direct message. /moderator may also be used to message between a pvt and main chat. A broadcaster in a pvt may /moderator a status to their moderators outside the pvt, moderators/VIPs outside the pvt may get a message through to the broadcaster in the pvt using /moderator. The message in a /moderator is exempt from automoderation."; } }, talk: function (intA) { switch (intA) { case 1: return "talk"; case 2: return "In chat private messaging - /set-talk-<user> /set-talk-<message> (<message> may contain spaces), /show-talk, /reset-talk. You may also /dell-<user>-<nessage> to send a message directly without initiating a talk session."; case 3: return "/set-talk-<user> enables a 2 way PM with that <user>, viewable only by the two users in the /talk. This will eventually be replaced with a full multi user multui room conferencing system. VIPs/Moderators and the room owner can determine if a talk is in progress with /show-talk, but cannot monitor it. /talk messages are exempt from automoderation.\n As per any command referencing a <user>, a UserID may be substituted. /talk-<message> will send that <message> to the other user in the /talk PM. /reset-talk closes the /talk PM. IMPORTANT. There can only be one /talk ongoing, if another moderator/VIP or room owner initiates a /set-talk, it replaces the current /talk, likewise a /reset-talk issued by a non participant will close the existing /talk./talk may also be used to message between a pvt and main chat. A broadcaster in a pvt may /talk to one person outside the pvt, moderators/VIPs outside the pvt may /talk to anyone in the pvt. "; } }, users: function (intA) { switch (intA) { case 1: return "users"; case 2: return "At any point in this app/bot where a username can be entered in a command, a username may be replaced with a userID. " + AppName + " maintains a list of active users for the nag module and just about everything else. Because some users have virtually untypable names, and it is quicker to type numbers, a way to reference them quickly was needed, and that was userIDs."; case 3: return "/show-last displays the last 5 users the app/bot knows about. /show-last-10 shows the last 10 users, replace 10 with any number to view that last number of users.\n/show-user and /show-user-<from>-<to> shows all users, or all those users between the <from> and <to> userID limits. A /show-users without parameters may be larger than the CB chat window can deal with, so try to use the <from> <to> limits. Future expansion, more commands to obtain userIDs are planned, and it is hoped, a way to view the user ID's of the last <x> messages, and put them in to the chat for moderators/VIPs to view only.\n/show-uid-on is a command for the room broadcaster, moderator and VIPs to cause notices detailing users ID's to accompany their messages. This is off by default for VIPs and room broadcaster, on for moderators."; } }, vip: function (intA) { switch (intA) { case 1: return "vip"; case 2: return "/vip-<user>, /unvip-<user> add or remove user from the VIP list. VIP people are exempt from /silence, and may access moderator level app commands. "; case 3: return "The App authors are defaulted to VIPs when the vip module is activated. VIPs monitor User IDs by default, use /show-uid-off once you are a VIP to disable this."; } }, allow: function (intA) { switch (intA) { case 1: return "allow"; case 2: return "/allow-<user>, /unallow-<user> add or remove user from the automoderated list. Allowed people are exempt from /silence, but not automoderation, and may access regular user app commands."; case 3: return "To exempt someone from automoderation, use the /nice command."; } }, nice: function (intA) { switch (intA) { case 1: return "nice"; case 2: return "/nice-<user>, /unnice-<user> add or remove user from the nice list. Nice people are exempt from /silence, automoderation, and may access regular user app commands."; case 3: return "To make someone be automoderated, use the /unallow command.\nUse /show-nice to list them all, use /show-grey to list the oned without tokens and /show-blue for those with."; } }, silence: function (intA) { switch (intA) { case 1: return "silence"; case 2: return "In chat muting - /slience-<user>, /unsilence-<user>, prevents future messages from this user, and /unsilence allows them to message again, they will not know they are silenced, their old messages are not removed.\n"; case 3: return "/silence-all is lockdown mode, it silences all chat except mods, VIPs and the room owner, /silence-grey mutes grey chat except /nice greys, /silence-cheap mutes all non tippers, and /silence-none removes all restrictions.\nUse the /silence commands, with the automoderator, to control the content of chat towards the style you want, use /nice or /vip to let users bypass these /silence settings.\nFeel free to use my KIK AlfredVButler to forward me names of abusive users you want permanently banned."; } }, mm: function (intA) { switch (intA) { case 1: return "mm"; case 2: return "/mm-<command>-<module>, /mm-list"; case 3: return "<command> can be activate, deactivate and list"; case 4: return "Activates or deactivates modules, e.g. /mm-activate-fmi to turn on module fmi. Use /mm-list to show available modules and their activation state and what they do. \nPlease note the VIP module, this module allows the app authors, and other VIPs, to demonstrate the commands, and magic spells, to any room owner (and their moderators) using this app, without having to make the app author a moderator. This access level is enabled by default, as I feel that I can trust myself to not make an ass of myself in your chat."; } }, // Power Users version of goal help goal: function (intA) { switch (intA) { case 1: return "goal"; case 2: return "/goal-list, /goal-list-all list all goals (with the all option to broadcast to all users) and shows the current goal, \n/goal-reset, /goal-reset-tips reset goals to default values, or just the amount default tip values.\n/goal-notify-<true/false> Every 5 minutes the current goal can be broadcast to the room, toggle this on and off.\nIf you wish to truncate the goal session, you may use /goal-max-<number> to get the app to not deal with the goals after the <number> goal."; case 3: return "Use \goal-set and /show-goal to alter the goals, see /help-multigoal for more information.\n Use /show-goal to list the current goals in a format that can be copy/pasted in to the /goal-set command, or the app when you start it.\nUse /goal-number-<number> to skip to goal <number> in the list, this will be of use if some other tipping activity causes you to meed a goal.\nIf you wish to have a new set of goals, the best solution is to use /mm-deactivate-goal to deactivate multi goal, then use the /goal-reset-tip and /goal-set-<comma separated multigoal list> commands to create a new multi goal, then use /mm-activate-foal to reactivate the multi goal system."; } }, // Normal user version of goal help quick: function (intA) { switch (intA) { case 1: return "quick"; case 2: return "The first three options at app start let you use certain presets for the app. Use of the second and third options as follows.\n1) Automoderated grey chat. Option 2 - No filtering, option 3 - All can talk.\n2) No greys in chat. Option 2 - No one monitoring greys, option 3 - Greys Are Silenced. No need for any moderators except for me to run the app for you :P\n3) Moderators/Broadcaster see grey chat. Option 2 - Any of the other options listed depending on who you want to see the grey messages, option 3 - All can talk.\n4) Tippers only. Option 2 - No one monitoring greys, option 3 - non tippers are silenced.\n5) In addition, for option 3, you can see there is a lockdown option, for a chat where only moderators and broadcasters can talk."; case 3: return "Option 1 controls how much information the app/bot outputs, Normal mode is recommended.\nUse Quiet mode if you use an Ohmibod or get lots of tipping.\nLaguna Mode is an example of a custom setting for a specifc model, treat me nice, I will add one for you, you may use other models presets.\nSilent mode means only important messages get output by the app/bot.\nAutomoderator/Magic/Thanks leaves my favourite features able to output, the rest is switched off.\nInvisible mode, it tells you its starting, then runs silently with whatever settings you have given it.\nNo Automatic responses, any automated responses by the app/bot are off. Automoderator and Magic are disabled, so your moderators will have to work."; } }, show: function (intA) { switch (intA) { case 1: return "show"; case 2: return "/show-highest-<true/on/false/off/toggle> switch highest tipper true/on false/off or toggle (enables it on FMI module too), \n/show-tippers show who has tipped since the app was started (/show-tippers-all to send to all in the room), \n/show-wizard, /show-necromancer, /show-frog, /show-tape, /show-silence, /show-nice shows all wizards, necromancers, frogs, duct taped, silenced and nice users.\n/show-gender-<true/on/false/off/toggle> allows the display of gender details of who sent the message."; case 3: return "/show-user, /show-user-<boring/bore>, /show-user-left (optional show users between two user IDs e.g. /show-user-bore-100-150) shows the users who have been in the room recently, those who have left, and those who are beign boring, the app maintains a list of users (blue and grey), those who leave are eventuially removed from this list of users, so there will be gaps in th euser list. This list is used as part of the nag module.\n/show-last-<n> shows the last <n> users to interract with the room (tip or talk), also part of the nag module.\n/show-nag shows nag settings (encourage boring blues to interract) \n/show-totals shows the users types (not working yet). \n/show-talk Shows who is talking to who if a private two way chat is established. \n/show-spam shows the 10 most recent automoderated messages (if any), \n/show-rules shows the current automodertator rules, who they apply to and their enabled state. \n/show-stealth shows how much output the app can generate (e.g. are error messages switched off)\n/show-uid-<true/on/false/off> allows the user ID to be displayed as a notice along with the users message. This is on by default for moderators and VIPs, and off for broadcasters.\n/show-mute shows the mute level in use, see /help-mute."; } }, show2: function (intA) { switch (intA) { case 1: return "show"; case 2: return "/show-tippers show who has tipped since the app was started, \n/show-wizard, /show-necromancer shows all wizards, necromancers. \n/show-rules shows the automoderator rules."; } }, ban: function (intA) { switch (intA) { case 1: return "ban"; case 2: return "Up to 3 banned phreases may exist. /ban-<1,2,3>-phrase. e.g. /ban-1-go to berippedofffortokens.con will ban the phrase \"go to berippedofffotrokens.con\". /ban-list will show the three current banned phrases."; case 3: return "/ban-1- will remove banned phrase 1. If you find certain phrases, like spam websites, keep on coming up, KIK me (AlfredVButler) to give me details, so I can update the app."; } }, yellowwall: function (intA) { switch (intA) { case 1: return "yellowwall"; case 2: return "From time to time, a yellow wall will appear, if one is starting, use /quiet to mute " + AppName + " global message app output and the room title updates. Use /quiet-chat to disable all non tipper chat as well (equivalent to /slience-cheap, the command that only lets tipper talk)."; case 3: return "Use /noise to re-enable " + AppName + " output (and restore original silence settings). The /set-stealth command may be used as an alternative."; } }, magic: function (intA) { switch (intA) { case 1: return "magic"; case 2: return "There are three levels of users, normal, Wizard and Necromancer. If you are a Wizard or Necromancer, you may use magic, the magic module of /mm has to be activated, it is by default."; case 3: return "The room owner, and fan club members, are always set to Necromancer. Necromancers may /wizard and /necromancer any user, and /unwizard or /unnecromancer any user e.g. /wizard-fred. Spells are /frog, /unfrog, /cat, /uncat, /tape (wraps a user in duct tape) and /untape. e.g. /frog-username . You may combine some of these spells."; } } }; var Groups = { TokenHolders: "cyan", Tippers: "blue", Fans: "green", Moderators: "red" }; var Messenger = { sendModeratorNotice: function (str) { /* Undocumented note: "Moderators" actually includes the broadcaster */ this.sendGenericMessage(str, Colours.Blue, "", "", Groups.Moderators); }, sendErrorMessage: function (str, recipient, group) { if (Modules[StealthModule].vars.ErrorVisible) { this.sendGenericMessage(str, Colours.Red, "", recipient, group); } }, sendWarningMessage: function (str, recipient, group) { if (Modules[StealthModule].vars.ErrorVisible) { this.sendGenericMessage(str, Colours.Orange, "", recipient, group); } }, sendSuccessMessage: function (str, recipient, group) { this.sendGenericMessage(str, Colours.DarkGreen, "", recipient, group); }, sendInfoMessage: function (str, recipient, group) { this.sendGenericMessage(str, Colours.Black, "", recipient, group); }, sendGenericMessage: function (str, colour, background, recipient, group) { if (Modules[StealthModule].vars.ChatOutputVisible) { cb.sendNotice(str, recipient, background, colour, "bold", group); } }, sendMagicMessage: function (str, colour, background, recipient, group) { if (Modules[StealthModule].vars.MagicUserVisible) { cb.sendNotice(str, recipient, background, colour, "bold", group); } }, sendUnblockedMessage: function (str, colour, background, recipient, group) { if (!invisible) { cb.sendNotice(str, recipient, background, colour, "bold", group); } } }; var Modules = [{ name: "fmi", title: "For My Information (FMI)", isEnabled: true, hasOnDisable: true, desc: "For My Info module, outputs useful messages under the camera", affectsRow1: false, affectsRow2: false, affectsRow3: true, vars: { timedFrequency: 5000, // 5 seconds timedMessageNumber: 0, //which message is displayed displayMessage: 0, timedMessages: [ "Welcome [ Last Tip: " + LastTip + " ]", "Love Shown: " + TotalTips + " Tokens.", (show.highestTotal) ? "Highest Total Tipper: " + Tippers.Highest.name + " |" + Tippers.Highest.totalTips + "|" : Row3_Message, Row3_Message, "Ask for my Amazon wish list. ", "No goal set. "] // message texts }, timedActivities: function () { if (!Modules[FMIModule].isEnabled) { return; } //only run if module is activated // update timesMessages to latest contents before attempting to display them. Modules[FMIModule].vars.timedMessages[0] = "Welcome [ Last Tip: " + LastTip + " ]"; Modules[FMIModule].vars.timedMessages[1] = "Love Shown: " + TotalTips + " Tokens."; Modules[FMIModule].vars.timedMessages[2] = (show.highestTotal) ? "Highest Total Tipper: " + Tippers.Highest.name + " |" + Tippers.Highest.totalTips + "|" : Row3_Message; Modules[FMIModule].vars.timedMessages[3] = Row3_Message; if (Modules[MultiGoalModule].isEnabled) { if ((Modules[MultiGoalModule].vars.currentGoalTip - Modules[MultiGoalModule].vars.GoalTips) > 0) { // then output the next goal or that all goals are met Modules[FMIModule].vars.timedMessages[5] = "Next goal: " + Modules[MultiGoalModule].vars.currentGoalText + " " + (Modules[MultiGoalModule].vars.currentGoalTip - Modules[MultiGoalModule].vars.GoalTips) + " Tokens to go. "; } else { if (Modules[MultiGoalModule].vars.currentMaxGoals == 0) { Modules[FMIModule].vars.timedMessages[5] = "No goals set."; } else { Modules[FMIModule].vars.timedMessages[5] = "All goals met."; } } } else { Modules[FMIModule].vars.timedMessages[5] = "No goal set. "; Modules[MultiGoalModule].vars.GoalNotify = 0; } out = Modules[FMIModule].vars.timedMessages[Modules[FMIModule].vars.timedMessageNumber]; SetRow(3, out, 55); cb.log("Row 3 set to 1st 55 chars of " + out); Modules[FMIModule].vars.timedMessageNumber++; if (Modules[FMIModule].vars.timedMessageNumber == 6) { //this repeats every 5 seconds, so after 6 lots of 5 seconds (30 seconds) do the following Modules[FMIModule].vars.timedMessageNumber = 0; Modules[MultiGoalModule].vars.displayMessage++; Modules[MultiGoalModule].vars.GoalNotify++; //Messenger.sendGenericMessage("debug: currentgoaltip " + Modules[MultiGoalModule].vars.currentGoalTip + ", goaltips " + Modules[MultiGoalModule].vars.GoalTips + ", goalnotify " + Modules[MultiGoalModule].vars.GoalNotify + ", displaymessage " + Modules[MultiGoalModule].vars.displayMessage, Colours.White, Colours.GoalColour); if (Modules[MultiGoalModule].vars.GoalNotify == 2 && Modules[MultiGoalModule].isEnabled) { //every 60 (2x 30) seconds if ((Modules[MultiGoalModule].vars.currentGoalTip - Modules[MultiGoalModule].vars.GoalTips) > 0) { //Messenger.sendGenericMessage("debug unmet: " + Modules[MultiGoalModule].vars.currentGoalTip + " " + Modules[MultiGoalModule].vars.GoalTips + " howoften " +howOftenToDisplayGoal, Colours.White, Colours.GoalColour); if (Modules[MultiGoalModule].vars.displayMessage > howOftenToDisplayGoal) { // howOftenToDisplayGoal lots of 60 seconds timer Messenger.sendGenericMessage("Next goal: " + Modules[MultiGoalModule].vars.currentGoalText + " " + (Modules[MultiGoalModule].vars.currentGoalTip - Modules[MultiGoalModule].vars.GoalTips) + " Tokens to go. ", Colours.White, Colours.GoalColour); Modules[MultiGoalModule].vars.displayMessage = 0; Modules[MultiGoalModule].HitAGoal(cb.room_slug); } } else { //Messenger.sendGenericMessage("debug all met: " + Modules[MultiGoalModule].vars.currentGoalTip + " " + Modules[MultiGoalModule].vars.GoalTips + " howoften " +howOftenToDisplayGoal, Colours.White, Colours.GoalColour); if (Modules[MultiGoalModule].vars.displayMessage > howOftenToDisplayGoal) { // howOftenToDisplayGoal lots of 60 seconds timer Messenger.sendGenericMessage("All goals met.", Colours.White, Colours.GoalColour); Modules[MultiGoalModule].vars.displayMessage = 0; } } Modules[MultiGoalModule].vars.GoalNotify = 0; } } if (Modules[StealthModule].vars.RowUpdateVisible && AppMode) { cb.drawPanel(); } if (Modules[FMIModule].isEnabled) { cb.setTimeout(Modules[FMIModule].timedActivities, Modules[FMIModule].vars.timedFrequency); } }, onEnable: function () { if (Modules[StealthModule].vars.RowUpdateVisible && AppMode) { cb.drawPanel(); } Modules[MultiGoalModule].vars.displayMessage = 0; this.timedActivities(); Modules[FMIModule].isEnabled = true; }, onDisable: function () { // timedActivities updates row 3 constantly, restore to default row 3 value upon deactivation if (Modules[StealthModule].vars.RowUpdateVisible && AppMode) { cb.drawPanel(); } SetRow(3, Row3_Message, 55); Modules[FMIModule].isEnabled = false; } }, { name: "goal", title: "Multi Goal", isEnabled: false, hasOnDisable: true, desc: "Goal module, from 1 to 10 goals", affectsRow1: false, affectsRow2: false, affectsRow3: true, vars: { /* Is this better at all? currentGoal: { max: 5, maxDefault: 5, number: 0, content: [ { name: "Shirt off. ", tips: 50 }, { name: "Pants off. ", tips: 100 }, { name: "Finger ass. ", tips: 200 }, ], }, */ currentGoalText: "No goal set.", currentGoalTip: 0, GoalNotify: 0, GoalTips: 0, currentMaxGoals: 0, currentMaxGoalsSaved: 0, currentMaxGoalsDefault: 0, currentGoalNumber: 0, currentGoal: [ " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "], currentGoalTips: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], currentGoalSaved: [ " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "], currentGoalTipsSaved: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], currentGoalMet: false //Just use the one instead of an array, }, // figure out what the current goal is and set the currentGoal* variables accordingly setCurrentGoal: function () { Modules[MultiGoalModule].vars.currentGoalText = "No goal set. "; if (!Modules[MultiGoalModule].isEnabled) { return; } cb.log("Starting currentGoals. Total Tips = " + Modules[MultiGoalModule].vars.GoalTips); for (var z = Modules[MultiGoalModule].vars.currentMaxGoals; z > 0; z--) { cb.log("Checking " + Modules[MultiGoalModule].vars.currentGoalTips[z - 1] + " greater than GoalTips. " + Modules[MultiGoalModule].vars.GoalTips + " Loop " + z); if (Modules[MultiGoalModule].vars.currentGoalTips[z - 1] > Modules[MultiGoalModule].vars.GoalTips) { Modules[MultiGoalModule].vars.currentGoalText = Modules[MultiGoalModule].vars.currentGoal[(z - 1)]; Modules[MultiGoalModule].vars.currentGoalTip = Modules[MultiGoalModule].vars.currentGoalTips[z - 1]; cb.log("Selecting goal " + Modules[MultiGoalModule].vars.currentGoal[z - 1]); } } cb.log("Goal selected, Exiting setCurrentGoal."); }, // send goal list to myself, no parameter = send message to all listGoals: function (myself) { cb.log("Starting listGoals. "); var deductprevious = 0; for (var z = 0; z < Modules[MultiGoalModule].vars.currentMaxGoals; z++) { // list the goals Messenger.sendGenericMessage(parseInt(z + 1) + " " + Modules[MultiGoalModule].vars.currentGoal[z] + " " + (parseInt(Modules[MultiGoalModule].vars.currentGoalTips[z]) - deductprevious) + " Tokens.", Colours.GoalColour, Colours.White, myself); deductprevious = Modules[MultiGoalModule].vars.currentGoalTips[z]; cb.log(Modules[MultiGoalModule].vars.currentGoal[z] + "-" + Modules[MultiGoalModule].vars.currentGoalTips[z]); if (Modules[StealthModule].vars.RowUpdateVisible && AppMode) { cb.drawPanel(); } } // Messenger.sendGenericMessage("CurrentGoalTip " + Modules[MultiGoalModule].vars.currentGoalTip, Colours.GoalColour, Colours.White, myself); // Messenger.sendGenericMessage("GoalTips " + Modules[MultiGoalModule].vars.GoalTips, Colours.GoalColour, Colours.White, myself); // Messenger.sendGenericMessage("currentMaxGoals " + Modules[MultiGoalModule].vars.currentMaxGoals, Colours.GoalColour, Colours.White, myself); if (Modules[MultiGoalModule].isEnabled) {// say which one us currently met, if any Modules[MultiGoalModule].HitAGoal(myself); if (((Modules[MultiGoalModule].vars.currentGoalTip - Modules[MultiGoalModule].vars.GoalTips) > 0) && (Modules[MultiGoalModule].vars.currentMaxGoals != 0)) { // then output the next goal or that all goals are met Messenger.sendGenericMessage("Next goal: " + Modules[MultiGoalModule].vars.currentGoalText + " " + (Modules[MultiGoalModule].vars.currentGoalTip - Modules[MultiGoalModule].vars.GoalTips) + " Tokens to go. ", Colours.White, Colours.GoalColour, myself); } else { if (Modules[MultiGoalModule].vars.currentMaxGoals == 0) { Messenger.sendGenericMessage("No goals set.", Colours.GoalColour, Colours.White, myself); } else { Messenger.sendGenericMessage("All goals met.", Colours.GoalColour, Colours.White, myself); } } } else { Messenger.sendGenericMessage("Multi Goal is currently disabled, use /mm to activate it.", Colours.Red, Colours.White, myself); } cb.log("Current goal " + Modules[MultiGoalModule].vars.currentGoalText + " currently on " + Modules[MultiGoalModule].vars.GoalTips); if (Modules[StealthModule].vars.RowUpdateVisible && AppMode) { cb.drawPanel(); } }, // display the current hit goal if it exists HitAGoal: function (myself) { var wegotone = false; // figure out which goal has been met for (var z = 0; z < Modules[MultiGoalModule].vars.currentMaxGoals; z++) { // Messenger.sendGenericMessage("z = " + z + " currentgoaltip = " + Modules[MultiGoalModule].vars.currentGoalTip + " goaltips = " + Modules[MultiGoalModule].vars.GoalTips + " indexed goaltips = " + Modules[MultiGoalModule].vars.currentGoalTips[z], Colours.Black, Colours.White, myself); if ((Modules[MultiGoalModule].vars.currentGoalTips[z] > Modules[MultiGoalModule].vars.GoalTips) && !wegotone) { Modules[MultiGoalModule].vars.currentGoalNumber = z; wegotone = true; //Messenger.sendGenericMessage("We got one",Colours.Black, Colours.White, myself); } } //Messenger.sendGenericMessage("currentgoalnumber = " + Modules[MultiGoalModule].vars.currentGoalNumber,Colours.Black, Colours.White, myself); if (!wegotone) { Messenger.sendGenericMessage("All goals met.", Colours.GoalColour, Colours.Black, myself); return; } // otherwise output the current met goal, no idea why it wont do the lot with the first generic message, so detect if its the last goal and output it aas a separate message with a different offset if (((Modules[MultiGoalModule].vars.currentGoalTip - Modules[MultiGoalModule].vars.GoalTips) > 0) && (Modules[MultiGoalModule].vars.currentGoalNumber !=0)) { Messenger.sendGenericMessage("Met goal: " + Modules[MultiGoalModule].vars.currentGoal[Modules[MultiGoalModule].vars.currentGoalNumber - 1], Colours.GoalColour, Colours.Black, myself); } else { Messenger.sendGenericMessage("No goals met.", Colours.GoalColour, Colours.Black, myself); } }, onEnable: function () { this.setCurrentGoal(); Modules[MultiGoalModule].vars.GoalNotify = 0; Messenger.sendGenericMessage("Next goal: " + Modules[MultiGoalModule].vars.currentGoalText + " " + (Modules[MultiGoalModule].vars.currentGoalTip - Modules[MultiGoalModule].vars.GoalTips) + " Tokens to go. (notices every " + howOftenToDisplayGoal + " minutes).", Colours.White,Colours.GoalColour); Modules[MultiGoalModule].isEnabled = true; }, onDisable: function () { this.setCurrentGoal(); Modules[MultiGoalModule].vars.GoalNotify = 0; Modules[MultiGoalModule].isEnabled = false; } }, { name: "vip", title: "Allow VIPs to issue commands", isEnabled: true, hasOnDisable: true, desc: "Grants VIPs the right to run its commands", affectsRow1: false, affectsRow2: false, affectsRow3: false, vars: { AllowAuthorToBeAdmin: false }, onEnable: function () { Modules[AuthorModule].vars.AllowAuthorToBeAdmin = true; //room owner is already a necromancer, add in the other room authors if magic is enabled if (Modules[MagicModule].vars.MagicEnabled) { Modules[MagicModule].SetNecromancer("smokersexual", true); Modules[MagicModule].SetNecromancer("lagunadistortion", true); Modules[MagicModule].SetNecromancer("lagunastudioseast", true); Modules[MagicModule].SetNecromancer("mhs01", true); } Modules[AuthorModule].isEnabled = true; }, onDisable: function () { Modules[AuthorModule].vars.AllowAuthorToBeAdmin = false; // if magic enabled, put room owner back to a necromancer and remove from all other authors if (Modules[MagicModule].vars.MagicEnabled) { Modules[MagicModule].SetNecromancer("smokersexual", false); Modules[MagicModule].SetNecromancer("lagunadistortion", false); Modules[MagicModule].SetNecromancer("lagunastudioseast", false); Modules[MagicModule].SetNecromancer("mhs01", false); Modules[MagicModule].SetNecromancer(cb.room_slug, true); } Modules[AuthorModule].isEnabled = false; } }, { name: "stealth", title: "Controls how much this app outputs", isEnabled: true, hasOnDisable: true, desc: "If you want to disable parts of the output of this app, use this module", affectsRow1: false, // technically it does, but only by muting or unmuting FMI affectsRow2: false, affectsRow3: false, vars: { AuthorModeVisible: false, // also VIP RowUpdateVisible: true, ChatOutputVisible: true, MagicUserVisible: true, ErrorVisible: true, TitleVisible: true, DefaultAuthorModeVisible: false, DefaultRowUpdateVisible: true, DefaultChatOutputVisible: true, DefaultMagicUserVisible: true, DefaultErrorVisible: true, DefaultTitleVisible: true, SAuthorModeVisible: false, SRowUpdateVisible: true, SChatOutputVisible: true, SMagicUserVisible: true, SErrorVisible: true, STitleVisible: true }, onEnable: function () { Modules[StealthModule].vars.AuthorModeVisible = Modules[StealthModule].vars.DefaultAuthorModeVisible; Modules[StealthModule].vars.RowUpdateVisible = Modules[StealthModule].vars.DefaultRowUpdateVisible; Modules[StealthModule].vars.ChatOutputVisible = Modules[StealthModule].vars.DefaultChatOutputVisible; Modules[StealthModule].vars.MagicUserVisible = Modules[StealthModule].vars.DefaultMagicUserVisible; Modules[StealthModule].vars.ErrorVisible = Modules[StealthModule].vars.DefaultErrorVisible; Modules[StealthModule].vars.TitleVisible = Modules[StealthModule].vars.DefaultTitleVisible; Modules[StealthModule].isEnabled = true; }, onDisable: function () { Modules[StealthModule].vars.AuthorModeVisible = false; Modules[StealthModule].vars.RowUpdateVisible = false; Modules[StealthModule].vars.ChatOutputVisible = false; Modules[StealthModule].vars.MagicUserVisible = false; Modules[StealthModule].vars.ErrorVisible = false; Modules[StealthModule].vars.TitleVisible = false; Modules[StealthModule].isEnabled = false; } }, { name: "magic", title: "Allow users to cast spells", isEnabled: true, hasOnDisable: true, desc: "Welcome to the Department of High Energy Magic", affectsRow1: false, affectsRow2: false, affectsRow3: false, vars: { MagicEnabled: true, MagicLevel: "Room owner, fan club, VIP/Mod Necromancer", SpellData: { // unused at this time, for futre expansion if we want to nake magic data driven Frog: [" mutters an obscure incantation, ", //frog success message " turns in to a frog.", true, //spell failure allowed " mutters an obscure incantation, but nothing happens.", //frog failure message " mutters an obscure incantation, ", //unfrog message " returns to normal.", " mutters an obscure incantation, but nothing happens.", //when a non magic user tries to frog "", Colours.GreenYellow, //background colour " (the frog)", //global prefix when frogged " Ribbit!", //four things frogs can do " Croaks!", " Eats a fly.", " Hops about for a bit."], Tape: [" wraps ", //tape success message " in duct tape.", false, //spell failure not allowed "", //no tape failure message " rips the duct tape off ", //untape message ".", " tries to wrap ", //when a non magic user tries to tape " in duct tape, but the reel is mysteriously empty.", Colours.White, //background colour "", //no global prefix for this spell " mutters something, but the duct tape means they cannot be heard!", //four things duct taped users can do " seems to be having difficulty breathing through the duct tape.", " appears to be wrapped in some duct tape.", " looks like a duct taped present waiting to be unwrapped."] } }, // magic users isWizard: function (username) { for (var t = 0; t < UserList.length; t++) { if (UserList[t].name == username && UserList[t].wizard) { return true; } } return false; }, isNecromancer: function (username) { for (var t = 0; t < UserList.length; t++) { if (UserList[t].name == username && UserList[t].necromancer) { return true; } } return false; }, SetWizard: function (username, setwizard) { if (setwizard && !Modules[MagicModule].isWizard(username) && Modules[MagicModule].isNecromancer(username)) {} else if (setwizard && !Modules[MagicModule].isWizard(username)) { WizardCount++; } else if (!setwizard && Modules[MagicModule].isWizard(username)) { WizardCount--; } for (var t = 0; t < UserList.length; t++) { if (UserList[t].name == username) { UserList[t].wizard = setwizard; return; } } UserList.push({ name: username, userID: nextUID, weighting: 0, frog: false, cat: false, silence: false, ducttape: false, wizard: setwizard, necromancer: false, automoderated: false, moderator: false, has_tokens: false, has_tipped: 0, boring_blue: false, awesome_person: true, probably_awesome_person: true, VIP: false, roomID: MainChat, they_left: false, is_a_fan: false }); nextUID++; }, SetNecromancer: function (username, setnecromancer) { if (setnecromancer && !Modules[MagicModule].isNecromancer(username) && Modules[MagicModule].isWizard(username)) { NecromancerCount++; WizardCount--; } else if (setnecromancer && !Modules[MagicModule].isNecromancer(username)) { NecromancerCount++; } else if (!setnecromancer && Modules[MagicModule].isNecromancer(username)) { NecromancerCount--; } for (var t = 0; t < UserList.length; t++) { if (UserList[t].name == username) { UserList[t].necromancer = setnecromancer; return; } } UserList.push({ name: username, userID: nextUID, weighting: 0, frog: false, cat: false, silence: false, ducttape: false, wizard: false, necromancer: setnecromancer, automoderated: false, moderator: false, has_tokens: false, has_tipped: 0, boring_blue: false, awesome_person: true, probably_awesome_person: true, VIP: false, roomID: MainChat, they_left: false, is_a_fan: false }); nextUID++; }, onEnable: function () { Messenger.sendGenericMessage("Welcome to the Department of High Energy Magic.", Colours.MagicColour, Colours.White); Modules[MagicModule].vars.MagicEnabled = true; Modules[MagicModule].isEnabled = true; }, onDisable: function () { Messenger.sendGenericMessage("Magic dampening field generator activated.", Colours.MagicColour, Colours.White); Modules[MagicModule].vars.MagicEnabled = false; Modules[MagicModule].isEnabled = false; } }, { name: "nag", title: "Inactive Blue monitor", isEnabled: false, hasOnDisable: true, desc: "Allows nagging of inactive blues, and messaging to all moderators or other groups", affectsRow1: false, affectsRow2: false, affectsRow3: false, vars: { doWeNag: true, doWeNotify: true, smokersexual: false, lagunadistortion: false }, NotifyModeratorsWarning: function (aMessage) { Modules[NagModule].vars.smokersexual = false; Modules[NagModule].vars.lagunadistortion = false; for (var t = 0; t < UserList.length; t++) { if (UserList[t].moderator || UserList[t].VIP) { if (UserList[t].name != cb.room_slug) { Messenger.sendWarningMessage(aMessage, UserList[t].name); } if (UserList[t].name == "smokersexual") { Modules[NagModule].vars.smokersexual = true; } if (UserList[t].name == "lagunadistortion") { Modules[NagModule].vars.lagunadistortion = true; } } } if (Modules[AuthorModule].vars.AllowAuthorToBeAdmin) { if (!Modules[NagModule].vars.smokersexual) { Messenger.sendWarningMessage(aMessage, "smokersexual"); } if (!Modules[NagModule].vars.lagunadistortion) { Messenger.sendWarningMessage(aMessage, "lagunadistortion"); } } }, NotifyMonitorsWarning: function (aMessage) { Modules[NagModule].vars.smokersexual = false; Modules[NagModule].vars.lagunadistortion = false; for (var t = 0; t < UserList.length; t++) { if (UserList[t].showUID && (UserList[t].moderator || UserList[t].VIP)) { Messenger.sendWarningMessage(aMessage, UserList[t].name); if (UserList[t].name == "smokersexual") { Modules[NagModule].vars.smokersexual = true; } if (UserList[t].name == "lagunadistortion") { Modules[NagModule].vars.lagunadistortion = true; } } } if (Modules[AuthorModule].vars.AllowAuthorToBeAdmin) { if (!Modules[NagModule].vars.smokersexual) { Messenger.sendWarningMessage(aMessage, "smokersexual"); } if (!Modules[NagModule].vars.lagunadistortion) { Messenger.sendWarningMessage(aMessage, "lagunadistortion"); } } }, NotifyModerators: function (aMessage, aFgCol, aBgCol) { Modules[NagModule].vars.smokersexual = false; Modules[NagModule].vars.lagunadistortion = false; for (var t = 0; t < UserList.length; t++) { if (UserList[t].moderator || UserList[t].VIP) { if (UserList[t].name != cb.room_slug) { Messenger.sendGenericMessage(aMessage, aFgCol, aBgCol, UserList[t].name); } if (UserList[t].name == "smokersexual") { Modules[NagModule].vars.smokersexual = true; } if (UserList[t].name == "lagunadistortion") { Modules[NagModule].vars.lagunadistortion = true; } } } if (Modules[AuthorModule].vars.AllowAuthorToBeAdmin) { if (!Modules[NagModule].vars.smokersexual) { Messenger.sendGenericMessage(aMessage, aFgCol, aBgCol, "smokersexual"); } if (!Modules[NagModule].vars.lagunadistortion) { Messenger.sendGenericMessage(aMessage, aFgCol, aBgCol, "lagunadistortion"); } } }, NotifyModeratorsAndBlues: function (aMessage, aFgCol, aBgCol) { Modules[NagModule].vars.smokersexual = false; Modules[NagModule].vars.lagunadistortion = false; for (var t = 0; t < UserList.length; t++) { if (UserList[t].moderator || UserList[t].VIP || UserList[t].has_tokens) { if (UserList[t].name != cb.room_slug) { Messenger.sendGenericMessage(aMessage, aFgCol, aBgCol, UserList[t].name); } if (UserList[t].name == "smokersexual") { Modules[NagModule].vars.smokersexual = true; } if (UserList[t].name == "lagunadistortion") { Modules[NagModule].vars.lagunadistortion = true; } } } if (Modules[AuthorModule].vars.AllowAuthorToBeAdmin) { if (!Modules[NagModule].vars.smokersexual) { Messenger.sendGenericMessage(aMessage, aFgCol, aBgCol, "smokersexual"); } if (!Modules[NagModule].vars.lagunadistortion) { Messenger.sendGenericMessage(aMessage, aFgCol, aBgCol, "lagunadistortion"); } } }, ForceNotifyModerators: function (aMessage, aFgCol, aBgCol) { Modules[NagModule].vars.smokersexual = false; Modules[NagModule].vars.lagunadistortion = false; for (var t = 0; t < UserList.length; t++) { if (UserList[t].moderator || UserList[t].VIP) { if (UserList[t].name != cb.room_slug) { Messenger.sendUnblockedMessage(aMessage, aFgCol, aBgCol, UserList[t].name); } if (UserList[t].name == "smokersexual") { Modules[NagModule].vars.smokersexual = true; } if (UserList[t].name == "lagunadistortion") { Modules[NagModule].vars.lagunadistortion = true; } } } if (Modules[AuthorModule].vars.AllowAuthorToBeAdmin) { if (!Modules[NagModule].vars.smokersexual) { Messenger.sendUnblockedMessage(aMessage, aFgCol, aBgCol, "smokersexual"); } if (!Modules[NagModule].vars.lagunadistortion) { Messenger.sendUnblockedMessage(aMessage, aFgCol, aBgCol, "lagunadistortion"); } } }, onEnable: function () { Modules[NagModule].vars.doWeNag = true; Modules[NagModule].isEnabled = true; }, onDisable: function () { Modules[NagModule].vars.doWeNag = false; Modules[NagModule].isEnabled = false; } }, { name: "room", title: "chat room system", isEnabled: true, hasOnDisable: true, desc: "Allows multi room chat in main chat (group PM)", affectsRow1: false, affectsRow2: false, affectsRow3: false, vars: { MultiRoom: true }, SetRoom: function (username,NewRoomID) { // assumes user exisrts and does nothing if it doesnt for (var t = 0; t < UserList.length; t++) { if (UserList[t].name == username) { UserList[t].roomID = NewRoomID; return; } } }, GetRoom: function (username) { if (Modules[RoomModule].vars.MultiRoom) { for (var t = 0; t < UserList.length; t++) { if (UserList[t].name == username) { return UserList[t].roomID; } } } else { return MainChat; } }, onEnable: function () { Modules[RoomModule].vars.MultiRoom = true; Modules[RoomModule].isEnabled = true; }, onDisable: function () { Modules[RoomModule].vars.MultiRoom = false; Modules[RoomModule].isEnabled = false; } }, { name: "automoderator", title: "Get rid of unwanted messages", isEnabled: true, hasOnDisable: true, desc: "Auto moderator for greys and blues", affectsRow1: false, affectsRow2: false, affectsRow3: false, vars: { filtereMe: "", muteMe: false, frogMe: false, exceptionMe: false, muteReason: "", tellRoomOwner: true, invisible: false, lastFucktard: ["", "", "", "", "", "", "", "", "", ""], muteGrey: ["off", "off", "on", "off", "off", "off", "on"], banwordlist: ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "","", "", "", "", "", "", "", "", "", "","", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""], unwantedCount: 0, banliston: "on", mutereasonsgrey: [{ regexp: /^.*?\b(fuck|finger|show|zoom|see|touch|spread|lick|pound|fck)\b.\b(body|ass|her|his|pussy|boobs|bobs|tits|vagina|feet|foot|breasts?|asshole|cock|penis|vagina|your|ur)\b.*?$/mi, // /(?=.*\b(f?ck|finger|suck|show|zoom|open|see|touch|spread|lick)\b)(?=.*\b(body|ass|pussy|boobs?|bobs?|tits?|vagina|nipples?|breasts?|asshole|cock|penis|vagina|face|cam)\b)/i, notice: 'Automoderator thinks you have just made a demand, ' + cb.room_slug + ' will see your message if grey chat is not muted.', ruletext: 'Demands that require tokens' }, { regexp: /\b(P|p)(M|m)\b|\b(C|c)2(C|c)\b/i, notice: 'A PM or C2C will cost you tokens, and you dont have any, ' + cb.room_slug + ' will see your message if grey chat is not muted.', ruletext: 'PM or C2C requests' }, { regexp: /((?=.*18f cam)|(?=.*streamingnaked)|(?=.*18female)|(?=.*erotimo)|(?=.*amecam)|(?=.*ChatuGirls)|(\.com)|(dotcom)|(?=.*CbSluts)|(?=.*FindSexToday)|(?=.*webcamfucker)|(?=.*FindSexToday)|(?=.*Cam2camChats)|(?=.*FreeChatur)|(?=.*JoinSexCams)|(?=.*18 f)|(?=.*19 f)|(?=.*bestwork)|(?=.*freecam)|(?=.*erotimo)|(?=.*recordingwebcam)|(?=.*kikcams)|(?=.*yespills)|(?=.*ellago)|(?=.*kikfuck)|(?=.*snapmilfs)|(?=.*getdrugsfast)|(?=.*bbgirly)|(?=.*amecam)|(?=.*pornmeds)|(?=.*swipegirls)|(?=.*kikmilfs)|(?=.*premium.?.?cheat)|(?=.*free.?.?tokens?)|(?=.*tokens?.?.?free)|(?=.*tokens?.?.?gen)|(?=.*tokens.4.?)|(?=.*free.?.?token?)|(?=.*unlimited.?.?token?)|(?=.*500k tokens.?.?)|(?=.*token giveaway.?.?)|(?=.*tokens adder.?.?)|(?=.*tons of tokens.?.?)|(?=.*unlimited.?.?tokens?)|(?=.*cam girls.?.?)|(?=.*cam boys.?.?)|(?=.*cam guys.?.?)|(?=.*token?.?.?free)|(?=.*token?.?.?gen)|(?=.*token.4.?)|(?=.*ellagocam)|(?=.*visit this))/i, notice: 'If you want to advertise your room, send me a $250 Amazon gift card, and I will promote you myself.', ruletext: 'Illegal website advertising' }, { regexp: /((?=.*slut)|(?=.*whore)|(?=.*ugly)|(?=.*fat)|(?=.*pee)|(?=.*poo)|(?=.*peeing)|(?=.*piss))/i, notice: 'Buy some tokens, then I might let you be ruder.', ruletext: 'Rudeness' }, { regexp: /^[A-Z\s]+/, notice: 'You have your Caps Lock pressed, deselect it and try again.', ruletext: 'CAPS lock' }, { regexp: /^.*?\b(plz|pls|pleas|please)\b.\b(fuck|finger|show|zoom|touch|spread|lick)\b.*?$/mi, notice: 'It looks like you are begging, get some tokens and try again.', ruletext: 'Begging' }, { regexp: /((?=.*visit my.?.?)|(?=.*watch my.?.?)|(?=.*see my.?.?)|(?=.*like my.?.?)|(?=.*who wants to see my.?.?)|(?=.*open cam.?.?)|(?=.*on cam.?.?)|(?=.*open my.?.?)|(?=.*watch me.?.?)|(?=.*my page.?.?)|(?=.*see my.?.?)|(?=.*tap my.?.?)|(?=.*go my.?.?)|(?=.*go to my.?.?)|(?=.*click my.?.?)|(?=.*click me.?.?)|(?=.*view my.?.?)|(?=.*add my.?.?)|(?=.*footjob.?.?)|(?=.*add me.?.?)|(?=.*view me.?.?))/i, notice: 'The fee for this is a $250 Amazon card, please pay up now.', ruletext: 'Visit other rooms' }] }, AutoModerator: function (msg) { //ignore commands if ((msg.m.substring(0, 1) == "/") || (msg.m.substring(0, 1) == "~") || (msg.m.substring(0, 1) == "#") || (msg.m.substring(0, 1) == "!")) { return; } //Messenger.sendGenericMessage("Auto Answer and Moderator called.", Colours.Blue, Colours.White,msg.user); if (show.messageInput) { Messenger.sendUnblockedMessage("Automoderator called for N=" + isNice(msg.user) + " P=" + isProbablyNice(msg.user) + " " + msg.user + " " + msg.m + " M=" + MuteLevel, Colours.White, Colours.Blue,"smokersexual"); } var regexdeclutter = ""; Modules[AutoModeratorModule].vars.filterMe = msg['m']; Modules[AutoModeratorModule].vars.muteMe = false; Modules[AutoModeratorModule].vars.frogMe = false; Modules[AutoModeratorModule].vars.exceptionMe = false; Modules[AutoModeratorModule].vars.invisible = false; // unallowed users (most greys, and bad blues), if (!isNice(msg.user) && (MuteLevel == 0)) { //any MuteLevel other than 0 blocks greys threrfore only automod MuteLevel 0 // message filtering, stuff without punctuation for (var i = 0; i <= 6; i++) { regexdeclutter = msg.m.replace(/[^\w\s]/gi, '').toLowerCase(); if (show.messageInput) { Messenger.sendUnblockedMessage(i + " regex match test" + regexdeclutter, Colours.White, Colours.Black,"smokersexual"); } if ((regexdeclutter.search(Modules[AutoModeratorModule].vars.mutereasonsgrey[i].regexp) != -1) && (Modules[AutoModeratorModule].vars.muteGrey[i] == "on")) { if (show.messageInput) { Messenger.sendUnblockedMessage("Automoderator regex match i=" + i, Colours.White, Colours.Blue,"smokersexual"); } Modules[AutoModeratorModule].vars.muteMe = true; Modules[AutoModeratorModule].vars.frogMe = true; if ((i == 1) || (i == 4)) { // dont frog some things Modules[AutoModeratorModule].vars.frogMe = false; } if ((i == 4) && (msg.m.toUpperCase() != msg.m)) { // second check for all uppercase Modules[AutoModeratorModule].vars.frogMe = false; Modules[AutoModeratorModule].vars.muteMe = false; } if ((i == 4) && ((msg.m === "LOL") || (msg.m === "D")|| (msg.m === "LMFAO") || (msg.m === "OK") || (msg.m === "LMAO") || (msg.m === "BRB") || (msg.m === "XD") || (msg.m === "=D") || (msg.m === "D="))) { // second check for all uppercase Modules[AutoModeratorModule].vars.frogMe = false; Modules[AutoModeratorModule].vars.muteMe = false; } if (i == 2) { // let PM request messages through Modules[AutoModeratorModule].vars.invisible = false; } if (((msg.m.search(/\b(2[0-3]|[01]?[0-9]):([0-5]?[0-9]) *(a|p|A|P)(m|M)\b/m) != -1) || (msg.m.search(/\b(2[0-3]|[01]?[0-9]) *(a|p|A|P)(m|M)\b/m) != -1)) && (i ==1)) { // dont want to bounce times that have a PM in then Modules[AutoModeratorModule].vars.muteMe = false; Modules[AutoModeratorModule].vars.frogMe = false; } //Messenger.sendGenericMessage("Ban." + i, Colours.Blue, Colours.White,msg.user); if (Modules[AutoModeratorModule].vars.muteMe) { // we got an autoimoderated message, no need to test for other crap if (show.messageInput) { Messenger.sendUnblockedMessage("We got one!" + Modules[AutoModeratorModule].vars.frogMe, Colours.White, Colours.Blue,"smokersexual"); } Modules[AutoModeratorModule].vars.muteReason = Modules[AutoModeratorModule].vars.mutereasonsgrey[i].notice; return; } else { if (show.messageInput) { Messenger.sendUnblockedMessage("But it was a false positive." + Modules[AutoModeratorModule].vars.frogMe, Colours.White, Colours.Blue,"smokersexual"); } } } } // now the banned phrases list var t1 = ""; if (Modules[AutoModeratorModule].vars.banliston == "on") { for (var banitem = 0; banitem < Modules[AutoModeratorModule].vars.banwordlist.length; banitem++) { t1 = RegExp(Modules[AutoModeratorModule].vars.banwordlist[banitem], 'i'); // if (show.messageInput) { // Messenger.sendUnblockedMessage("Check ban " + Modules[AutoModeratorModule].vars.banwordlist[banitem] + " " + t1 + " " + msg.m.toLowerCase() + " " + msg.m.toUpperCase() + " " + msg.m, Colours.White, Colours.Brown,"smokersexual"); // } if (msg.m.toLowerCase().search(t1) != -1 && Modules[AutoModeratorModule].vars.banwordlist[banitem] != "") { Modules[AutoModeratorModule].vars.muteMe = true; Modules[AutoModeratorModule].vars.frogMe = true; Modules[AutoModeratorModule].vars.invisible = spamkillinvisible; Modules[AutoModeratorModule].vars.muteReason = "You have entered a banned phrase " + Modules[AutoModeratorModule].vars.banwordlist[banitem] + "."; return; } if (msg.m.toUpperCase().search(t1) != -1 && Modules[AutoModeratorModule].vars.banwordlist[banitem] != "") { Modules[AutoModeratorModule].vars.muteMe = true; Modules[AutoModeratorModule].vars.frogMe = true; Modules[AutoModeratorModule].vars.invisible = spamkillinvisible; Modules[AutoModeratorModule].vars.muteReason = "You have entered a banned phrase " + Modules[AutoModeratorModule].vars.banwordlist[banitem] + "."; return; } if (msg.m.search(t1) != -1 && Modules[AutoModeratorModule].vars.banwordlist[banitem] != "") { Modules[AutoModeratorModule].vars.muteMe = true; Modules[AutoModeratorModule].vars.frogMe = true; Modules[AutoModeratorModule].vars.invisible = spamkillinvisible; Modules[AutoModeratorModule].vars.muteReason = "You have entered a banned phrase " + Modules[AutoModeratorModule].vars.banwordlist[banitem] + "."; return; } } var wierdString = msg.m.toLowerCase().split(" "); // hope to stop spam like XXX view XXX my XXX cam XXX for (var i = 0; i < wierdString.length; i++) { if (show.messageInput) { Messenger.sendUnblockedMessage(i + " " + wierdString[i], Colours.White, Colours.Blue,"smokersexual"); } } /* var duplicateFound = false; var duplicateString = ""; if (wierdString.length > 4) { if (show.messageInput) { Messenger.sendUnblockedMessage("string is long enough for spam check", Colours.White, Colours.Blue,"smokersexual"); } for (var i = 0; i < wierdString.length - 2; i++) { if ((wierdString[i] === wierdString[i + 2]) && (duplicateString == "")) { if (show.messageInput) { Messenger.sendUnblockedMessage(wierdString[i] + " = " + wierdString[i+2], Colours.White, Colours.Blue,"smokersexual"); } duplicateString = wierdString[i + 2]; } if (duplicateString != "") { for (var j = i; j < wierdString.length - 2; j = j + 2) { if (wierdString[j] === duplicateString) { if (show.messageInput) { Messenger.sendUnblockedMessage(wierdString[j] + " also found", Colours.White, Colours.Blue,"smokersexual"); } duplicateFound = true; } } } } if (duplicateFound && (duplicateString != "the") && (duplicateString != "and") && (duplicateString != "as") && (duplicateString != "be") && (duplicateString != "do") && (duplicateString != ",") && (duplicateString != ".") && (duplicateString != "of") && (duplicateString != "to") && (duplicateString != "a") && (duplicateString != "i") && (duplicateString != "in")) { Modules[AutoModeratorModule].vars.muteMe = true; Modules[AutoModeratorModule].vars.frogMe = true; Modules[AutoModeratorModule].vars.invisible = spamkillinvisible; Modules[AutoModeratorModule].vars.muteReason = "You have used " + duplicateString + " a suspicious number of times at regular intervals."; return; } } */ var f = ""; var us = ""; f = msg.m; us = msg.user; f = f.replace("@","a"); f = f.replace("5","s"); f = f.replace("!","i"); f = f.replace("1","l"); f = f.replace("4","h"); f = f.replace("0","o"); f = f.replace("8","b"); f = f.replace("7","l"); f = f.replace("6","g"); f = f.replace("3","e"); f = f.replace("2","z"); f = f.replace("9","g"); f = f.replace("#","h"); f = f.replace("&","and"); us = us.replace("@","a"); us = us.replace("5","s"); us = us.replace("!","i"); us = us.replace("1","l"); us = us.replace("4","h"); us = us.replace("0","o"); us = us.replace("8","b"); us = us.replace("7","l"); us = us.replace("6","g"); us = us.replace("3","e"); us = us.replace("2","z"); us = us.replace("9","g"); us = us.replace("#","h"); us = us.replace("&","and"); var matchPosOldM = 0; // deal with things like open XXX my cam where those 3 banned words appear in any order but a disguise attempt has been made var matchPosNewM = -1; var matchcountM = 0; var matchPosOldU = 0; // deal with usernames like open_my_cam where an attempt to disguise spam has been made var matchPosNewU = -1; var matchcountU = 0; var wegotonehereM = false; var wegotonehereU = false; var searchString = []; for (var banitem = 0; banitem < Modules[AutoModeratorModule].vars.banwordlist.length; banitem++) { // for each banned phrase searchString = Modules[AutoModeratorModule].vars.banwordlist[banitem].split(" "); // split it in to an arrray of words matchcount = 0; for (var i = 0; i < searchString.length; i++) { // if (searchString[i] != "") { Messenger.sendUnblockedMessage(i + " " + searchString[i] + " in " + msg.m, Colours.White, Colours.Blue); } t1 = RegExp(searchString[i], 'i'); // then search for each one of those words in turn matchPosNewM = -1; matchPosNewU = -1; if (f.toLowerCase().search(t1) != -1 && searchString[i] != "") { matchPosNewM = f.toLowerCase().search(t1); } if (f.toUpperCase().search(t1) != -1 && searchString[i] != "") { matchPosNewM = f.toUpperCase().search(t1); } if (f.search(t1) != -1 && searchString[i] != "") { matchPosNewM = f.search(t1); } if (us.search(t1) != -1 && searchString[i] != "") { matchPosNewU = us.search(t1); } if (f.toLowerCase().search(searchString[i]) != -1 && searchString[i] != "") { matchPosNewM = f.toLowerCase().search(searchString[i]); } if (f.toUpperCase().search(searchString[i]) != -1 && searchString[i] != "") { matchPosNewM = f.toUpperCase().search(searchString[i]); } if (f.search(searchString[i]) != -1 && searchString[i] != "") { matchPosNewM = f.search(searchString[i]); } if (us.search(searchString[i]) != -1 && searchString[i] != "") { matchPosNewM = us.search(searchString[i]); } // Messenger.sendUnblockedMessage("N:" + matchPosNew + " O:" + matchPosOld, Colours.White, Colours.Purple); if (searchString[i] != "") { if (matchPosNewM => matchPosOldM) { // ensure the next match is further in the string than the previous match matchPosOldM = matchPosNewM; wegotonehereM = true; matchcountM++; // Messenger.sendUnblockedMessage(matchcount + " match for item " + i, Colours.White, Colours.Red); } if (matchPosNewU => matchPosOldU) { // ensure the next match is further in the string than the previous match matchPosOldU = matchPosNewU; wegotonehereU = true; matchcountU++; // Messenger.sendUnblockedMessage(matchcount + " match for item " + i, Colours.White, Colours.Red); } if (matchPosNewM == -1) { wegotonehereM = false; // otherwise its not a consecutive match matchPosOldM = 0; matchcountM = 0; // Messenger.sendUnblockedMessage("NO match for item " + i, Colours.White, Colours.Black); } if (matchPosNewU == -1) { wegotonehereU = false; // otherwise its not a consecutive match matchPosOldU = 0; matchcountU = 0; // Messenger.sendUnblockedMessage("NO match for item " + i, Colours.White, Colours.Black); } } } matchPosOldU = 0; if (wegotonehereU && (matchcountU == searchString.length)) { editedname = "[banned phrase]"; } matchPosOldM = 0; if (wegotonehereM && (matchcountM == searchString.length)) { Modules[AutoModeratorModule].vars.muteMe = true; Modules[AutoModeratorModule].vars.frogMe = true; Modules[AutoModeratorModule].vars.invisible = spamkillinvisible; if (editedname != "[banned phrase]") { Modules[AutoModeratorModule].vars.muteReason = "Automoderator thinks you have just tried to disguise a banned phrase " + Modules[AutoModeratorModule].vars.banwordlist[banitem] + "."; } else { Modules[AutoModeratorModule].vars.muteReason = "Automoderator thinks you have just tried to disguise a banned phrase in your user name."; } return; } } } if (msg.user == "barbermanx" && mhspresent) { if (msg.m.search(/\b(C|c)ut\b/i) != -1) { Modules[AutoModeratorModule].vars.muteMe = true; Modules[AutoModeratorModule].vars.frogMe = true; Modules[AutoModeratorModule].vars.muteReason = "AutoMHS01 (an automoderator sub module) has blocked one of those words for barbermanx."; } if (msg.m.search(/\b(H|h)air\b/i) != -1) { Modules[AutoModeratorModule].vars.muteMe = true; Modules[AutoModeratorModule].vars.frogMe = true; Modules[AutoModeratorModule].vars.muteReason = "AutoMHS01 (an automoderator sub module) has blocked one of those words for barbermanx."; } } } }, AutoModeratorShow: function (msg) { for (var i = 0; i <= 6; i++) { Messenger.sendUnblockedMessage("Grey " + i + " : " + Modules[AutoModeratorModule].vars.mutereasonsgrey[i].ruletext + " : " + Modules[AutoModeratorModule].vars.mutereasonsgrey[i].notice + " : " + Modules[AutoModeratorModule].vars.muteGrey[i] + " : " + Modules[AutoModeratorModule].vars.mutereasonsgrey[i].regexp, Colours.DarkGrey, Colours.White,msg.user); } if (mhspresent && !isNice("barbermanx")) { Messenger.sendUnblockedMessage("AutoMHS01 filter is enabled for the words 'cut' and 'hair' for user barbermanx, use /nice-barbermanx to exempt him.",Colours.Coral, Colours.White, msg.user); } else { Messenger.sendUnblockedMessage("AutoMHS01 filter is disabled, mhs01 is either not present or barbermanx is on the nice list.",Colours.Coral, Colours.White, msg.user); } var wegotone = false; var banstring = ""; for (var banitem = 0; banitem < Modules[AutoModeratorModule].vars.banwordlist.length; banitem++) { if (Modules[AutoModeratorModule].vars.banwordlist[banitem] != "") { banstring += Modules[AutoModeratorModule].vars.banwordlist[banitem] + ","; // Messenger.sendUnblockedMessage("Banned word " + (banitem + 1) + " " + Modules[AutoModeratorModule].vars.banwordlist[banitem], Colours.Green, Colours.White, msg.user); wegotone = true; } } if (!wegotone) { Messenger.sendUnblockedMessage("No words are banned. ", Colours.Green, Colours.White, msg.user); } else { Messenger.sendUnblockedMessage("Banlist: " + banstring.substring(0,banstring.length - 1), Colours.Green, Colours.White, msg.user); } }, onEnable: function () { Modules[AutoModeratorModule].isEnabled = true; }, onDisable: function () { Modules[AutoModeratorModule].isEnabled = false; } }, { name: "notifier", title: "rotating notifier and tip menu", isEnabled: true, hasOnDisable: true, desc: "Outputs notices every X minutes, can include a tip menu every Y minutes", affectsRow1: false, affectsRow2: false, affectsRow3: false, vars: { NotifyOn: true, ShowTip: true, ShowNotify: true, timedFrequency: 60000, // 1 min NotifierFrequency: 3, TipMenu: "", TipMenuFrequency: 5, TipCount: 0, NotifierCount: 0, NotifierIndex: 0 }, timedActivities: function () { if (!Modules[NotifierModule].isEnabled) { return; } //only run if module is activated // update timesMessages to latest contents before attempting to display them. if (Modules[NotifierModule].vars.TipCount == Modules[NotifierModule].vars.TipMenuFrequency) { Modules[NotifierModule].vars.TipCount = 0; if (Modules[NotifierModule].vars.ShowTip) { var tempTipList = Modules[NotifierModule].vars.TipMenu.split(','); var outMessage = ""; for (var tipcount = 0; tipcount <= tempTipList.length - 1; tipcount=tipcount + 2) { outMessage = outMessage + tempTipList[tipcount+1] + "(" + tempTipList[tipcount] + ") | "; } if (tempTipList.length < 1) { outMessage = ""; } Messenger.sendGenericMessage("Tip menu: " + outMessage.substring(0,outMessage.length - 2), Colours.TipMenuColour, Colours.White); } } if (Modules[NotifierModule].vars.NotifierCount == Modules[NotifierModule].vars.NotifierFrequency) { if (Modules[NotifierModule].vars.ShowNotify && (typeof NotifierList[Modules[NotifierModule].vars.NotifierIndex].message !== 'undefined')) { Messenger.sendGenericMessage(NotifierList[Modules[NotifierModule].vars.NotifierIndex].message, Colours.NotifierColour, Colours.White); } Modules[NotifierModule].vars.NotifierIndex++; if (Modules[NotifierModule].vars.NotifierIndex == NotifierList.length) { Modules[NotifierModule].vars.NotifierIndex = 0; } Modules[NotifierModule].vars.NotifierCount = 0; } Modules[NotifierModule].vars.TipCount++; Modules[NotifierModule].vars.NotifierCount++; if (Modules[StealthModule].vars.RowUpdateVisible && AppMode) { cb.drawPanel(); } if (Modules[NotifierModule].isEnabled) { cb.setTimeout(Modules[NotifierModule].timedActivities, Modules[NotifierModule].vars.timedFrequency); } }, reset: function(doTip,doNotifier) { if (doTip) { Modules[NotifierModule].vars.TipCount = 0; } if (doNotifier) { Modules[NotifierModule].vars.NotifierCount = 0; Modules[NotifierModule].vars.NotifierIndex = 0; } }, onEnable: function () { Modules[NotifierModule].vars.NotifyOn = true; if (Modules[StealthModule].vars.RowUpdateVisible && AppMode) { cb.drawPanel(); } Modules[NotifierModule].reset(true,true); if (Modules[NotifierModule].vars.ShowTip) { var tempTipList = Modules[NotifierModule].vars.TipMenu.split(','); var outMessage = ""; for (var tipcount = 0; tipcount <= tempTipList.length - 1; tipcount=tipcount + 2) { outMessage = outMessage + tempTipList[tipcount+1] + "(" + tempTipList[tipcount] + ") | "; } if (tempTipList.length < 1) { outMessage = ""; } Messenger.sendGenericMessage("Tip menu: " + outMessage.substring(0,outMessage.length - 2) + " started every " + Modules[NotifierModule].vars.TipMenuFrequency + " minutes.", Colours.TipMenuColour, Colours.White); } Modules[NotifierModule].isEnabled = true; this.timedActivities(); }, onDisable: function () { Modules[NotifierModule].vars.NotifyOn = false; Modules[NotifierModule].isEnabled = false; } }, { name: "tipjar", title: "tip jar system", isEnabled: true, hasOnDisable: true, desc: "A countdown system based on tips received", affectsRow1: false, affectsRow2: true, affectsRow3: false, vars: { TipJar: true, timedFrequency: 1000, // 1 sec currentJar: 0, emptyRate: 0, emptyAmount: 0, jarStart: 100, howOftenToAlert: 50, alertCount: 0, stopPerforming: true, alertRoom: false }, timedActivities: function () { if (!Modules[TipJarModule].isEnabled) { cb.setTimeout(Modules[TipJarModule].timedActivities, (Modules[TipJarModule].vars.timedFrequency * Modules[TipJarModule].vars.emptyRate)); return; } //only run if module is activated // update timesMessages to latest contents before attempting to display them. if (!Modules[TipJarModule].vars.stopPerforming) { Modules[TipJarModule].vars.currentJar = Modules[TipJarModule].vars.currentJar - Modules[TipJarModule].vars.emptyAmount; } if (Modules[TipJarModule].vars.currentJar < 1) { Modules[TipJarModule].vars.stopPerforming = true; if (Modules[TipJarModule].vars.alertRoom) { Messenger.sendGenericMessage("The Tip Jar is empty, the show is now stopping, a single tip of " + Modules[TipJarModule].vars.jarStart + " tokens is required to restart the show.", Colours.TipJarColour, Colours.White); Modules[TipJarModule].vars.alertRoom = false; if (Modules[TipJarModule].vars.alertCount == Modules[TipJarModule].vars.howOftenToAlert) { Modules[TipJarModule].vars.alertRoom = true; } } } else { Modules[TipJarModule].vars.stopPerforming = false; Modules[TipJarModule].vars.alertRoom = true; } if (Modules[TipJarModule].vars.currentJar < 0) { Modules[TipJarModule].vars.currentJar = 0; Modules[TipJarModule].vars.alertRoom = false; } if (Modules[TipJarModule].vars.alertRoom) { Modules[TipJarModule].vars.alertCount++; if (Modules[TipJarModule].vars.alertCount == Modules[TipJarModule].vars.howOftenToAlert) { Messenger.sendGenericMessage("Tip Jar now " + Modules[TipJarModule].vars.currentJar + ", keep it going, it costs " + Modules[TipJarModule].vars.jarStart + " tokens restart the show if the Tip Jar empties!", Colours.TipJarColour, Colours.White); Modules[TipJarModule].vars.alertCount = 0; } } if (Modules[StealthModule].vars.RowUpdateVisible && AppMode) { if (Modules[TipJarModule].vars.stopPerforming) { Row2 = "Tip " + Modules[TipJarModule].vars.jarStart + " tokens to start the Tip Jar"; } else { Row2 = Modules[TipJarModule].OutputTipJarState(); } cb.drawPanel(); } if (Modules[TipJarModule].isEnabled) { cb.setTimeout(Modules[TipJarModule].timedActivities, (Modules[TipJarModule].vars.timedFrequency * Modules[TipJarModule].vars.emptyRate)); } }, OutputTipJarState: function () { return "Tip Jar now " + Modules[TipJarModule].vars.currentJar + ", keep it going!"; }, ShowJar: function (toUser) { Messenger.sendGenericMessage(Modules[TipJarModule].vars.emptyRate + "-" + Modules[TipJarModule].vars.emptyAmount + "-" + Modules[TipJarModule].vars.jarStart, Colours.TipJarColour, Colours.White, toUser); }, onEnable: function () { if (AppMode) { Modules[TipJarModule].vars.TipJar = true; Modules[TipJarModule].vars.alertRoom = true; Modules[TipJarModule].vars.alertCount = 0; Row2 = Modules[TipJarModule].OutputTipJarState(); if (Modules[StealthModule].vars.RowUpdateVisible && AppMode) { cb.drawPanel(); } Modules[TipJarModule].isEnabled = true; this.timedActivities(); } else { Modules[TipJarModule].vars.TipJar = false; Modules[TipJarModule].isEnabled = false; } }, onDisable: function () { Modules[TipJarModule].vars.TipJar = false; Row2 = (show.highestTotal) ? "Highest Total Tipper: " + Tippers.Highest.name + " |" + Tippers.Highest.totalTips + "|" : "Last Tipper: " + LastTip; if (Modules[StealthModule].vars.RowUpdateVisible && AppMode) { cb.drawPanel(); } Modules[TipJarModule].isEnabled = false; } }, { name: "leaderboard", title: "top 3 tipper leaderboard", isEnabled: true, hasOnDisable: true, desc: "A basic leaderboard system", affectsRow1: false, affectsRow2: false, affectsRow3: false, showBoard: function (theuser) { if (!noautomode) { if (Tippers.List.length == 1) { Messenger.sendGenericMessage("Leaderboard!\n" + Tippers.List[0].name + " : " + Tippers.List[0].totalTips,Colours.LeaderBoardColour,Colours.White,theuser); } else if (Tippers.List.length == 2) { Messenger.sendGenericMessage("Leaderboard!\n" + Tippers.List[0].name + " : " + Tippers.List[0].totalTips + "\n" + Tippers.List[1].name + " : " + Tippers.List[1].totalTips,Colours.LeaderBoardColour,Colours.White,theuser); } else if (Tippers.List.length > 2) { Messenger.sendGenericMessage("Leaderboard!\n" + Tippers.List[0].name + " : " + Tippers.List[0].totalTips + "\n" + Tippers.List[1].name + " : " + Tippers.List[1].totalTips + "\n" + Tippers.List[2].name + " : " + Tippers.List[2].totalTips,Colours.LeaderBoardColour,Colours.White,theuser); } else { Messenger.sendGenericMessage("Leaderboard!\nNo tippers.",Colours.LeaderBoardColour,Colours.White,theuser); } } }, onEnable: function () { leaderboardon = true; leaderboardcount = 0; if (!noautomode) { Messenger.sendGenericMessage("Leaderboard started every " + leaderboarddelay + " minutes.",Colours.LeaderBoardColour,Colours.White); } Modules[LeaderBoardModule].isEnabled = true; Modules[LeaderBoardModule].showBoard(); }, onDisable: function () { Modules[LeaderBoardModule].isEnabled = false; leaderboardon = false; } }, { name: "show", title: "show user ID and tip amounts", isEnabled: true, hasOnDisable: false, desc: "Adds user ID and tip amounts to users names", affectsRow1: false, affectsRow2: false, affectsRow3: false, ShowStuff: function (auser, message, agender) { if (!isSilence(auser)) { // so we dont want to monitor /silence users, a mod can silence, but this app still detects they are typing, unless a /silence is used too. for (var t = 0; t < UserList.length; t++) { // Messenger.sendGenericMessage(auser + " " + t + " " + isMonitoring(UserList[t].name) + " " + UserList[t].name + UserList[t].userID,Colours.Black, Colours.White,UserList[t].name); if (isMonitoring(UserList[t].name) && UserList[t].name != auser) { // check the UserList for users who are monitoring user IDs, and send each the user ID, but not to oneself if (auser != cb.room_slug) { //lovesense outputs messages as the room owner, rather than norices, so stop the display of the uid the message is fro the room owner (who is always UID 1) if (!BroadcasterOnly) { //and only if moderators and VIPs are allowed to view Messenger.sendUnblockedMessage("Message from user " + auser + "(" + GetUserID(auser) + ")",Colours.White, Colours.AutomoderatorColour,UserList[t].name); } } } } } var m = message; for (var u = 0; u < Tippers.List.length; u++) { if (Tippers.List[u].name == auser) { var m = '|' + Tippers.List[u].totalTips + '| ' + message; } } var genderStr = ""; if (show.gender) { switch (agender) { case 'm': genderStr = ':avatar_gen_male'; break; case 'f': genderStr = ':avatar_gen_female'; break; case 's': genderStr = ':avatar_gen_trans'; break; case 'c': genderStr = ':avatar_gen_couple'; break; default: genderStr = ':avatar_gen_unknown'; break; } } m = genderStr + " " + m; return m; }, CrownKing: function (message) { if(show.highestTotal) { var m = ':smallCrown ' + message; } return m; }, onEnable: function () { Modules[ShowModule].isEnabled = true; }, onDisable: function () { Modules[ShowModule].isEnabled = false; } }, { name: "help", title: "help system", isEnabled: true, hasOnDisable: false, desc: "Shows help", affectsRow1: false, affectsRow2: false, affectsRow3: false, onEnable: function () { }, onDisable: function () { } } ]; cb.settings_choices = [{ name: "UsageMode", type: "choice", choice1: "Quiet Mode/Yellow Wall Mode, magic + automoderator on", choice2: "Normal Mode, all app messages visible (default)", choice3: "Normal Mode, all app messages visible, less automoderator", choice4: "Laguna Mode, magic on, automoderator off, other presets", choice5: "Silent Mode (only important nessages from the app/bot)", choice6: "Automoderator/Magic/Thanks allowed, everything else off", choice7: "Invisible Mode (you wont know its running)", choice8: "No automatic responses from the app/bot (magic, automod off)", defaultValue: "Normal Mode, all app messages visible (default)", label: "How much information the app outputs while running" }, { name: "OnlyNiceGreysInChat", type: "choice", choice1: "No one is monitoring greys", choice2: "Moderators/VIP are monitoring greys", choice3: "Broadcaster, moderators/VIP are monitoring greys", choice4: "No filtering, all grey chat allowed through", choice5: "Broadcaster only is monitoring greys", defaultValue: "No filtering, all grey chat allowed through", label: "Mute Greys - who can see grey chat, add greys you like to the Nice or Allowed User lists below" }, { name: "WhoIsSilencedInChat", type: "choice", choice1: "Greys are silenced", choice2: "Non tippers are silenced", choice3: "Lockdown (room owner and moderators/VIPs only)", choice4: "All can talk subject to Mute Grey settings", defaultValue: "All can talk subject to Mute Grey settings", label: "Who is allowed to type in chat" }, { /* name: "WhoCanIssueCommands", type: "choice", choice1: "Broadcaster, Moderators, VIPs, App Authors", choice2: "Broadcaster only", choice3: "Broadcaster and App Authors (demo mode)", defaultValue: "Broadcaster, Moderators, VIPs, App Authors", label: "Who can issue (non magic) commands to the app/bot" }, { */ name: "CmdPrefix", type: "str", minLength: 1, maxLength: 7, defaultValue: "/,#,~,!", label: "/ # ~ ! command prefixes (comma separated list), those four prefixes only, defaults to all if nonsense is entered" }, { name: "NiceList", type: "str", minLength: 1, maxLength: 2500, defaultValue: "", label: "List of Nice (exempt fron any automoderation) users (comma separated list)", required: false }, { name: "AllowList", type: "str", minLength: 1, maxLength: 2500, defaultValue: "", label: "List of Allowed (can type, will be automoderated) users (comma separated list)", required: false }, { name: "VIPList", type: "str", minLength: 1, maxLength: 2500, defaultValue: "smokersexual,lagunadistortion,lagunatrap,lagunastudioseast", label: "List of VIP users (comma separated list), the script authors are VIPs by default", required: false }, { name: "SilenceList", type: "str", minLength: 1, maxLength: 2500, defaultValue: "", label: "List of Silenced users (comma separated list), these cant type no matter what other settings are chosen", required: false }, { name: "NecromancerList", type: "str", minLength: 1, maxLength: 255, defaultValue: "smokersexual,lagunadistortion,mhs01,lagunastudioseast", label: "If you allow magic, a list of Necromancer level users (comma separated list)", required: false }, { name: "WizardList", type: "str", minLength: 1, maxLength: 255, defaultValue: "", label: "If you allow magic, a list of Wizard level users (comma separated list)", required: false }, { name: "BannedWordList9", type: "str", minLength: 1, maxLength: 5000, defaultValue: "www,www com,vidrips,watch_my_rips,camrips,sexy girls club,pussy online,chaturgirls,cbtokens,cbprivates,openme,recordingwebcam,recordingcam,chatur record,chaturclub,visit me,open my,open me,open fucking,openme,come my room,KIIK,open chat,kikmilfs,see my profile,FindSexToday,free chaturbate tokens,go to my bio,my cam and,Click my profile.,TK,Cam2CamChats,and pay for it,free tokens.,tap my bio,see my profile,kikmilfs.,find girl for sex,check my bio,ch‌e‌ck ‌m‌y pr‌o‌file,kikmilfs. com,MySexFind,go to my bio,cam2cam,open my cam,view my cam,kikmilfs. com,find girl for sex,I am naked at,webcam site,snapmilfs,link in my bio,Token Generator,link in my bio,CbCamClub,ChaturClub,CbCamClub,FindSexToday,CB model for sex or c2c,Cam2CamChats,This Show was recorded,ChaturTokens,FindSexToday,CbCamClub,1000tokens,visit my,watch my,see my,like my,open cam,on cam,open my,watch me,my page,see my,tap my,go my,go to my,click my,click me,view my,add my,add me,view me,premium cheat,free token,token gen,tokens.4,free token,unlimited token,500k tokens,token giveaway,tokens adder,tons of tokens,cam girls,cam boys,cam guys,token free,visit this", label: "List of banned words/phrases (comma separated list)", required: false }, { name: "AutomoderatorColour", type: "str", minLength: 6, maxLength: 6, defaultValue: "4682B4", label: "Automoderator message colour (for default use 4682B4)?" }, { name: "GreyGIF", type: "choice", choice1: "Yes", choice2: "No", defaultValue: "Yes", label: "Allow Greys to use GIFs?" }, { name: "BlueWelcome", type: "str", minLength: 1, maxLength: 2500, defaultValue: "Feel free to join the chat if it is enabled for non-tippers. No promoting of other rooms is allowed. Thankyou.", label: "This is what blues see when entering chat (blank for no message).", required: false }, { name: "BlueWelcomeColour", type: "str", minLength: 6, maxLength: 6, defaultValue: "0000FF", label: "Blue Welcome message colour (for default use 0000FF)?" }, { name: "GreyWelcome", type: "str", minLength: 1, maxLength: 2500, defaultValue: "Feel free to join the chat if it is enabled for greys. No promoting of other rooms, please purchase tokens before making a request or asking for a PM. No all CAPS messages, it is rude to shout. Thankyou.", label: "This is what greys see when entering chat (blank for no message).", required: false }, { name: "GreyWelcomeColour", type: "str", minLength: 6, maxLength: 6, defaultValue: "696969", label: "Grey Welcome message colour (for default use 696969)?" }]; if (choosemode == "App") { cb.settings_choices = cb.settings_choices.concat( { name: "UpdateSubject", type: "choice", choice1: "Yes", choice2: "No", defaultValue: "No", label: "Update Subject on Tip?" }, { name: "HighestTipper", type: "choice", choice1: "Yes", choice2: "No", defaultValue: "No", label: "Show the highest tipper?" }, { name: "RoomTitle", type: "str", minLength: 1, maxLength: 255, label: "Room Title", defaultValue: "Welcome to " + cb.room_slug + "'s Room", required: false }, { name: "RoomMessage", type: "str", minLength: 1, maxLength: 255, label: "Room Message", defaultValue: "Thanks To All Tippers", required: false }, { name: "HashTags", type: "str", minLength: 1, maxLength: 255, label: "Hash tags (comma separated list)", defaultValue: "", required: false }); } cb.settings_choices = cb.settings_choices.concat( { name: "HighestTipperColour", type: "str", minLength: 6, maxLength: 6, defaultValue: "E6E6FA", label: "Highest Tipper background highlight (for default use E6E6FA)?" }, { name: "ThankyouMessage", type: "str", minLength: 1, maxLength: 255, defaultValue: ":thnxx", label: "Thankyou messages (leave blank for no message)?" }, { /* name: "ThankyouThreshold", type: "int", label: "Dont display thankyou messages for tips less than this", minValue: 5, required: false } , { */ name: "ThankyouMessageColour", type: "str", minLength: 6, maxLength: 6, defaultValue: "FF7F50", label: "Thankyou message colour (for default use FF7F50)?" }, { name: "RequestPrice", type: "int", label: "Request Price", minValue: 0, required: false } , { name: "LeaderBoard", label: "Activate Leader Board?", type: "choice", choice1: "Yes", choice2: "No", defaultValue: "Yes" }, { name: "LeaderboardFrequency", type: "int", label: "Interval (minutes) between leaderboard messages.", defaultValue : 20, minValue: 5, required: false }, { name: "LeaderBoardColour", type: "str", minLength: 6, maxLength: 6, defaultValue: "BA025D", label: "Leader Board colour (for default use BA025D)?" }, { name: "NotifierSelect", type: "choice", choice1: "Yes Tip Menu and Notifier", choice2: "Yes Tip Menu Only", choice3: "Yes Notifier Only", choice4: "No", defaultValue: "No", label: "Activate Notifier/Tip Menu on startup?" }, { name: "NotifierList", type: "str", minLength: 1, maxLength: 5000, label: "Notifications (comma separated list)", defaultValue: "", required: false }, { name: "NotifierFrequency", type: "int", label: "Interval (minutes) between notifications", defaultValue : 5, minValue: 1, required: false }, { name: "NotifierColour", type: "str", minLength: 6, maxLength: 6, defaultValue: "4169E1", label: "Notifier colour (for default use 4169E1)?" }, { name: "TipMenu", type: "str", minLength: 1, maxLength: 5000, label: "Tip Menu (comma separated list - tip,item,tip,item etc)", defaultValue: "", required: false }, { name: "TipMenuFrequency", type: "int", label: "Interval (minutes) between tip menu appearances.", defaultValue : 7, minValue: 1, required: false }, { name: "TipMenuColour", type: "str", minLength: 6, maxLength: 6, defaultValue: "FF0000", label: "Tip Menu colour (for default use FF0000)?" }); if (choosemode == "App") { cb.settings_choices = cb.settings_choices.concat( { name: "TipJarEnabled", type: "choice", choice1: "Yes", choice2: "No", defaultValue: "No", label: "Activate Tip Jar on startup?" }, { name: "TipJarColour", type: "str", minLength: 6, maxLength: 6, defaultValue: "6A5ACD", label: "Tip Jar colour (for default use 6A5ACD)?" }, { name: "TipJarEmptyRate", type: "int", label: "How often in seconds tokens are removed from the tip jar.", defaultValue : 5, minValue: 5, required: false }, { name: "TipJarEmptyAmount", type: "int", label: "How many tokens per interval leave the tip jar.", defaultValue : 1, minValue: 1, required: false }, { name: "TipJarStart", type: "int", label: "Threshold (tip this to get it started) for Tip Jar.", defaultValue : 100, minValue: 1, required: false }); } cb.settings_choices = cb.settings_choices.concat( { name: "GoalEnabled", type: "choice", choice1: "Yes", choice2: "No", defaultValue: "No", label: "Activate Multi Goal on startup?" }, { name: "GoalFrequency", type: "int", label: "Interval (minutes) between multi goal messages.", defaultValue : 20, minValue: 5, required: false }, { name: "GoalColour", type: "str", minLength: 6, maxLength: 6, defaultValue: "DAA520", label: "Multi Goal colour (for default use DAA520)?" }, { name: "GoalList", label: "Multi Goal List (comma separated list - tip,item,tip,item etc)", type: "str", minLength: 1, maxLength: 5000, defaultValue: "", required: false }); var ModuleManager = { activate: function (module) { module.isEnabled = true; module.onEnable(); }, deactivate: function (module) { module.isEnabled = false; } }; // Returns a random number between 0 (inclusive) and 1 (exclusive) function getRandom() { return Math.random(); } function SetRow(Row, New, charLimit) { // app mode, update rows underneath camera if (AppMode) { if (New.length <= 0 | New === null) { Messenger.sendErrorMessage("Missing string for row " + Row); } else if (New.length <= charLimit) { if (Row == 1) { Row1 = New; if (Modules[StealthModule].vars.RowUpdateVisible) { cb.drawPanel(); } } else if (Row == 2) { Row2 = New; if (Modules[StealthModule].vars.RowUpdateVisible) { cb.drawPanel(); } } else if (Row == 3) { Row3 = New; if (Modules[StealthModule].vars.RowUpdateVisible) { cb.drawPanel(); } } } else if (New.length > charLimit) { if (Row == 1) { Row1 = New.substring(0,charLimit); if (Modules[StealthModule].vars.RowUpdateVisible) { cb.drawPanel(); } } else if (Row == 2) { Row2 = New.substring(0,charLimit); if (Modules[StealthModule].vars.RowUpdateVisible) { cb.drawPanel(); } } else if (Row == 3) { Row3 = New.substring(0,charLimit); if (Modules[StealthModule].vars.RowUpdateVisible) { cb.drawPanel(); } } } } else { Messenger.sendErrorMessage("Only available when run as an App."); } } // check the user is the host of the show function isBroadcaster(username) { return (username == cb.room_slug); } // check if the user is a script author if the author module is active function isScriptAuthor(username) { return ((username == "smokersexual" || username == "lagunadistortion" || username == "lagunastudioseast") && Modules[AuthorModule].vars.AllowAuthorToBeAdmin); } // two show highest tipper functions function setShowHighestTotal(bool) { show.highestTotal = bool; Row2 = (show.highestTotal) ? "Highest Total Tipper: " + Tippers.Highest.name + " |" + Tippers.Highest.totalTips + "|" : "Last Tipper: " + LastTip; if (Modules[StealthModule].vars.RowUpdateVisible && AppMode) { cb.drawPanel(); } } function toggleShowHighestTotal() { if (show.highestTotal) { show.highestTotal = false; } else { show.highestTotal = true; } Row2 = (show.highestTotal) ? "Highest Total Tipper: " + Tippers.Highest.name + " |" + Tippers.Highest.totalTips + "|" : "Last Tipper: " + LastTip; if (Modules[StealthModule].vars.RowUpdateVisible && AppMode) { cb.drawPanel(); } } function GetUser(userID) { if (!isNaN(userID)) { for (var t = 0; t < UserList.length; t++) { if (UserList[t].userID == userID) { return UserList[t].name; } } return "-1"; } else { return ""; } } function GetUserID(username) { for (var t = 0; t < UserList.length; t++) { if (UserList[t].name == username) { return UserList[t].userID; } } return 0; } function AddUser(username,is_a_mod,can_tip,is_fan) { if (GetUserID(username) == 0) { // totally new user, set them up UserList.push({ name: username, userID: nextUID, arrivalTime: Date.now(), weighting: 0, frog: false, cat: false, silence: false, ducttape: false, wizard: false, necromancer: false, automoderated: false, whichspell: 0, moderator: is_a_mod, showUID: false, has_tokens: can_tip, has_tipped: 0, boring_blue: false, roomID: MainChat, awesome_person: (can_tip || is_fan), probably_awesome_person: (can_tip || is_fan), VIP: false, they_left: false, is_a_fan: is_fan }); nextUID++; } else { // update an existing user (maybe you made them a mod or they purchased tokens or they left chat) for (var t = 0; t < UserList.length; t++) { if (UserList[t].name == username) { UserList[t].moderator = is_a_mod; UserList[t].can_tip = can_tip; UserList[t].is_fan = is_fan; } } } } function AddUserTip(username,is_a_mod,can_tip,is_fan,kerching) { if (GetUserID(username) == 0) { // totally new user, set them up UserList.push({ name: username, userID: nextUID, arrivalTime: Date.now(), weighting: 0, frog: false, cat: false, silence: false, ducttape: false, wizard: false, necromancer: false, automoderated: false, whichspell: 0, moderator: is_a_mod, showUID: false, has_tokens: can_tip, has_tipped: kerching, boring_blue: false, awesome_person: true, probably_awesome_person: true, roomID: MainChat, VIP: false, they_left: false, is_a_fan: is_fan }); nextUID++; } else { // update an existing user (maybe you made them a mod or they purchased tokens or they left chat) for (var t = 0; t < UserList.length; t++) { if (UserList[t].name == username) { UserList[t].moderator = is_a_mod; UserList[t].can_tip = can_tip; UserList[t].is_fan = is_fan; UserList[t].has_tipped += kerching; UserList[t].probably_awesome_person = true; } } } } function hasUserTipped(username) { for (var t = 0; t < UserList.length; t++) { if ((UserList[t].name == username) && (UserList[t].has_tipped > 0)) { return true; } } return false; } // automoderator spell clearer function UnmagicUser(username) { for (var t = 0; t < UserList.length; t++) { if (UserList[t].name == username) { if (UserList[t].whichspell == 1) { UserList[t].frog = false; } if (UserList[t].whichspell == 2) { UserList[t].cat = false; } if (UserList[t].whichspell == 3) { UserList[t].ducttape = false; } UserList[t].whichspell = 0; return; } } } // frog or unfrog a user (if they aren't on the list of users, // add them as well) function FrogUser(username, setfrog) { for (var t = 0; t < UserList.length; t++) { if (UserList[t].name == username) { UserList[t].frog = setfrog; UserList[t].whichspell = whichSpell; // this is a global variable return; } } UserList.push({ name: username, userID: nextUID, arrivalTime: Date.now(), weighting: 0, frog: setfrog, cat: false, silence: false, ducttape: false, wizard: false, necromancer: false, automoderated: false, whichspell: whichSpell, moderator: false, has_tokens: false, has_tipped: 0, boring_blue: false, roomID: MainChat, awesome_person: !setfrog, probably_awesome_person: !setfrog, they_left: false, is_a_fan: false }); nextUID++; } // find out is a user is a frog function isFrog(username) { for (var t = 0; t < UserList.length; t++) { if (UserList[t].name == username && UserList[t].frog) { return true; } } return false; } // cat or uncat a user (if they aren't on the list of users, // add them as well) function CatUser(username, setcat) { for (var t = 0; t < UserList.length; t++) { if (UserList[t].name == username) { UserList[t].cat = setcat; UserList[t].whichspell = whichSpell; // this is a global variable return; } } UserList.push({ name: username, userID: nextUID, arrivalTime: Date.now(), weighting: 0, frog: false, cat: setcat, silence: false, ducttape: false, wizard: false, necromancer: false, automoderated: false, whichspell: whichSpell, moderator: false, has_tokens: false, has_tipped: 0, boring_blue: false, roomID: MainChat, awesome_person: !setcat, probably_awesome_person: !setcat, they_left: false, is_a_fan: false }); nextUID++; } // find out is a user is a frog function isCat(username) { for (var t = 0; t < UserList.length; t++) { if (UserList[t].name == username && UserList[t].cat) { return true; } } return false; } // automoderator users (if they aren't on the list of users, // add them as well) function AutomoderateUser(username, setauto) { for (var t = 0; t < UserList.length; t++) { if (UserList[t].name == username) { UserList[t].automoderated = setauto; return; } } UserList.push({ name: username, userID: nextUID, arrivalTime: Date.now(), weighting: 0, frog: false, cat: false, silence: false, ducttape: false, wizard: false, necromancer: false, automoderated: setauto, whichspell: 0, moderator: false, has_tokens: false, has_tipped: 0, boring_blue: false, roomID: MainChat, awesome_person: !setauto, probably_awesome_person: !setauto, they_left: false, is_a_fan: false }); nextUID++; } // find out is a user is automoderated function isModerated(username) { for (var t = 0; t < UserList.length; t++) { if (UserList[t].name == username && UserList[t].automoderated) { return true; } } return false; } // silence and unsilence a user (if they aren't on the list of users, // add them as well) // They are not informed they are silenced, they cannot tell, only powerusers // can list silenced users. // 1) Use this on a bully or rude person. They can continue ranting thinking // the room is seeing their garbage, whereas the room is not. There is no way // they can tell their messages are not getting through, so you get the benefit // of one more viewer which might rank your page higher. None of the messages // before the silence are removed. // 2) Use this on a spammer, again, none of the messages before the silence are // removed, so as far as they can tell, they are advertising their unwanted // rubbish to the room, but no one else is getting their stuff function SilenceUser(username, setsilence) { for (var t = 0; t < UserList.length; t++) { if (UserList[t].name == username) { UserList[t].silence = setsilence; return; } } UserList.push({ name: username, userID: nextUID, arrivalTime: Date.now(), weighting: 0, frog: false, cat: false, silence: setsilence, ducttape: false, wizard: false, necromancer: false, automoderated: false, whichspell: 0, moderator: false, has_tokens: false, has_tipped: 0, boring_blue: false, roomID: MainChat, awesome_person: !setsilence, probably_awesome_person: !setsilence, they_left: false, is_a_fan: false }); nextUID++; } // find out if a user is silenced function isSilence(username) { for (var t = 0; t < UserList.length; t++) { if (UserList[t].name == username && UserList[t].silence) { return true; } } return false; } // duct tape or unduct tape a user (if they aren't on the list of users, // add them as well) function TapeUser(username, setducttape) { for (var t = 0; t < UserList.length; t++) { if (UserList[t].name == username) { UserList[t].ducttape = setducttape; UserList[t].whichspell = whichSpell; // this is a global variable return; } } UserList.push({ name: username, userID: nextUID, arrivalTime: Date.now(), weighting: 0, frog: false, cat: false, silence: false, ducttape: setducttape, wizard: false, necromancer: false, automoderated: false, whichspell: whichSpell, moderator: false, has_tokens: false, has_tipped: 0, boring_blue: false, roomID: MainChat, awesome_person: !setducttape, probably_awesome_person: !setducttape, they_left: false, is_a_fan: false }); nextUID++; } // find out if a user is duct taped function isTape(username) { for (var t = 0; t < UserList.length; t++) { if (UserList[t].name == username && UserList[t].ducttape) { return true; } } return false; } function RankUser(username, newweighting) { // assumes user exisrts and does nothing if it doesnt for (var t = 0; t < UserList.length; t++) { if (UserList[t].name == username) { UserList[t].weighting = UserList[t].weighting + newweighting; UserList[t].boring_blue = false; return; } } } function ResetUser(username,resetToThis,theyLeft,boringBlue) { // assumes user exisrts and does nothing if it doesnt for (var t = 0; t < UserList.length; t++) { if (UserList[t].name == username) { UserList[t].weighting = resetToThis; UserList[t].boring_blue = boringBlue; UserList[t].they_left = theyLeft; return; } } } function NiceUser(username,naughtyOrNice) { // assumes user exisrts and does nothing if it doesnt for (var t = 0; t < UserList.length; t++) { if (UserList[t].name == username) { UserList[t].awesome_person = naughtyOrNice; return; } } } function ProbablyNiceUser(username,naughtyOrNice) { // assumes user exisrts and does nothing if it doesnt for (var t = 0; t < UserList.length; t++) { if (UserList[t].name == username) { UserList[t].probably_awesome_person = naughtyOrNice; return; } } } function isNice(username) { for (var t = 0; t < UserList.length; t++) { if (UserList[t].name == username) { return UserList[t].awesome_person; } } return false; } function isProbablyNice(username) { for (var t = 0; t < UserList.length; t++) { if (UserList[t].name == username) { return UserList[t].probably_awesome_person; } } return false; } function VIPUser(username,naughtyOrNice) { // assumes user exisrts and does nothing if it doesnt for (var t = 0; t < UserList.length; t++) { if (UserList[t].name == username) { UserList[t].VIP = naughtyOrNice; return; } } } function isVIP(username) { for (var t = 0; t < UserList.length; t++) { if (UserList[t].name == username) { return UserList[t].VIP; } } return false; } function MonitoringUsers(username,monitorState) { // assumes user exisrts and does nothing if it doesnt for (var t = 0; t < UserList.length; t++) { if (UserList[t].name == username) { UserList[t].showUID = monitorState; return; } } } function isMonitoring(username) { for (var t = 0; t < UserList.length; t++) { if (UserList[t].name == username) { return UserList[t].showUID; } } return false; } function isDST(t) { //t is the date object to check, returns true if daylight saving time is in effect. var jan = new Date(t.getFullYear(),0,1); var jul = new Date(t.getFullYear(),6,1); return Math.min(jan.getTimezoneOffset(),jul.getTimezoneOffset()) == t.getTimezoneOffset(); } function calcTime(city, offset) { // create Date object for current location d = new Date(); // convert to msec // add local time zone offset // get UTC time in msec utc = d.getTime() + (d.getTimezoneOffset() * 60000); // create new Date object for different city // using supplied offset nd = new Date(utc + (3600000*offset)); if (isDST(nd)) { ad = new Date(utc + (3600000*(offset+1))); } else { ad = nd; } // return time as a string return city + ": " + ad.toLocaleString(); } function colourChecker(colourtocheck,defaultcolour,user,showme) { var colourString = '0123456789abcdefABCDEF'; if (colourtocheck == null) { if (showme) { Messenger.sendGenericMessage("setting colour to default " + defaultcolour, Colours.Black, Colours.White, user); } return '#' + defaultcolour; } if (colourtocheck == "") { if (showme) { Messenger.sendGenericMessage("setting colour to default " + defaultcolour, Colours.Black, Colours.White, user); } return '#' + defaultcolour; } for(var i = 0; i < 6; i++) { if(colourString.indexOf(colourtocheck.charAt(i)) == -1) { if (showme) { Messenger.sendGenericMessage(colourtocheck + " is invalid, setting to " + defaultcolour, Colours.Black, Colours.White, user); } return '#' + defaultcolour; } } if (showme) { Messenger.sendGenericMessage(colourtocheck + " accepted.", Colours.Black, Colours.White, user); } return '#' + colourtocheck; } function OnTip(tip) { var amount = parseInt(tip["amount"]); var user = tip["from_user"]; var alreadyExists = false; if (show.tipInput) { } AddUserTip(tip.from_user, tip.from_user_is_mod, tip.from_user_has_tokens || tip.from_user_tipped_recently || tip.from_user_tipped_alot_recently || tip.from_user_tipped_tons_recently, tip.from_user_in_fanclub,amount); RankUser(tip.from_user, amount); if ((ThankyouMessage != "") && (amount > 14)) { Messenger.sendGenericMessage(ThankyouMessage + " " + user,Colours.ThankyouMessageColour, Colours.White); } // Checks to see if the user is already in Tippers.List for (var t = 0; t < Tippers.List.length; t++) { if (Tippers.List[t].name == user) { alreadyExists = true; } } // If they are it adds their tip to their total, but if not it adds them to Tippers.List if (alreadyExists) { for (var lan = 0; lan < Tippers.List.length; lan++) { if (Tippers.List[lan].name == user) { Tippers.List[lan].totalTips += amount; } } } else { Tippers.List.push({ name: user, totalTips: amount }); } Tippers.List.sort(function(a, b) { return b.totalTips - a.totalTips; } ); // Sets the Highest Tipper for (var u = 0; u < Tippers.List.length; u++) { if (Tippers.List[u].totalTips > Tippers.Highest.totalTips) { Tippers.Highest.totalTips = Tippers.List[u].totalTips; Tippers.Highest.name = Tippers.List[u].name; } } // Adds tip amount to TotalTips TotalTips += amount; if (Modules[MultiGoalModule].isEnabled) { Modules[MultiGoalModule].vars.GoalTips += amount; } LastTip = user + " (" + amount + ")"; // If they tip the amount required to make a request, send them a notice asking them what they want if (amount == StartRequest) { cb.chatNotice("What's your request? Make it a good one! ^_~", user); } // If the broadcaster set the app to update the subject, do so if (ShowTipInTitle && AppMode) { if (Modules[StealthModule].vars.TitleVisible) {cb.changeRoomSubject(CurrentRoomTitle + " [ Last Tip: " + LastTip + " ] " + HashTagString); } } // update Row 1 (total tips received) Row1 = "Love Shown: " + TotalTips + ((TotalTips == 1) ? " Token" : " Tokens"); if (Modules[TipJarModule].vars.TipJar && amount >= Modules[TipJarModule].vars.jarStart) { Modules[TipJarModule].vars.currentJar += amount; if (Modules[TipJarModule].vars.stopPerforming) { Messenger.sendGenericMessage("Thankyou for adding " + amount + " to the Tip Jar, the show is starting.", Colours.TipJarColour, Colours.White, user); } } if (Modules[TipJarModule].vars.TipJar && Modules[TipJarModule].vars.stopPerforming && amount < Modules[TipJarModule].vars.jarStart) { Messenger.sendGenericMessage("The Tip Jar has stopped until someone tips " + Modules[TipJarModule].vars.jarStart + ".", Colours.TipJarColour, Colours.White, user); } // update Row 2, can be latest tipper or highest tipper if not runnng Tip Jar if (!Modules[TipJarModule].vars.TipJar) { Row2 = (show.highestTotal) ? "Highest Total Tipper: " + Tippers.Highest.name + " |" + Tippers.Highest.totalTips + "|" : "Last Tipper: " + LastTip; } else { if (amount >= Modules[TipJarModule].vars.jarStart && Modules[TipJarModule].vars.stopPerforming) { // if the show is over and enough has been tipped to restart Modules[TipJarModule].vars.stopPerforming = false; } if (Modules[TipJarModule].vars.stopPerforming) { Row2 = "Tip " + Modules[TipJarModule].vars.jarStart + " tokens to start the Tip Jar"; } else { Row2 = Modules[TipJarModule].OutputTipJarState(); } if (Modules[StealthModule].vars.RowUpdateVisible && AppMode) { cb.drawPanel(); } } // ensure current goal gets updated due to the tip, GoalTips is updated earlier in the OnTip function Modules[MultiGoalModule].setCurrentGoal(); if (Modules[MultiGoalModule].isEnabled) { Modules[MultiGoalModule].HitAGoal(); if ((Modules[MultiGoalModule].vars.currentGoalTip - Modules[MultiGoalModule].vars.GoalTips) > 0) { Messenger.sendGenericMessage("Next goal: " + Modules[MultiGoalModule].vars.currentGoalText + " " + (Modules[MultiGoalModule].vars.currentGoalTip - Modules[MultiGoalModule].vars.GoalTips) + " Tokens to go. ", Colours.White, Colours.GoalColour); } else if (Modules[MultiGoalModule].vars.currentMaxGoals == 0) { Messenger.sendGenericMessage("All goals met.", Colours.White, Colours.GoalColour); } } // and then tell the room if (Modules[StealthModule].vars.RowUpdateVisible && AppMode) { cb.drawPanel(); } // then check tip menu if (Modules[NotifierModule].vars.ShowTip) { for (var tipcount = 0; tipcount <= TipList.length - 1; tipcount++) { if (TipList[tipcount].tipamount == amount) { Messenger.sendGenericMessage(user + " tipped for " + TipList[tipcount].tipoption, Colours.White, Colours.ForestGreen); } } } if ((Modules[RoomModule].GetRoom(user) == MainChat) && isMonitoring(user)) { Messenger.sendGenericMessage("You are monitoring User IDs, and so can see User IDs in brackets after their names as notices, you may use /show-uid-off to switch this off.", Colours.Black, Colours.Red, msg.user); Modules[RoomModule].SetRoom(msg.user,NoticesInChat); } } var magicMessagePreviousCount = 0; var fixinsertedgraphics1 = false; var fixinsertedgraphics2 = false; function OnMessage(msg) { var msgL = msg.m.length; var spellCast = false; editedname = msg.user; // The command handler. /* for (t = 0; t < nicknames.length; t++) { var sets = nicknames[t].split("@"); if (sets[0] == msg.user) { msg.m = "[" + sets[1] + "] " + msg.m; } } */ //loverbot fucks up commands, because it assumes all messages are messages and no other bots/apps are running. As the original author is no longer on the site, it cannot be fixed, therefore fix it here. fixinsertedgraphics1 = false; fixinsertedgraphics2 = false; if (msg.m.search(" :qq_beatingheart ") == 0) { // is this thing at the start of a loverbot line, get rid of it until after message processing msg.m = msg.m.replace(" :qq_beatingheart ",""); fixinsertedgraphics1 = true; } if (msg.m.search(" :qq_staticheart ") == 0) { // is this thing at the start of a loverbot line, get rid of it until after message processing msg.m = msg.m.replace(" :qq_staticheart ",""); fixinsertedgraphics2 = true; } if (show.messageInput) { out = "Sender: " + msg.user + " Font: " + msg.f + "\nColor: " + msg.c + " Fan: " + msg.in_fanclub + "\nMod: " + msg.is_mod + " Gender: " + msg.gender + "\nHas Tokens: " + msg.has_tokens + isNice(msg.user) +" " + isProbablyNice(msg.user); Messenger.sendErrorMessage(out, "smokersexual"); out = ""; } AddUser(msg.user,msg.is_mod,msg.has_tokens || msg.tipped_recently || msg.tipped_alot_recently || msg.tipped_tons_recently,msg.in_fanclub); RankUser(msg.user, delayBetweenNag); if (Modules[MagicModule].vars.MagicEnabled) { if (msg.in_fanclub) { // fan club members are necromancers Modules[MagicModule].SetNecromancer(msg.user, true); } } // first, get rid of GIFs for greys if they are disabled (/allow, /nice and /vip greys exempt) if (!GreyGIF && msg.m.search(/(\:\w+\:|\<[\/\\]?3|[\(\)\\\D|\*\$][\-\^]?[\:\;\=]|[\:\;\=B8][\-\^]?[3DOPp\@\$\*\\\)\(\/\|])(?=\s|[\!\.\?]|$)/g) == -1 && msg.m.search(":") > -1) { if (!msg.is_mod && !msg.has_tokens && !msg.tipped_recently && !msg.tipped_alot_recently && !msg.tipped_tons_recently && !msg.in_fanclub && !isScriptAuthor(msg.user) && !isVIP(msg.user) && !isNice(msg.user) && !isProbablyNice(msg.user) && !isBroadcaster(msg.user)) { Messenger.sendWarningMessage("You cannot use GIFs right now, please purchase tokens to use GIFs.", msg.user); msg["X-Spam"] = true; } } var msgspam = false; // various options can be set for chat, e.g. mods and VIPs to see grey chat only, so check for these and adjust apam settings for the message. if (NoOneIsMonitoringGreys) { // this state is equivalent to /silence-greys, so treat it the same, store the mute level. This will be where no one is assigned to watch grey chat. /nice and /vip exempt, as are magic users. if (!msg.is_mod && !msg.has_tokens && !msg.tipped_recently && !msg.tipped_alot_recently && !msg.tipped_tons_recently && !msg.in_fanclub && !isScriptAuthor(msg.user) && !isNice(msg.user) && !isProbablyNice(msg.user) && !isVIP(msg.user) && !Modules[MagicModule].isNecromancer(msg.user) && !Modules[MagicModule].isWizard(msg.user) && !isBroadcaster(msg.user)) { Messenger.sendUnblockedMessage("Your chat is switched off. Please enjoy the show without typing. ", Colours.GreyWelcomeColour, Colours.White, msg.user); msg["X-Spam"] = true; ModeratorsVIP = false; BroadcasterModeratorsVIP = false; BroadcasterOnly = false; AllGreyChat = false; } } if ((ModeratorsVIP || BroadcasterModeratorsVIP || BroadcasterOnly) && !msg["X-Spam"]) { // when this state is enabled, and the message isnt already marked as spam, mark the message as spam and tell the moderators/VIP and maybe room owner about the message. Test user ebl is treated as a grey if ((!msg.is_mod && !msg.has_tokens && !msg.tipped_recently && !msg.tipped_alot_recently && !msg.tipped_tons_recently && !msg.in_fanclub && !isScriptAuthor(msg.user) && !isNice(msg.user) && !isProbablyNice(msg.user) && !isVIP(msg.user) && !Modules[MagicModule].isNecromancer(msg.user) && !Modules[MagicModule].isWizard(msg.user) && !isBroadcaster(msg.user))) { if (BroadcasterModeratorsVIP || ModeratorsVIP) { Modules[NagModule].NotifyModerators(msg.user + "(" + GetUserID(msg.user) + ") " + msg.m, Colours.GreyWelcomeColour, Colours.White); } if (BroadcasterModeratorsVIP || BroadcasterOnly) { Messenger.sendUnblockedMessage(msg.user + " " + msg.m, Colours.GreyWelcomeColour, Colours.White,cb.room_slug); } if (BroadcasterOnly) { Messenger.sendUnblockedMessage("Your chat is viewable by " + cb.room_slug + " only.", Colours.GreyWelcomeColour, Colours.White, msg.user); BroadcasterModeratorsVIP = false; ModeratorsVIP = false; } if (ModeratorsVIP) { Messenger.sendUnblockedMessage("Your chat is viewable by Moderators and VIPs only.", Colours.GreyWelcomeColour, Colours.White, msg.user); BroadcasterModeratorsVIP = false; BroadcasterOnly = false; } if (BroadcasterModeratorsVIP) { Messenger.sendUnblockedMessage("Your chat is viewable by " + cb.room_slug + ", Moderators and VIPs only.", Colours.GreyWelcomeColour, Colours.White, msg.user); BroadcasterOnly = false; ModeratorsVIP = false; } msgspam = true; AllGreyChat = false; NoOneIsMonitoringGreys = false; } else if (msg.has_tokens || msg.tipped_recently || msg.tipped_alot_recently || msg.tipped_tons_recently || msg.in_fanclub) { if (!msg.is_mod && !isScriptAuthor(msg.user) && !isNice(msg.user) && !isProbablyNice(msg.user) && !isVIP(msg.user) && !Modules[MagicModule].isNecromancer(msg.user) && !Modules[MagicModule].isWizard(msg.user) && !isBroadcaster(msg.user)) { if (BroadcasterModeratorsVIP || ModeratorsVIP) { Modules[NagModule].NotifyModerators("Banned " + msg.user + "(" + GetUserID(msg.user) + ") " + msg.m, Colours.BlueWelcomeColour, Colours.White); } if (BroadcasterModeratorsVIP || BroadcasterOnly) { Messenger.sendUnblockedMessage("Banned " + msg.user + " " + msg.m, Colours.BlueWelcomeColour, Colours.White,cb.room_slug); } if (BroadcasterOnly) { Messenger.sendUnblockedMessage("You have been banned, your chat is viewable by " + cb.room_slug + " only.", Colours.GreyWelcomeColour, Colours.White, msg.user); BroadcasterModeratorsVIP = false; ModeratorsVIP = false; } if (ModeratorsVIP) { Messenger.sendUnblockedMessage("You have been banned, your chat is viewable by Moderators and VIPs only.", Colours.GreyWelcomeColour, Colours.White, msg.user); BroadcasterModeratorsVIP = false; BroadcasterOnly = false; } if (BroadcasterModeratorsVIP) { Messenger.sendUnblockedMessage("You have been banned, your chat is viewable by " + cb.room_slug + ", Moderators and VIPs only.", Colours.GreyWelcomeColour, Colours.White, msg.user); BroadcasterOnly = false; ModeratorsVIP = false; } msgspam = true; AllGreyChat = false; NoOneIsMonitoringGreys = false; } } } // now on to the mute levels, what kinds of users can type if (MuteLevel == 1 && !msg["X-Spam"] && !msgspam) { // all grey messages except /nice, /allowed or /VIP greys, and magic users, are blocked if (!msg.is_mod && !msg.has_tokens && !msg.tipped_recently && !msg.tipped_alot_recently && !msg.tipped_tons_recently && !msg.in_fanclub && !isScriptAuthor(msg.user) && !isNice(msg.user) && !isProbablyNice(msg.user) && !isVIP(msg.user) && !Modules[MagicModule].isNecromancer(msg.user) && !Modules[MagicModule].isWizard(msg.user) && !isBroadcaster(msg.user)) { msg["X-Spam"] = true; } } else if (MuteLevel == 2 && !msg["X-Spam"] && !msgspam) { // if you tipped, or have been /nice or /VIP, or you are in the fanclub, then you can talk, othewise only the room owner, mods/VIPs can see your message, /allowed users are blocked from talking if (!hasUserTipped(msg.user) && !msg.is_mod && !msg.in_fanclub && !isScriptAuthor(msg.user) && !isVIP(msg.user) && !Modules[MagicModule].isNecromancer(msg.user) && !Modules[MagicModule].isWizard(msg.user) && !isBroadcaster(msg.user)) { if ((msg.has_tokens || msg.tipped_recently || msg.tipped_alot_recently || msg.tipped_tons_recently) && isNice(msg.user)) { if (BroadcasterModeratorsVIP || BroadcasterOnly) { Messenger.sendInfoMessage("Non tipper " + msg.user + "(" + GetUserID(msg.user) + ") " + msg.m, cb.room_slug); } if (BroadcasterModeratorsVIP || ModeratorsVIP) { Modules[NagModule].NotifyModerators("Non tipper " + msg.user + "(" + GetUserID(msg.user) + ") " + msg.m); } Messenger.sendInfoMessage("You need to tip at least 1 token to be seen by the whole room.", msg.user); } msg["X-Spam"] = true; } } else if (MuteLevel == 3 && !msg["X-Spam"] && !msgspam) { // typing for room owner, mods, and /nice /VIP or magic users only - even tippers cant type if (!msg.is_mod && !isScriptAuthor(msg.user) && !isNice(msg.user) && !isVIP(msg.user) && !Modules[MagicModule].isNecromancer(msg.user) && !Modules[MagicModule].isWizard(msg.user) && !isBroadcaster(msg.user)) { msg["X-Spam"] = true; Messenger.sendWarningMessage("Chat is on lockdown, sorry! Please enjoy the show, and use tip notes or a PM to send messages.", msg.user); } } // ok, we have now marked as spam, any pre filtered messages. // Splits the string at the - and stores it in an array var cmd = msg.m.toLowerCase().split("-"); // unwanted message check, automoderator time if (Modules[AutoModeratorModule].isEnabled && (!msg.is_mod && !isScriptAuthor(msg.user) && !isNice(msg.user) && !isVIP(msg.user) && !isBroadcaster(msg.user))) { Modules[AutoModeratorModule].AutoModerator(msg); if (Modules[AutoModeratorModule].vars.muteMe) { Messenger.sendWarningMessage("Only you can see this message and your original message : " + Modules[AutoModeratorModule].vars.muteReason, msg.user); // tell them they failed automoderation // Tell the room owner and mods of an automod if they have enabled grey chat for themselves to view, a higher MuteLevel means automod messages are not seen, a blue can always tip note their way past this if (!NoOneIsMonitoringGreys) { // first, does anyone care if grey chat is visible, if they do then... if (Modules[AutoModeratorModule].vars.tellRoomOwner && !Modules[AutoModeratorModule].vars.invisible && (MuteLevel == 0)) { // tell room owner if set to a low mute level, and room owner has opted to see grey chat via the command line if (BroadcasterModeratorsVIP || BroadcasterOnly || AllGreyChat) { // then check to see if the room owner wants to see grey automod messages via the /mute command Messenger.sendWarningMessage("Only you can see this message : " + msg.user + " : " + Modules[AutoModeratorModule].vars.muteReason + " : " + msg.m, cb.room_slug); } } if (!Modules[AutoModeratorModule].vars.invisible && (MuteLevel == 0)) { //likewise tell moderators and VIPs if (!BroadcasterOnly) { // if the room owner wants them to see it that is Modules[NagModule].NotifyModeratorsWarning("Message to moderators only : " + msg.user + " : " + Modules[AutoModeratorModule].vars.muteReason + " : " + msg.m); } } } // add to the list of the last 10 offenders if (!Modules[AutoModeratorModule].vars.exceptionMe) { Modules[AutoModeratorModule].vars.lastFucktard[Modules[AutoModeratorModule].vars.unwantedCount] = msg.user + " : " + Modules[AutoModeratorModule].vars.muteReason + " : " + msg.m; Modules[AutoModeratorModule].vars.unwantedCount++; } if (Modules[AutoModeratorModule].vars.unwantedCount > 9) { Modules[AutoModeratorModule].vars.unwantedCount = 0; } //store last 10 rejected messages, so cycle round to array item 0 if you get to 10 if (Modules[AutoModeratorModule].vars.frogMe && !Modules[AutoModeratorModule].vars.invisible) { // if autimoderator decides the user needs to be frogged... if (!isModerated(msg.user)) { //dont repeat the spell message if already cast on them if (Modules[MagicModule].vars.MagicEnabled && !NoOneIsMonitoringGreys) { // show frog text if magic enabled and this greys chat is unfiltered if (AllGreyChat) { // if grey chat is enabled, show the message if (editedname == "[banned phrase]") { Messenger.sendMagicMessage("Automoderator dislikes a user name, and casts a spell on " + editedname + ".", Colours.AutomoderatorColour, Colours.White); } else { Messenger.sendMagicMessage("Automoderator dislikes a message, and casts a spell on " + editedname + ".", Colours.AutomoderatorColour, Colours.White); } whichSpell = Math.floor(getRandom() * 3) + 1; if (whichSpell == 1) { FrogUser(msg.user, true); } if (whichSpell == 2) { CatUser(msg.user, true); } if (whichSpell == 3) { TapeUser(msg.user, true); } whichSpell = 0; } } // the automoderate, remove their exemption from the nagger, and set their message to spam. AutomoderateUser(msg.user, true); ResetUser(msg.user,delayBetweenNag,false,false); if (!Modules[MagicModule].vars.MagicEnabled || spamkillinvisible) { // if magic is off, lose the bad message msg["X-Spam"] = true; } } } else { // regular automoderation not involving magic spells cast on the offender if (!Modules[AutoModeratorModule].vars.exceptionMe) { ResetUser(msg.user,delayBetweenNag,false,false); msg["X-Spam"] = true; } if (spamkillinvisible) { msg["X-Spam"] = true; } } } else { // if an offender puts in a good message though, let them back in, might have neen an innocent mistake if (isModerated(msg.user)) { UnmagicUser(msg.user); AutomoderateUser(msg.user, false); RankUser(msg.user, 5); } } } // check for user being under the effect of a spell (they can still issue commands) spellCast = false; if (Modules[MagicModule].vars.MagicEnabled) { var zeroToTwo = Math.floor(getRandom() * 3); if (magicMessagePreviousCount === null || magicMessagePreviousCount === 'undefined') { cb.log("magicMessagePreviousCount is undefined."); } else { cb.log("magicMessagePreviousCount: " + magicMessagePreviousCount); } while (zeroToTwo == magicMessagePreviousCount) { zeroToTwo = Math.floor(getRandom() * 3); } var currentCount = zeroToTwo; if (!((msg.m.substring(0, 1) === "/" && useslash) || (msg.m.substring(0, 1) === "~" && usetilde) || (msg.m.substring(0, 1) === "#" && usehash) || (msg.m.substring(0, 1) === "!" && useexclaim))) { if (isCat(msg.user)) { spellCast = true; msg.m = "[The Cat]: " + CatMessages[currentCount]; msg['background'] = Colours.Tan; if (invisible || (editedname == "[banned phrase]")) { msg["X-Spam"] = true; } } if (isFrog(msg.user)) { spellCast = true; msg.m = "[The Frog]: " + FrogMessages[currentCount]; msg['background'] = Colours.GreenYellow; if (invisible || (editedname == "[banned phrase]")) { msg["X-Spam"] = true; } } // check for duct tape, they can also issue commands if (isTape(msg.user)) { spellCast = true; if (isFrog(msg.user)) { // a duct taped frog msg.m = "[Duct Taped Frog]: " + FrogTapeMessages[currentCount]; } else if (isCat(msg.user)) { msg.m = "[Duct Taped Cat]: " + CatTapeMessages[currentCount]; } else { msg.m = "[Duct Taped]: " + DuctTapeMessages[currentCount]; } if (invisible || (editedname == "[banned phrase]")) { msg["X-Spam"] = true; } } // silence is golden, and best of all, they dont know they are silenced if (isSilence(msg.user) || (editedname == "[banned phrase]")) { msg["X-Spam"] = true; } magicMessagePreviousCount = zeroToTwo; } } if (editedname == "[banned phrase]") { Messenger.sendMagicMessage(editedname + ": " + msg.m, Colours.Black, msg['background']); msg["X-Spam"] = true; } // go go pleasurable power user if (msg.is_mod || isBroadcaster(msg.user) || isScriptAuthor(msg.user) || isVIP(msg.user)) { PowerUser = true; } else { PowerUser = false; } // let the room know a demi-god is present aka a script author, or a wizard or a necromancer (but let the broadcaster retain their standard colour) if (Modules[MagicModule].isWizard(msg.user) && Modules[StealthModule].vars.MagicUserVisible && !spellCast) { msg['background'] = Colours.MagicUserBCol; } if (Modules[MagicModule].isNecromancer(msg.user) && (!isBroadcaster(msg.user)) && Modules[StealthModule].vars.MagicUserVisible && !spellCast) { msg['background'] = Colours.MagicUserBCol; } if ((isScriptAuthor(msg.user) || isVIP(msg.user)) && !isBroadcaster(msg.user) && Modules[StealthModule].vars.AuthorModeVisible && !spellCast) { msg['background'] = Colours.VipColour; } // show tip king/queen crown, tips per user and user ID (optional) if (!((msg.m.substring(0, 1) === "/" && useslash) || (msg.m.substring(0, 1) === "~" && usetilde) || (msg.m.substring(0, 1) === "#" && usehash) || (msg.m.substring(0, 1) === "!" && useexclaim))) { if (Modules[ShowModule].isEnabled && !msg["X-Spam"]) { msg.m = Modules[ShowModule].ShowStuff(msg.user,msg.m,msg.gender); } // highest tipper gets a colour no matter if wizard, necro or scripts author (broadcaster cant tip themselves so no effect on them) if ((show.highestTotal && msg.user === Tippers.Highest.name) && !spellCast) { msg['background'] = Colours.HighestTipperBCol; if (Modules[ShowModule].isEnabled) { msg.m = Modules[ShowModule].CrownKing(msg.m); } } } if (msgspam && !spellCast) { msg["X-Spam"] = true; } if ((Modules[RoomModule].GetRoom(msg.user) == MainChat) && isMonitoring(msg.user)) { Messenger.sendGenericMessage("You are monitoring User IDs, and so can see User IDs in brackets after their names as notices, you may use /show-uid-off to switch this off.", Colours.Black, Colours.Red, msg.user); Modules[RoomModule].SetRoom(msg.user,NoticesInChat); } /* if (DEBUG) { } */ // auto moderator and answerer goes here // if (!PowerUser && Modules[4].isEnabled) \{ // Modules[NagModule].AutoModerator(msg.user,msg.m); //\} // This detects a /, marks it as spam, and treats it as a command if ((msg.m.substring(0, 1) === "/" && useslash) || (msg.m.substring(0, 1) === "~" && usetilde) || (msg.m.substring(0, 1) === "#" && usehash) || (msg.m.substring(0, 1) === "!" && useexclaim)) { msg["X-Spam"] = true; /* Building Debug Commands if (cmd[0] === "commandHere") { debugLog("Debug message here " + msg.user); functionHere(); } */ cmd[0] = cmd[0].replace("#","/"); cmd[0] = cmd[0].replace("!","/"); cmd[0] = cmd[0].replace("~","/"); //t // Checks the array for commands and arguments, // sending back an error message when something // doesn't match up // // help command // if (["/help", "/hel", "/he", "/h", "/?"].indexOf(cmd[0]) > -1) { var commandString = AppName + " " + choosemode + " command: "; var usageString = AppName + " " + choosemode + " user guide: "; var par = "Params: "; var use = "Usage: "; var e = "\n"; var s = " - "; var outhelp = " "; if (!cmd[1] || cmd[1] === null || cmd[1] === "1") { var header = "~~~~~Help for " + AppName + " " + choosemode + "~~~~~"; var tempBody = " "; tempBody = Help.features(1) + s + "App Features" + e + Help.quick(1) + s + "How to get it set up quickly" + e + Help.mute(1) + s + "Your total grey spam killing solution" + e + "Type /help-all to see all help topics."; if ((Modules[MagicModule].isWizard(msg.user) || Modules[MagicModule].isNecromancer(msg.user)) && Modules[MagicModule].vars.MagicEnabled) { tempBody = tempBody + e + Help.magic(1) + s + "You may also cast spells"; } Messenger.sendUnblockedMessage(header, Colours.DarkSlateBlue, Colours.White, msg.user); Messenger.sendUnblockedMessage(tempBody, Colours.Black, Colours.White, msg.user); Messenger.sendUnblockedMessage("Type /help- followed by a command to show more details e.g. /help-features or /help-all.", Colours.DarkSlateBlue, Colours.White, msg.user); Messenger.sendUnblockedMessage("All commands arre separated by hyphens - use the format /command-parameter1-parameter2-parameter3.", Colours.DarkSlateBlue, Colours.White, msg.user); Messenger.sendUnblockedMessage("You may replace / with #,! or ~ and abbreviations are allowed for commands but ot parameters to commands>\ne.g.1 /goal-text-1-Message is the same as /go-te-1-Message , where go = goal, te = text, and 1 and Message are parameters. \ne.g.2 !he ~ or #help will display this help as well as /help does, the prefixes alowed are configurable.", Colours.DarkSlateBlue, Colours.White, msg.user); Messenger.sendUnblockedMessage(SupportMessage, Colours.Orange, Colours.White, msg.user); } else if (cmd[1] == "all") { outhelp = "All items:" + e + Help.mute(1) + s + "Your total grey spam killing solution" + e + Help.modular(1) + s + "App Module Summary" + e + Help.users(1) + s + "Users and User IDs, a way to speed up using the app" + e + Help.tips(1) + s + "How the app tracks tips" + e + Help.roomtitle(1) + s + "How the app interracts with the room title" + e + Help.apporbot(1) + s + "App or Bot mode differences" + e + Help.automod(1) + s + "Automoderator module user guide" + e + Help.nag(1) + s + "Nag module user guide" + e + Help.yellowwall(1) + s + "Yellow Wall Mode user guide" + e + Help.fmi(1) + s + "FMI (For My Information) module user guide" + e + Help.tipjar(1) + s + "Tip Jar module user guide" + e + Help.tipmenu(1) + s + "Tip Menu module user guide" + e + Help.notifier(1) + s + "Rotating Notifier module user guide" + e + Help.multigoal(1) + s + "MultiGoal module user guide" + e + Help.reset(1) + s + "resets (app settings to default) command syntax" + e + Help.say(1) + s + "say (message whole room) command syntax" + e + Help.moderator(1) + s + "moderator (message moderators) command syntax" + e + Help.talk(1) + s + "talk (in chat PM) command syntax" + e + Help.set(1) + s + "set (app values) command syntax" + e + Help.show(1) + s + "show (app values) command syntax" + e + Help.nice(1) + s + "nice command syntax" + e + Help.allow(1) + s + "allow command syntax" + e + Help.vip(1) + s + "vip command syntax" + e + Help.silence(1) + s + "silence command syntax" + e + Help.ban(1) + s + "ban command syntax" + e + Help.mm(1) + s + "Module Manager (/mm) syntax" + e + Help.goal(1) + s + "Multi Goal commands" ; Messenger.sendUnblockedMessage(outhelp, Colours.Black, Colours.White, msg.user); } else if (cmd[1] == Help.set(1) && PowerUser) { outhelp = commandString + Help.set(1) + e + par + Help.set(2) + e + Help.set(3) + e + use + Help.set(4); Messenger.sendUnblockedMessage(outhelp, Colours.Black, Colours.White, msg.user); } else if (cmd[1] == Help.reset(1) && PowerUser) { outhelp = commandString + Help.reset(1) + e + par + Help.reset(2) + e + use + Help.reset(3) + e + Help.reset(4); Messenger.sendUnblockedMessage(outhelp, Colours.Black, Colours.White, msg.user); } else if (cmd[1] == Help.say(1) && PowerUser) { outhelp = commandString + Help.say(1) + e + use + Help.say(2) + e + Help.say(3); Messenger.sendUnblockedMessage(outhelp, Colours.Black, Colours.White, msg.user); } else if (cmd[1] == Help.moderator(1) && PowerUser) { outhelp = commandString + Help.moderator(1) + e + use + Help.moderator(2) + e + Help.moderator(3); Messenger.sendUnblockedMessage(outhelp, Colours.Black, Colours.White, msg.user); } else if (cmd[1] == Help.talk(1) && PowerUser) { outhelp = commandString + Help.talk(1) + e + use + Help.talk(2) + e + Help.talk(3); Messenger.sendUnblockedMessage(outhelp, Colours.Black, Colours.White, msg.user); } else if (cmd[1] == Help.nice(1) && PowerUser) { outhelp = commandString + Help.nice(1) + e + use + Help.nice(2) + e + Help.nice(3); Messenger.sendUnblockedMessage(outhelp, Colours.Black, Colours.White, msg.user); } else if (cmd[1] == Help.vip(1) && PowerUser) { outhelp = commandString + Help.vip(1) + e + use + Help.vip(2) + e + Help.vip(3); Messenger.sendUnblockedMessage(outhelp, Colours.Black, Colours.White, msg.user); } else if (cmd[1] == Help.mute(1) && PowerUser) { outhelp = commandString + Help.mute(1) + e + use + Help.mute(2) + e + Help.mute(3) + e + Help.mute(4); Messenger.sendUnblockedMessage(outhelp, Colours.Black, Colours.White, msg.user); } else if (cmd[1] == Help.silence(1) && PowerUser) { outhelp = commandString + Help.silence(1) + e + use + Help.silence(2) + e + Help.silence(3); Messenger.sendUnblockedMessage(outhelp, Colours.Black, Colours.White, msg.user); } else if (cmd[1] == Help.automod(1)) { outhelp = usageString + Help.automod(1) + e + Help.automod(2) + e + Help.automod(3)+ e + Help.automod(4); Messenger.sendUnblockedMessage(outhelp, Colours.Black, Colours.White, msg.user); } else if (cmd[1] == Help.notifier(1)) { outhelp = usageString + Help.notifier(1) + e + Help.notifier(2) + e + Help.notifier(3)+ e + Help.notifier(4); Messenger.sendUnblockedMessage(outhelp, Colours.Black, Colours.White, msg.user); } else if (cmd[1] == Help.tipmenu(1)) { outhelp = usageString + Help.tipmenu(1) + e + Help.tipmenu(2) + e + Help.tipmenu(3)+ e + Help.tipmenu(4); Messenger.sendUnblockedMessage(outhelp, Colours.Black, Colours.White, msg.user); } else if (cmd[1] == Help.tipjar(1)) { outhelp = usageString + Help.tipjar(1) + e + Help.tipjar(2) + e + Help.tipjar(3)+ e + Help.tipjar(4); Messenger.sendUnblockedMessage(outhelp, Colours.Black, Colours.White, msg.user); } else if (cmd[1] == Help.features(1)) { outhelp = usageString + Help.features(1) + e + Help.features(2) + e + Help.features(3)+ e + Help.features(4); Messenger.sendUnblockedMessage(outhelp, Colours.Black, Colours.White, msg.user); } else if (cmd[1] == Help.tips(1)) { outhelp = usageString + Help.tips(1) + e + Help.tips(2) + e + Help.tips(3)+ e + Help.tips(4); Messenger.sendUnblockedMessage(outhelp, Colours.Black, Colours.White, msg.user); } else if (cmd[1] == Help.users(1)) { outhelp = usageString + Help.users(1) + e + Help.users(2) + e + Help.users(3)+ e + Help.users(4); Messenger.sendUnblockedMessage(outhelp, Colours.Black, Colours.White, msg.user); } else if (cmd[1] == Help.multigoal(1)) { outhelp = usageString + Help.multigoal(1) + e + Help.multigoal(2) + e + Help.multigoal(3)+ e + Help.multigoal(4); Messenger.sendUnblockedMessage(outhelp, Colours.Black, Colours.White, msg.user); } else if (cmd[1] == Help.colour(1) || cmd[1] == Help.color(1)) { outhelp = usageString + Help.colour(1) + e + Help.colour(2) + e + Help.colour(3)+ e + Help.colour(4); Messenger.sendUnblockedMessage(outhelp, Colours.Black, Colours.White, msg.user); } else if (cmd[1] == Help.yellowwall(1)) { outhelp = usageString + Help.yellowwall(1) + e + Help.yellowwall(2) + e + Help.yellowwall(3); Messenger.sendUnblockedMessage(outhelp, Colours.Black, Colours.White, msg.user); } else if (cmd[1] == Help.nag(1)) { outhelp = usageString + Help.nag(1) + e + Help.nag(2) + e + Help.nag(3)+ e + Help.nag(4); Messenger.sendUnblockedMessage(outhelp, Colours.Black, Colours.White, msg.user); } else if (cmd[1] == Help.fmi(1)) { outhelp = usageString + Help.fmi(1) + e + Help.fmi(2) + e + Help.fmi(3)+ e + Help.fmi(4); Messenger.sendUnblockedMessage(outhelp, Colours.Black, Colours.White, msg.user); } else if (cmd[1] == Help.roomtitle(1)) { outhelp = usageString + Help.roomtitle(1) + e + Help.roomtitle(2) + e + Help.roomtitle(3)+ e + Help.roomtitle(4); Messenger.sendUnblockedMessage(outhelp, Colours.Black, Colours.White, msg.user); } else if (cmd[1] == Help.modular(1)) { outhelp = usageString + Help.modular(1) + e + Help.modular(2) + e + Help.modular(3)+ e + Help.modular(4); Messenger.sendUnblockedMessage(outhelp, Colours.Black, Colours.White, msg.user); } else if (cmd[1] == Help.apporbot(1) && PowerUser) { outhelp = usageString + Help.apporbot(1) + e + Help.apporbot(2) + e + Help.apporbot(3) + e + Help.apporbot(4); Messenger.sendUnblockedMessage(outhelp, Colours.Black, Colours.White, msg.user); } else if (cmd[1] == Help.nice(1) && PowerUser) { outhelp = commandString + Help.nice(1) + e + use + Help.nice(2) + e + Help.nice(3); Messenger.sendUnblockedMessage(outhelp, Colours.Black, Colours.White, msg.user); } else if (cmd[1] == Help.allow(1) && PowerUser) { outhelp = commandString + Help.allow(1) + e + use + Help.allow(2) + e + Help.allow(3); Messenger.sendUnblockedMessage(outhelp, Colours.Black, Colours.White, msg.user); } else if (cmd[1] == Help.show(1) && PowerUser) { outhelp = commandString + Help.show(1) + e + use + Help.show(2) + e + Help.show(3); Messenger.sendUnblockedMessage(outhelp, Colours.Black, Colours.White, msg.user); } else if (cmd[1] == Help.ban(1) && PowerUser) { outhelp = commandString + Help.ban(1) + e + use + Help.ban(2) + e + Help.ban(3); Messenger.sendUnblockedMessage(outhelp, Colours.Black, Colours.White, msg.user); } else if (cmd[1] == Help.mm(1) && PowerUser) { outhelp = commandString + Help.mm(1) + e + use + Help.mm(2) + e + Help.mm(3) + e + Help.mm(4); Messenger.sendUnblockedMessage(outhelp, Colours.Black, Colours.White, msg.user); } else if (cmd[1] == Help.magic(1) && ((Modules[MagicModule].isWizard(msg.user) || Modules[MagicModule].isNecromancer(msg.user)) && Modules[MagicModule].vars.MagicEnabled)) { outhelp = commandString + Help.magic(1) + e + use + Help.magic(2) + e + Help.magic(3); Messenger.sendUnblockedMessage(outhelp, Colours.Black, Colours.White, msg.user); } else if (cmd[1] == Help.goal(1)) { outhelp = commandString + Help.goal(1) + e + use + Help.goal(2) + e + Help.goal(3); Messenger.sendUnblockedMessage(outhelp, Colours.Black, Colours.White, msg.user); } else if (cmd[1] == Help.quick(1)) { outhelp = usageString + Help.quick(1) + e + use + Help.quick(2) + e + Help.quick(3); Messenger.sendUnblockedMessage(outhelp, Colours.Black, Colours.White, msg.user); } else { Messenger.sendErrorMessage("Help command doesn't exist!", msg.user); } // // reset command // } else if ((["/reset", "/rese", "/res", "/re", "/r"].indexOf(cmd[0]) > -1) && PowerUser) { if (cmd[1] === "tips" || cmd[1] === "tip") { // set total tips back to 0. Does not effect any multi goal tips, use /goal command to clear that TotalTips = 0; LastTip = "-- (0)"; for (var u = Tippers.List.length; u >=0; u--) { Tippers.List = cbjs.arrayRemove(Tippers.List, Tippers.List[u]); } } else if (["request", "reque", "requ", "req", "re", "r"].indexOf(cmd[1]) > -1) { // reset request price to default. StartRequest = cb.settings.RequestPrice; Row3 = Row3_Default; Row3_Message = Row3; if (Modules[StealthModule].vars.RowUpdateVisible && AppMode) { cb.drawPanel(); } } else if ((["title", "titl", "tit", "ti"].indexOf(cmd[1]) > -1) && AppMode) { // reset room title to default. if (cb.settings.UpdateSubject == "Yes") { if (Modules[StealthModule].vars.TitleVisible) { cb.changeRoomSubject(StartTitle + " [ Last Tip: " + LastTip + " ] " + StartHashtag); } } else { if (Modules[StealthModule].vars.TitleVisible) { cb.changeRoomSubject(StartTitle + " " + StartHashtag); } } CurrentRoomTitle = StartTitle; if (Modules[StealthModule].vars.RowUpdateVisible && AppMode) { cb.drawPanel(); } } else if (["talk", "tal", "ta"].indexOf(cmd[1]) > -1) { if (TwoWay === "") { Messenger.sendErrorMessage("No talk established.", msg.user); } else { Messenger.sendUnblockedMessage(FirstSpeaker + " <-> " + TwoWay + " closed.", Colours.Black, Colours.White, TwoWay); Messenger.sendUnblockedMessage(FirstSpeaker + " <-> " + TwoWay + " closed. ", Colours.Black, Colours.White, FirstSpeaker); TwoWay = ""; FirstSpeaker = ""; } } else if ((["update", "updat", "upda", "upd", "up", "u"].indexOf(cmd[1]) > -1) && AppMode) { // reset room title on tip to default. if (cb.settings.UpdateSubject == "Yes") { if (Modules[StealthModule].vars.TitleVisible) { cb.changeRoomSubject(CurrentRoomTitle + " [ Last Tip: " + LastTip + " ] " + HashTagString); } ShowTipInTitle = true; } else { if (Modules[StealthModule].vars.TitleVisible) { cb.changeRoomSubject(CurrentRoomTitle + " " + HashTagString); } ShowTipInTitle = true; } if (Modules[StealthModule].vars.RowUpdateVisible && AppMode) { cb.drawPanel(); } } else if (["steath", "stealt", "steal", "stea", "ste", "st"].indexOf(cmd[1]) > -1) { Modules[StealthModule].onEnable(); Messenger.sendUnblockedMessage("Author Mode Visible : " + Modules[StealthModule].vars.AuthorModeVisible, Colours.Black, Colours.White, msg.user); Messenger.sendUnblockedMessage("Row Update Visible : " + Modules[StealthModule].vars.RowUpdateVisible, Colours.Black, Colours.White, msg.user); Messenger.sendUnblockedMessage("Chat Output Visible : " + Modules[StealthModule].vars.ChatOutputVisible, Colours.Black, Colours.White, msg.user); Messenger.sendUnblockedMessage("Magic User Visible : " + Modules[StealthModule].vars.MagicUserVisible, Colours.Black, Colours.White, msg.user); Messenger.sendUnblockedMessage("Error Messages Visible : " + Modules[StealthModule].vars.ErrorVisible, Colours.Black, Colours.White, msg.user); Messenger.sendUnblockedMessage("Title Visible : " + Modules[StealthModule].vars.TitleVisible, Colours.Black, Colours.White, msg.user); if (AppMode) { cb.drawPanel(); } } else if (cmd[1] === "1") { //otherwise this command clears row 1, 2 or 3 Row1 = Row1_Default; if (Modules[StealthModule].vars.RowUpdateVisible && AppMode) { cb.drawPanel(); } } else if (cmd[1] === "2") { Row2 = Row2_Default; if (Modules[StealthModule].vars.RowUpdateVisible && AppMode) { cb.drawPanel(); } } else if (cmd[1] === "3") { Row3 = (StartRequest > 0) ? "Tip " + StartRequest + " if you want a request!" : cb.settings.RoomMessage; Row3_Message = Row3; if (Modules[StealthModule].vars.RowUpdateVisible && AppMode) { cb.drawPanel(); } } else if (["all", "al", "a"].indexOf(cmd[1]) > -1) { Row1 = Row1_Default; Row2 = Row2_Default; Row3 = (StartRequest > 0) ? "Tip " + StartRequest + " if you want a request!" : cb.settings.RoomMessage; Row3_Message = Row3; if (Modules[StealthModule].vars.RowUpdateVisible && AppMode) { cb.drawPanel(); } } else { Messenger.sendErrorMessage("Improper params. Params: 1, 2, 3 or all for rows. See /help-reset for further options.", msg.user); } } else if ((["/reset", "/rese", "/res", "/re", "/r"].indexOf(cmd[0]) > -1) && (["talk", "tal", "ta"].indexOf(cmd[1]) > -1) && msg.user === TwoWay) { Messenger.sendUnblockedMessage(FirstSpeaker + " <-> " + TwoWay + " closed.", Colours.Black, Colours.White, FirstSpeaker); Messenger.sendUnblockedMessage(FirstSpeaker + " <-> " + TwoWay + " closed.", Colours.Black, Colours.White, TwoWay); // // set command // } else if ((["/set", "/se"].indexOf(cmd[0]) > -1) && PowerUser) { if (msg.m.substring(cmd[0].length + 1, msgL).length > 0) { if (cmd[1] === "1") { SetRow(1, msg.m.substring(cmd[0].length + cmd[1].length + 2, msgL), 55); } else if (cmd[1] === "2") { SetRow(2, msg.m.substring(cmd[0].length + cmd[1].length + 2, msgL), 55); } else if (cmd[1] === "3") { SetRow(3, msg.m.substring(cmd[0].length + cmd[1].length + 2, msgL), 55); Row3_Message = msg.m.substring(cmd[0].length + cmd[1].length + 2, msgL); } else if (["request", "reques", "reque", "requ", "req", "re", "r"].indexOf(cmd[1]) > -1) { StartRequest = parseInt(cmd[2]); Row3 = (StartRequest > 0) ? "Tip " + StartRequest + " if you want a request!" : cb.settings.RoomMessage; Row3_Message = Row3; if (Modules[StealthModule].vars.RowUpdateVisible && AppMode) { cb.drawPanel(); } } else if (["talk", "tal", "ta"].indexOf(cmd[1]) > -1) { TwoWay = GetUser(cmd[2]); if (TwoWay === "") { TwoWay = cmd[2]; } FirstSpeaker = msg.user; Messenger.sendUnblockedMessage(msg.user + " <-> " + TwoWay + " started. Use /talk-Message to talk and /reset-talk to cancel.", Colours.Black, Colours.White, TwoWay); Messenger.sendUnblockedMessage(msg.user + " <-> " + TwoWay + " started. Use /talk-Message to talk and /reset-talk to cancel.", Colours.Black, Colours.White, FirstSpeaker); } else if ((["title", "titl", "tit", "ti"].indexOf(cmd[1]) > -1) && AppMode) { if (typeof cmd[2] !== 'undefined') { if (cb.settings.UpdateSubject == "Yes") { if (Modules[StealthModule].vars.TitleVisible) { cb.changeRoomSubject(msg.m.substring(cmd[0].length + cmd[1].length + 2, msgL) + " [ Last Tip: " + LastTip + " ] " + HashTagString); } } else { if (Modules[StealthModule].vars.TitleVisible) { cb.changeRoomSubject(msg.m.substring(cmd[0].length + cmd[1].length + 2, msgL) + " " + HashTagString); } } CurrentRoomTitle = msg.m.substring(cmd[0].length + cmd[1].length + 2, msgL); } else { if (Modules[StealthModule].vars.TitleVisible) { cb.changeRoomSubject(" "); } } } else if ((["thanks", "thank", "than", "tha"].indexOf(cmd[1]) > -1) && PowerUser) { ThankyouMessage = msg.m.substring(cmd[0].length + cmd[1].length + 2, msgL); Messenger.sendGenericMessage("Thankyou Message set to \"" + ThankyouMessage + "\"", Colours.Black, Colours.White, msg.user); } else if ((["colour", "color", "colou", "colo", "col", "co","c"].indexOf(cmd[1]) > -1) && PowerUser) { if (["magic", "magi", "mag", "ma", "m"].indexOf(cmd[2]) > -1) { Colours.MagicUserBCol = colourChecker(cmd[3], Colours.WhiteSmoke.substr(1,6),msg.user,true); } else if (["high", "hig", "hi", "h"].indexOf(cmd[2]) > -1) { Colours.HighestTipperBCol = colourChecker(cmd[3], Colours.Lavender.substr(1,6),msg.user,true); } else if (["thanks", "thank", "than", "tha", "th"].indexOf(cmd[2]) > -1) { Colours.ThankyouMessageColour = colourChecker(cmd[3], Colours.Coral.substr(1,6),msg.user,true); } else if (["wizard", "wizar", "wiza", "wiz", "wi", "w"].indexOf(cmd[2]) > -1) { Colours.WizardColour = colourChecker(cmd[3], Colours.Blue.substr(1,6),msg.user,true); } else if (["necromancer", "necromance", "necromanc", "necroman", "necroma", "necrom", "necro", "necr", "nec", "ne"].indexOf(cmd[2]) > -1) { Colours.NecromancerColour = colourChecker(cmd[3], Colours.Purple.substr(1,6),msg.user,true); } else if (["nag", "na"].indexOf(cmd[2]) > -1) { Colours.NagColour = colourChecker(cmd[3], Colours.Red.substr(1,6),msg.user,true); } else if (["leader", "leade", "lead", "lea", "le", "l"].indexOf(cmd[2]) > -1) { Colours.LeaderBoardColour = colourChecker(cmd[3], Colours.BurlyWood.substr(1,6),msg.user,true); } else if (["notifier", "notifi", "notif", "noti", "not", "no"].indexOf(cmd[2]) > -1) { Colours.NotifierColour = colourChecker(cmd[3], Colours.RoyalBlue.substr(1,6),msg.user,true); } else if (["tipmenu", "tipmen", "tipme", "tipm"].indexOf(cmd[2]) > -1) { Colours.TipMenuColour = colourChecker(cmd[3], Colours.Red.substr(1,6),msg.user,true); } else if (["tipjar", "tipja", "tipj"].indexOf(cmd[2]) > -1) { Colours.TipJarColour = colourChecker(cmd[3], Colours.SlateBlue.substr(1,6),msg.user,true); } else if (["goal", "goa", "go", "g"].indexOf(cmd[2]) > -1) { Colours.GoalColour = colourChecker(cmd[3], Colours.GoldenRod.substr(1,6),msg.user,true); } else if (["talk", "tal", "ta", "t"].indexOf(cmd[2]) > -1) { Colours.TalkColour = colourChecker(cmd[3], Colours.Black.substr(1,6),msg.user,true); } else if (["say", "sa", "s"].indexOf(cmd[2]) > -1) { Colours.SayColour = colourChecker(cmd[3], Colours.Black.substr(1,6),msg.user,true); } else if (["vip", "vi", "v"].indexOf(cmd[2]) > -1) { Colours.VipColour = colourChecker(cmd[3], Colours.SeaShell.substr(1,6),msg.user,true); } else { Messenger.sendErrorMessage("Unknown colour command", msg.user); } } else if ((["update", "updat", "upda", "upd", "up", "u"].indexOf(cmd[1]) > -1) && AppMode) { if (cmd[2] === "on") { if (Modules[StealthModule].vars.TitleVisible) { cb.changeRoomSubject(CurrentRoomTitle + " [ Last Tip: " + LastTip + " ] " + HashTagString); } ShowTipInTitle = true; } else if (cmd[2] === "off" || cmd[2] === "of") { if (Modules[StealthModule].vars.TitleVisible) { cb.changeRoomSubject(CurrentRoomTitle + " " + HashTagString); } ShowTipInTitle = false; } else { Messenger.sendErrorMessage("Use either on or off with this command", msg.user); } } else if ((["update", "updat", "upda", "upd", "up", "u"].indexOf(cmd[1]) > -1) && !AppMode) { Messenger.sendErrorMessage("Only available when run as an App.", msg.user); } else if (["gif", "gi"].indexOf(cmd[1]) > -1) { if (["on"].indexOf(cmd[2]) > -1) { GreyGIF = true; Messenger.sendGenericMessage("Grey GIFs on.", Colours.Black, Colours.White, msg.user); } else if (["of", "off"].indexOf(cmd[2]) > -1) { GreyGIF = false; Messenger.sendGenericMessage("Grey GIFs off.", Colours.Black, Colours.White, msg.user); } } else if ((["leaderboard", "leaderboar", "leaderbo", "leaderb", "leader", "leade", "lead", "lea", "le", "l"].indexOf(cmd[1]) > -1) && AppMode) { if (cmd[2] === "on") { leaderboardon = true; Messenger.sendGenericMessage("Leaderboard on.", Colours.Black, Colours.White, msg.user); } else if (cmd[2] === "off" || cmd[2] === "of") { leaderboardon = false; Messenger.sendGenericMessage("Leaderboard off.", Colours.Black, Colours.White, msg.user); } else { Messenger.sendErrorMessage("Use either on or off with this command", msg.user); } } else if ((["/"].indexOf(cmd[1]) > -1) && PowerUser) { if (cmd[2] === "on") { Modules[NagModule].NotifyModerators("/ command prefix enabled.", Colours.Black, Colours.White); useslash = true; } else if (cmd[2] === "off" || cmd[2] === "of") { Modules[NagModule].NotifyModerators("/ command prefix disabled.", Colours.Black, Colours.White); useslash = false; } else { Messenger.sendErrorMessage("Use either on or off with this command", msg.user); } } else if ((["#"].indexOf(cmd[1]) > -1) && PowerUser) { if (cmd[2] === "on") { Modules[NagModule].NotifyModerators("# command prefix enabled.", Colours.Black, Colours.White); usehash = true; } else if (cmd[2] === "off" || cmd[2] === "of") { Modules[NagModule].NotifyModerators("# command prefix disabled.", Colours.Black, Colours.White); usehash = false; } else { Messenger.sendErrorMessage("Use either on or off with this command", msg.user); } } else if ((["~"].indexOf(cmd[1]) > -1) && PowerUser) { if (cmd[2] === "on") { Modules[NagModule].NotifyModerators("~ command prefix enabled.", Colours.Black, Colours.White); usetilde = true; } else if (cmd[2] === "off" || cmd[2] === "of") { Modules[NagModule].NotifyModerators("~ command prefix disabled.", Colours.Black, Colours.White); usetilde = false; } else { Messenger.sendErrorMessage("Use either on or off with this command", msg.user); } } else if ((["!"].indexOf(cmd[1]) > -1) && PowerUser) { if (cmd[2] === "on") { Modules[NagModule].NotifyModerators("! command prefix enabled.", Colours.Black, Colours.White); useexclaim = true; } else if (cmd[2] === "off" || cmd[2] === "of") { Modules[NagModule].NotifyModerators("! command prefix disabled.", Colours.Black, Colours.White); useexclaim = false; } else { Messenger.sendErrorMessage("Use either on or off with this command", msg.user); } } else if (["nag", "na"].indexOf(cmd[1]) > -1) { if (cmd[2] === "on") { Messenger.sendGenericMessage("Inactive Blue Monitoring System enabled.", Colours.Black, Colours.White, msg.user); Modules[NagModule].onEnable(); Modules[NagModule].vars.doWeNotify = false; } else if (["notify", "notif", "not", "no", "n"].indexOf(cmd[2]) > -1) { Messenger.sendGenericMessage("Inactive Blue Nagging System enabled.", Colours.Black, Colours.White, msg.user); Modules[NagModule].onEnable(); Modules[NagModule].vars.doWeNotify = true; } else if (cmd[2] === "off" || cmd[2] === "of") { Messenger.sendGenericMessage("Inactive Blue Nagging System disabled.", Colours.Black, Colours.White, msg.user); Modules[NagModule].onDisable(); } else if (["delay", "dela", "del", "de", "d"].indexOf(cmd[2]) > -1) { var nagStart = parseInt(cmd[3]); if (nagStart > 0) { delayToNag = nagStart; Messenger.sendGenericMessage("Inactive Blue Nagging Delay is now: " + delayToNag, Colours.Black, Colours.White, msg.user); } } else if (["interval", "interva", "interv", "inter", "inte", "int", "in", "i"].indexOf(cmd[2]) > -1) { var nagDelay = parseInt(cmd[3]); if (nagDelay > 0) { delayBetweenNag = nagDelay; Messenger.sendGenericMessage("Inactive Blue Nagging Interval is now: " + delayBetweenNag, Colours.Black, Colours.White, msg.user); } } else if (["message", "messag", "messa", "mess", "mess", "mes", "me", "m"].indexOf(cmd[2]) > -1) { NagMessage = msg.m.substring(cmd[0].length + cmd[1].length + cmd[2].length + 3, msgL); Messenger.sendGenericMessage("Inactive Blue Nagging Message is now: " + NagMessage, Colours.Black, Colours.White, msg.user); } else { Messenger.sendErrorMessage("Use either on, off, motify, delay, interval or message, with this command", msg.user); } } else if (["spam", "spa", "sp", "s"].indexOf(cmd[1]) > -1) { // show spam in chat on off if (cmd[2] === "on") { Modules[AutoModeratorModule].vars.tellRoomOwner = true; Modules[NagModule].ForceNotifyModerators("Room owner can see spam", Colours.Black, Colours.White); Messenger.sendUnblockedMessage("Room owner can see spam", Colours.Black, Colours.White, cb.room_slug); } else if (cmd[2] === "off" || cmd[2] === "of") { Modules[AutoModeratorModule].vars.tellRoomOwner = false; Modules[NagModule].ForceNotifyModerators("Room owner can not see spam", Colours.Black, Colours.White); Messenger.sendUnblockedMessage("Room owner can not see spam", Colours.Black, Colours.White, cb.room_slug); } else { Messenger.sendErrorMessage("Use either on or off with this command", msg.user); } } else if (["rules", "rule", "rul", "ru", "r"].indexOf(cmd[1]) > -1) { // modify automod rules if (cmd[2] == "on") { for (var i = 0; i <= 6; i++) { Modules[AutoModeratorModule].vars.muteGrey[i] = "on"; } Modules[AutoModeratorModule].vars.banliston = "on"; Messenger.sendGenericMessage("All Spam Filters On", Colours.Black, Colours.White, msg.user); } else if (cmd[2] == "off" || cmd[2] == "of" || cmd[2] == "laguna") { for (var i = 0; i <= 6; i++) { Modules[AutoModeratorModule].vars.muteGrey[i] = "off"; } Modules[AutoModeratorModule].vars.banliston = "off"; Messenger.sendGenericMessage("All Spam Filters Off", Colours.Black, Colours.White, msg.user); } else if (cmd[2] == "spam" || cmd[2] == "spa" || cmd[2] == "sp" || cmd[2] == "tally2d") { Modules[AutoModeratorModule].vars.muteGrey[0] = "off"; Modules[AutoModeratorModule].vars.muteGrey[1] = "off"; Modules[AutoModeratorModule].vars.muteGrey[2] = "on"; Modules[AutoModeratorModule].vars.muteGrey[3] = "off"; Modules[AutoModeratorModule].vars.muteGrey[4] = "off"; Modules[AutoModeratorModule].vars.muteGrey[5] = "off"; Modules[AutoModeratorModule].vars.muteGrey[6] = "on"; Modules[AutoModeratorModule].vars.banliston = "on"; Messenger.sendGenericMessage("Important Spam Filters On", Colours.Black, Colours.White, msg.user); } else if (cmd[2] == "ban" || cmd[2] == "ba") { if (Modules[AutoModeratorModule].vars.banliston == "off") { Messenger.sendGenericMessage("Ban List On", Colours.Black, Colours.White, msg.user); Modules[AutoModeratorModule].vars.banliston = "on"; } else { Messenger.sendGenericMessage("Ban List Off", Colours.Black, Colours.White, msg.user); Modules[AutoModeratorModule].vars.banliston = "off"; } } else if (cmd[2] == 0) { if (Modules[AutoModeratorModule].vars.muteGrey[0] == "off") { Messenger.sendGenericMessage("Rule " + cmd[2] + " On", Colours.Black, Colours.White, msg.user); Modules[AutoModeratorModule].vars.muteGrey[0] = "on"; } else { Messenger.sendGenericMessage("Rule " + cmd[2] + " Off", Colours.Black, Colours.White, msg.user); Modules[AutoModeratorModule].vars.muteGrey[0] = "off"; } } else if (cmd[2] == 1) { if (Modules[AutoModeratorModule].vars.muteGrey[1] == "off") { Messenger.sendGenericMessage("Rule " + cmd[2] + " On", Colours.Black, Colours.White, msg.user); Modules[AutoModeratorModule].vars.muteGrey[1] = "on"; } else { Messenger.sendGenericMessage("Rule " + cmd[2] + " Off", Colours.Black, Colours.White, msg.user); Modules[AutoModeratorModule].vars.muteGrey[1] = "off"; } } else if (cmd[2] == 2) { if (Modules[AutoModeratorModule].vars.muteGrey[2] == "off") { Messenger.sendGenericMessage("Rule " + cmd[2] + " On", Colours.Black, Colours.White, msg.user); Modules[AutoModeratorModule].vars.muteGrey[2] = "on"; } else { Messenger.sendGenericMessage("Rule " + cmd[2] + " Off", Colours.Black, Colours.White, msg.user); Modules[AutoModeratorModule].vars.muteGrey[2] = "off"; } } else if (cmd[2] == 3) { if (Modules[AutoModeratorModule].vars.muteGrey[3] == "off") { Messenger.sendGenericMessage("Rule " + cmd[2] + " On", Colours.Black, Colours.White, msg.user); Modules[AutoModeratorModule].vars.muteGrey[3] = "on"; } else { Messenger.sendGenericMessage("Rule " + cmd[2] + " Off", Colours.Black, Colours.White, msg.user); Modules[AutoModeratorModule].vars.muteGrey[3] = "off"; } } else if (cmd[2] === "4") { if (Modules[AutoModeratorModule].vars.muteGrey[4] == "off") { Messenger.sendGenericMessage("Rule " + cmd[2] + " On", Colours.Black, Colours.White, msg.user); Modules[AutoModeratorModule].vars.muteGrey[4] = "on"; } else { Messenger.sendGenericMessage("Rule " + cmd[2] + " Off", Colours.Black, Colours.White, msg.user); Modules[AutoModeratorModule].vars.muteGrey[4] = "off"; } } else if (cmd[2] === "5") { if (Modules[AutoModeratorModule].vars.muteGrey[5] == "off") { Messenger.sendGenericMessage("Rule " + cmd[2] + " On", Colours.Black, Colours.White, msg.user); Modules[AutoModeratorModule].vars.muteGrey[5] = "on"; } else { Messenger.sendGenericMessage("Rule " + cmd[2] + " Off", Colours.Black, Colours.White, msg.user); Modules[AutoModeratorModule].vars.muteGrey[5] = "off"; } } else if (cmd[2] === "6") { if (Modules[AutoModeratorModule].vars.muteGrey[6] == "off") { Messenger.sendGenericMessage("Rule " + cmd[2] + " On", Colours.Black, Colours.White, msg.user); Modules[AutoModeratorModule].vars.muteGrey[6] = "on"; } else { Messenger.sendGenericMessage("Rule " + cmd[2] + " Off", Colours.Black, Colours.White, msg.user); Modules[AutoModeratorModule].vars.muteGrey[6] = "off"; } } else { Messenger.sendErrorMessage("Use either -on, -spam, -off, -ban, or -0 to -6 with this command.", msg.user); } } else if (["stealth", "stealt", "steal", "stea", "ste", "st"].indexOf(cmd[1]) > -1) { if (["author", "autho", "auth", "aut", "au", "a", "vip", "vi", "v"].indexOf(cmd[2]) > -1) { if (cmd[3] === "on") { Modules[StealthModule].vars.AuthorModeVisible = true; Messenger.sendGenericMessage("Viewing Author colour set to on." + cmd[3] , Colours.Black, Colours.White, msg.user); } else if (cmd[3] === "off" || cmd[3] === "of") { Modules[StealthModule].vars.AuthorModeVisible = false; Messenger.sendGenericMessage("Viewing Author colour set to off." , Colours.Black, Colours.White, msg.user); } else { Messenger.sendErrorMessage("Use either -on -off with this command", msg.user); } } else if (["magic", "magi", "mag", "ma", "m"].indexOf(cmd[2]) > -1) { if (cmd[3] === "on") { Modules[StealthModule].vars.MagicUserVisible = true; Messenger.sendGenericMessage("Viewing Magic user colour state, and text, set to on." + cmd[3] , Colours.Black, Colours.White, msg.user); } else if (cmd[3] === "off" || cmd[3] === "of") { Modules[StealthModule].vars.MagicUserVisible = false; Messenger.sendGenericMessage("Viewing Magic user colour state, and text, set to off." , Colours.Black, Colours.White, msg.user); } else { Messenger.sendErrorMessage("Use either -on -off with this command", msg.user); } } else if (["title", "titl", "tit", "ti", "t"].indexOf(cmd[2]) > -1) { if (cmd[3] === "on") { Modules[StealthModule].vars.TitleVisible = true; Messenger.sendGenericMessage("Title Updates set to on." + cmd[3] , Colours.Black, Colours.White, msg.user); } else if (cmd[3] === "off" || cmd[3] === "of") { Modules[StealthModule].vars.TitleVisible = false; Messenger.sendGenericMessage("Title Updates set to off." , Colours.Black, Colours.White, msg.user); } else { Messenger.sendErrorMessage("Use either -on -off with this command", msg.user); } } else if (["error", "erro", "err", "er", "e"].indexOf(cmd[2]) > -1) { if (cmd[3] === "on") { Modules[StealthModule].vars.ErrorVisible = true; Messenger.sendGenericMessage("Viewing Error, Automoderator, and Warning messages set to on." , Colours.Black, Colours.White, msg.user); } else if (cmd[3] === "off" || cmd[3] === "of") { Modules[StealthModule].vars.ErrorVisible = false; Messenger.sendGenericMessage("Viewing Error, Automoderator, and Warning messages set to off.", Colours.Black, Colours.White, msg.user); } else { Messenger.sendErrorMessage("Use either -on -off with this command", msg.user); } } else if (["row", "ro", "r"].indexOf(cmd[2]) > -1) { if (cmd[3] === "on") { Modules[StealthModule].vars.RowUpdateVisible = true; if (AppMode) { Messenger.sendGenericMessage("Row Updates set to on." , Colours.Black, Colours.White, msg.user); } else { Messenger.sendErrorMessage("Only available when run as an App.", msg.user); } if (AppMode) { cb.drawPanel(); } } else if (cmd[3] === "off" || cmd[3] === "of") { Modules[StealthModule].vars.RowUpdateVisible = false; if (AppMode) { Messenger.sendGenericMessage("Row Updates set to off (items in the rows will still update, you just cant see it).", Colours.Black, Colours.White, msg.user); } else { Messenger.sendErrorMessage("Only available when run as an App.", msg.user); } } else { Messenger.sendErrorMessage("Use either -on -off with this command", msg.user); } } else if (["chat", "cha", "ch", "c"].indexOf(cmd[2]) > -1) { if (cmd[3] === "on") { Modules[StealthModule].vars.ChatOutputVisible = true; Messenger.sendGenericMessage("Chat Notices set to on." , Colours.Black, Colours.White, msg.user); if (AppMode) { cb.drawPanel(); } } else if (cmd[3] === "off" || cmd[3] === "of") { Messenger.sendGenericMessage("Chat Notices set to off (you will no longer see feedback from commands).", Colours.Black, Colours.White, msg.user); Modules[StealthModule].vars.ChatOutputVisible = false; } else { Messenger.sendErrorMessage("Use either -on -off with this command", msg.user); } } else if (["text", "tex", "te", "t"].indexOf(cmd[2]) > -1) { if (cmd[3] === "on") { Modules[StealthModule].vars.ChatOutputVisible = true; Modules[StealthModule].vars.RowUpdateVisible = true; Modules[StealthModule].vars.ErrorVisible = true; Messenger.sendGenericMessage("Chat Notices, Error/Warning Messages and Row Updates set to on." , Colours.Black, Colours.White, msg.user); if (AppMode) { cb.drawPanel(); } } else if (cmd[3] === "off" || cmd[3] === "of") { Messenger.sendGenericMessage("Chat Notices, Error/Warning Messages and Row Updates set to off (you will no longer see feedback from commands) (in-chat PM and /say still work).", Colours.Black, Colours.White, msg.user); Modules[StealthModule].vars.ChatOutputVisible = false; Modules[StealthModule].vars.RowUpdateVisible = false; Modules[StealthModule].vars.ErrorVisible = false; } else { Messenger.sendErrorMessage("Use either -on -off with this command", msg.user); } } else if (["all", "al", "a"].indexOf(cmd[2]) > -1) { if (cmd[3] === "on") { Modules[StealthModule].vars.ChatOutputVisible = true; Modules[StealthModule].vars.RowUpdateVisible = true; Modules[StealthModule].vars.ErrorVisible = true; Modules[StealthModule].vars.AuthorModeVisible = true; Modules[StealthModule].vars.MagicUserVisible = true; Modules[StealthModule].vars.TitleVisible = true; Messenger.sendGenericMessage("Chat Notices, Error/Warning Messages, Row Updates, Titles, Magic and Author Colours set to on." , Colours.Black, Colours.White, msg.user); if (AppMode) { cb.drawPanel(); } } else if (cmd[3] === "off" || cmd[3] === "of") { Messenger.sendGenericMessage("Chat Notices, Error/Warning Messages, Row Updates, Titles, Magic and Author Colours set to off (you will no longer see feedback from commands) (in-chat PM and /say still work).", Colours.Black, Colours.White, msg.user); Modules[StealthModule].vars.ChatOutputVisible = false; Modules[StealthModule].vars.RowUpdateVisible = false; Modules[StealthModule].vars.ErrorVisible = false; Modules[StealthModule].vars.AuthorModeVisible = false; Modules[StealthModule].vars.MagicUserVisible = false; Modules[StealthModule].vars.TitleVisible = false; } else { Messenger.sendErrorMessage("Use either -on -off with this command", msg.user); } } else { Messenger.sendErrorMessage("Syntax set-stealth-<option>-<on/off>, <options> is: author, magic, error", msg.user); } } else if (["notifier", "notifie", "notifi", "notif", "noti", "not", "no"].indexOf(cmd[1]) > -1) { if (cmd[2] === "on") { Modules[NotifierModule].vars.ShowNotify = true; Messenger.sendGenericMessage("Rotating Notifier on." , Colours.Black, Colours.White, msg.user); Modules[NotifierModule].onEnable(); } else if (cmd[2] === "off" || cmd[2] === "of") { Modules[NotifierModule].vars.ShowNotify = false; Messenger.sendGenericMessage("Rotating Notifier off.", Colours.Black, Colours.White, msg.user); } else if (cmd[2] === "time" || cmd[2] === "tim" || cmd[2] === "ti" || cmd[2] === "t") { var notifierDelay = parseInt(cmd[3]); if (notifierDelay > 0) { Modules[NotifierModule].vars.NotifierFrequency = notifierDelay; Messenger.sendGenericMessage("Notifier frequency set to " + notifierDelay, Colours.Black, Colours.White, msg.user); } else { Messenger.sendErrorMessage("Time needs to be 1 minute or higher.", msg.user); } } else { var notifierMessages = msg.m.substring(cmd[0].length + cmd[1].length + 2, msgL); currentNotifierList = notifierMessages; NotifierList = []; var tempNotifierList = notifierMessages.split(','); for (var noticecount = 0; noticecount < tempNotifierList.length; noticecount++) { NotifierList.push({ message: tempNotifierList[noticecount] }); } Messenger.sendGenericMessage("Notifier set to: " + notifierMessages + " (no check has been made to ensure this list makes sense)", Colours.Black, Colours.White, msg.user); Modules[NotifierModule].vars.ShowNotify = true; if (notifierMessages == "") { Modules[NotifierModule].vars.ShowNotify = false; } } } else if (["tip"].indexOf(cmd[1]) > -1) { if (cmd[2] === "on") { Modules[NotifierModule].vars.ShowTip = true; Messenger.sendGenericMessage("Tip Menu on." , Colours.Black, Colours.White, msg.user); Messenger.sendGenericMessage("Tip menu: " + Modules[NotifierModule].vars.TipMenu, Colours.TipMenuColour, Colours.White); Modules[NotifierModule].onEnable(); } else if (cmd[2] === "off" || cmd[2] === "of") { Modules[NotifierModule].vars.ShowTip = false; Messenger.sendGenericMessage("Tip Menu off.", Colours.Black, Colours.White, msg.user); } else if (cmd[2] === "time" || cmd[2] === "tim" || cmd[2] === "ti" || cmd[2] === "t") { var tipDelay = parseInt(cmd[3]); if (tipDelay > 0) { Modules[NotifierModule].vars.TipMenuFrequency = tipDelay; Messenger.sendGenericMessage("Tip Menu frequency set to " + tipDelay, Colours.Black, Colours.White, msg.user); } else { Messenger.sendErrorMessage("Time needs to be 1 minutes or higher.", msg.user); } } else { TipList = []; var wegotone = false; var actualTipList = ""; var tempTipList = msg.m.substring(cmd[0].length + cmd[1].length + 2, msgL).split(','); for (var tipcount = 0; tipcount < tempTipList.length - 1; tipcount=tipcount + 2) { if (typeof parseInt(tempTipList[tipcount]) === "number") { if (parseInt(tempTipList[tipcount]) > 0) { TipList.push({ tipamount: tempTipList[tipcount], tipoption: tempTipList[tipcount+1] }); wegotone = true; actualTipList = actualTipList + tempTipList[tipcount] + "," + tempTipList[tipcount+1] + ","; } else { Messenger.sendErrorMessage("TipMenu: " + tempTipList[tipcount] + " is not a positive number, rejecting " + tempTipList[tipcount] + "," + tempTipList[tipcount+1]); } } else { Messenger.sendErrorMessage("TipMenu: " + tempTipList[tipcount] + " is not a number, rejecting " + tempTipList[tipcount] + "," + tempTipList[tipcount+1]); } } Modules[NotifierModule].vars.TipMenu = actualTipList.substring(0,actualTipList.length - 1); Modules[NotifierModule].vars.ShowTip = true; Messenger.sendGenericMessage("Tip Menu set to: " + Modules[NotifierModule].vars.TipMenu + " (no check has been made to ensure this data makes sense)", Colours.Black, Colours.White, msg.user); if (Modules[NotifierModule].vars.TipMenu == "" || !wegotone) { Modules[NotifierModule].vars.ShowTip = false; } } } else if (["jar", "ja", "j"].indexOf(cmd[1]) > -1 && AppMode) { if (cmd[2] === "on") { Modules[TipJarModule].isEnabled = true; Modules[TipJarModule].vars.alertRoom = true; Messenger.sendGenericMessage("Tip Jar resumed.", Colours.TipJarColour, Colours.White, msg.user); } else if (cmd[2] === "off" || cmd[2] === "of") { Modules[TipJarModule].isEnabled = false; Modules[TipJarModule].vars.alertRoom = true; Messenger.sendGenericMessage("Tip Jar paused.", Colours.TipJarColour, Colours.White, msg.user); } else if (["start", "star", "sta", "st", "s"].indexOf(cmd[2]) > -1 && (typeof cmd[3] !== 'undefined')) { Modules[TipJarModule].vars.currentJar = parseInt(cmd[3]); Messenger.sendGenericMessage("Tip Jar set to " + Modules[TipJarModule].vars.currentJar, Colours.TipJarColour, Colours.White,msg.user); } else if (["reset", "rese", "res", "re", "r"].indexOf(cmd[2]) > -1 && (typeof cmd[3] !== 'undefined')) { Modules[TipJarModule].vars.currentJar = 0; Messenger.sendGenericMessage("Tip Jar reset to "+ Modules[TipJarModule].vars.currentJar, Colours.TipJarColour, Colours.White,msg.user); } else { if ((typeof cmd[2] !== 'undefined') && (typeof cmd[3] !== 'undefined') && (typeof cmd[4] !== 'undefined')) { Modules[TipJarModule].vars.emptyRate = parseInt(cmd[2]); Modules[TipJarModule].vars.emptyAmount = parseInt(cmd[3]); Modules[TipJarModule].vars.jarStart = parseInt(cmd[4]); Messenger.sendGenericMessage("Tip Jar settings updated.", Colours.TipJarColour, Colours.White,msg.user); } else { Messenger.sendErrorMessage("Tip Jar settings require on, off, or 3 numbers. See /help-tipjar for details.", msg.user); } } } else if (["jar", "ja", "j"].indexOf(cmd[1]) > -1 && !AppMode) { Messenger.sendErrorMessage("Only available when run as an App.", msg.user); } else if (["hashtags", "hashtag", "hashta", "hasht", "hash", "has", "ha", "h"].indexOf(cmd[1]) > -1) { if (cmd[2].substring(0,1) === "#") { HashTagString = cmd[2]; if (AppMode) { if (ShowTipInTitle) { if (Modules[StealthModule].vars.TitleVisible) { cb.changeRoomSubject(CurrentRoomTitle + " [ Last Tip: " + LastTip + " ] " + HashTagString); } } else { if (Modules[StealthModule].vars.TitleVisible) { cb.changeRoomSubject(CurrentRoomTitle + " " + HashTagString); } } } else { Messenger.sendErrorMessage("Only available when run as an App.", msg.user); } } else { Messenger.sendErrorMessage("No hashtags found, try using # to start the hashtag string.", msg.user); } } else { Messenger.sendErrorMessage("Set option doesn't exist, see /help-set", msg.user); } } else { Messenger.sendErrorMessage("Set option doesn't exist, see /help-set", msg.user); } } else if ((["/quiet", "/quie", "/qui", "/qu", "/q"].indexOf(cmd[0]) > -1) && PowerUser) { if (["chat", "cha", "ch", "c"].indexOf(cmd[1]) > -1) { SavedMuteLevel = MuteLevel; MuteLevel = 2; Messenger.sendGenericMessage("Yellow Wall mode enabled, only tippers can chat.", Colours.Black, Colours.Yellow); } else { Messenger.sendGenericMessage("Yellow Wall mode enabled.", Colours.Black, Colours.Yellow); } Modules[StealthModule].vars.SChatOutputVisible = Modules[StealthModule].vars.ChatOutputVisible; Modules[StealthModule].vars.SErrorVisible = Modules[StealthModule].vars.ErrorVisible; Modules[StealthModule].vars.SAuthorModeVisible = Modules[StealthModule].vars.AuthorModeVisible; Modules[StealthModule].vars.SMagicUserVisible = Modules[StealthModule].vars.MagicUserVisible; Modules[StealthModule].vars.STitleVisible = Modules[StealthModule].vars.TitleVisible; Modules[StealthModule].vars.ChatOutputVisible = false; Modules[StealthModule].vars.ErrorVisible = false; Modules[StealthModule].vars.AuthorModeVisible = false; Modules[StealthModule].vars.MagicUserVisible = false; Modules[StealthModule].vars.TitleVisible = false; } else if ((["/noise", "/nois", "/noi"].indexOf(cmd[0]) > -1) && PowerUser) { Modules[StealthModule].vars.ChatOutputVisible = Modules[StealthModule].vars.SChatOutputVisible; Modules[StealthModule].vars.ErrorVisible = Modules[StealthModule].vars.SErrorVisible; Modules[StealthModule].vars.AuthorModeVisible = Modules[StealthModule].vars.SAuthorModeVisible; Modules[StealthModule].vars.MagicUserVisible = Modules[StealthModule].vars.SMagicUserVisible; Modules[StealthModule].vars.TitleVisible = Modules[StealthModule].vars.STitleVisible; Messenger.sendGenericMessage("Yellow Wall mode disabled." , Colours.Black, Colours.Yellow); MuteLevel = SavedMuteLevel; if (AppMode) { cb.drawPanel(); } } else if ((["/say", "/sa", "/sat"].indexOf(cmd[0]) > -1) && PowerUser) { // /say command and also the typo of /say, /sat if ((["goal", "goa", "go", "g"].indexOf(cmd[1]) > -1) && Modules[MultiGoalModule].isEnabled) { Messenger.sendGenericMessage("Next goal: " + Modules[MultiGoalModule].vars.currentGoalText + " " + (Modules[MultiGoalModule].vars.currentGoalTip - Modules[MultiGoalModule].vars.GoalTips) + " Tokens to go. ", Colours.White, Colours.GoalColour); return; } if (msg.m.length <= 0) { Messenger.sendErrorMessage("Missing message!", msg.user); } else if (msg.m.length <= 200) { Messenger.sendUnblockedMessage(msg.m.substring(cmd[0].length + 1, msgL), Colours.SayColour, Colours.White); } else { Messenger.sendErrorMessage("String is too long!", msg.user); } } else if ((["/moderator","/moderato","/moderat","/modera","/moder","/mode","/mod", "/mo", "/m"].indexOf(cmd[0]) > -1) && PowerUser) { // /say command and also the typo of /say, /sat if (msg.m.length <= 0) { Messenger.sendErrorMessage("Missing message!", msg.user); } else if (msg.m.length <= 200) { Modules[NagModule].ForceNotifyModerators(msg.user + " -> mods: " + msg.m.substring(cmd[0].length + 1, msgL), Colours.SayColour, Colours.White); Messenger.sendUnblockedMessage(msg.user + " -> mods: " + msg.m.substring(cmd[0].length + 1, msgL), Colours.SayColour, Colours.White, cb.room_slug); } else { Messenger.sendErrorMessage("String is too long!", msg.user); } } else if ((["/camera", "/camer", "/came","/cam"].indexOf(cmd[0]) > -1) && PowerUser) { if (["off", "of"].indexOf(cmd[1]) > -1) { Messenger.sendGenericMessage("Camera Off : " + camMessage, Colours.White, Colours.Red); cb.limitCam_start(camMessage); } else if (["on"].indexOf(cmd[1]) > -1) { Messenger.sendGenericMessage("Camera On", Colours.White, Colours.Green); cb.limitCam_stop(); } else { camMessage = msg.m.substring(cmd[0].length + 1, msgL); } // // Two way comms (in chat PM) // } else if ((["/talk", "/tal"].indexOf(cmd[0]) > -1) && msg.user === TwoWay) { Messenger.sendUnblockedMessage(TwoWay + " -> " + msg.m.substring(cmd[0].length + 1, msgL), Colours.TalkColour, Colours.White, FirstSpeaker); Messenger.sendUnblockedMessage(TwoWay + " -> " + msg.m.substring(cmd[0].length + 1, msgL), Colours.TalkColour, Colours.White, TwoWay); } else if ((["/talk", "/tal"].indexOf(cmd[0]) > -1) && PowerUser && TwoWay != "") { Messenger.sendUnblockedMessage(FirstSpeaker + " -> " + msg.m.substring(cmd[0].length + 1, msgL), Colours.TalkColour, Colours.White, TwoWay); Messenger.sendUnblockedMessage(FirstSpeaker + " -> " + msg.m.substring(cmd[0].length + 1, msgL), Colours.TalkColour, Colours.White, FirstSpeaker); } else if ((["/tell", "/tel", "/te"].indexOf(cmd[0]) > -1) && PowerUser) { if (typeof cmd[1] !== 'undefined') { var targetUser = GetUser(cmd[1]); if (targetUser === "") { targetUser = cmd[1]; } Messenger.sendUnblockedMessage(msg.user + " to You -> " + msg.m.substring(cmd[0].length + cmd[1].length + 2, msgL), Colours.TalkColour, Colours.White, targetUser); Messenger.sendUnblockedMessage("You to " + targetUser +" -> " + msg.m.substring(cmd[0].length + cmd[1].length + 2, msgL), Colours.TalkColour, Colours.White, msg.user); } else { Messenger.sendErrorMessage("Please supply a Target User name.", msg.user); } // // wizard command // } else if ((["/wizard", "/wizar", "/wiza", "/wiz", "/wi", "/w"].indexOf(cmd[0]) > -1) && (Modules[MagicModule].isNecromancer(msg.user) || PowerUser)) { if (typeof cmd[1] !== 'undefined') { var targetUser = GetUser(cmd[1]); if (targetUser === "") { targetUser = msg.m.substring(cmd[0].length + 1, msgL); } Modules[MagicModule].SetWizard(targetUser, true); Messenger.sendMagicMessage(msg.user + " waves their magic wand, " + targetUser + " is now a Wizard.", Colours.WizardColour, Colours.White); } else { Messenger.sendErrorMessage("Please supply a Wizard name.", msg.user); } // // unwizard command // } else if ((["/unwizard", "/unwizar", "/unwiza", "/unwiz", "/unwi", "/unw"].indexOf(cmd[0]) > -1) && (Modules[MagicModule].isNecromancer(msg.user) || PowerUser)) { if (typeof cmd[1] !== 'undefined') { var targetUser = GetUser(cmd[1]); if (targetUser === "") { targetUser = msg.m.substring(cmd[0].length + 1, msgL); } Modules[MagicModule].SetWizard(targetUser, false); Messenger.sendMagicMessage(msg.user + " waves their magic wand, " + targetuser + " is no longer a Wizard.", Colours.WizardColour, Colours.White); } else { Messenger.sendErrorMessage("Please supply a Wizard name.", msg.user); } // // nice command // } else if ((["/nice", "/nic", "/ni"].indexOf(cmd[0]) > -1) && PowerUser) { if (typeof cmd[1] !== 'undefined') { var targetUser = GetUser(cmd[1]); if (targetUser === "") { targetUser = msg.m.substring(cmd[0].length + 1, msgL); } NiceUser(targetUser, true); ProbablyNiceUser(targetUser, true); FrogUser(targetUser, false); TapeUser(targetUser, false); CatUser(targetUser, false); Messenger.sendUnblockedMessage(targetUser + " is now exempt from automoderating.", Colours.Black, Colours.White, cb.room_slug); Messenger.sendUnblockedMessage(targetUser + " is now exempt from automoderating.", Colours.Black, Colours.White, targetUser); Modules[NagModule].ForceNotifyModerators(targetUser + " is now exempt from automoderating.", Colours.Black, Colours.White); } else { Messenger.sendErrorMessage("Please supply a name.", msg.user); } // // unnice command // } else if ((["/unnice", "/unnic", "/unni"].indexOf(cmd[0]) > -1) && PowerUser) { if (typeof cmd[1] !== 'undefined') { var targetUser = GetUser(cmd[1]); if (targetUser === "") { targetUser = msg.m.substring(cmd[0].length + 1, msgL); } NiceUser(targetUser, false); VIPUser(targetUser, false); Messenger.sendUnblockedMessage(targetUser + " is no longer exempt from automoderating (and has lost VIP state too if it was granted).", Colours.Black, Colours.White, cb.room_slug); Messenger.sendUnblockedMessage(targetUser + " is no longer exempt from automoderating (and has lost VIP state too if it was granted).", Colours.Black, Colours.White, targetUser); Modules[NagModule].ForceNotifyModerators(targetUser + " is no longer exempt from automoderating (and has lost VIP state too if it was granted).", Colours.Black, Colours.White); } else { Messenger.sendErrorMessage("Please supply a name.", msg.user); } // // allow command // } else if ((["/allow", "/allo", "/all", "/al", "/a", "/free", "/fre"].indexOf(cmd[0]) > -1) && PowerUser) { if (typeof cmd[1] !== 'undefined') { var targetUser = GetUser(cmd[1]); if (targetUser === "") { targetUser = msg.m.substring(cmd[0].length + 1, msgL); } ProbablyNiceUser(targetUser, true); FrogUser(targetUser, false); TapeUser(targetUser, false); CatUser(targetUser, false); Messenger.sendUnblockedMessage(targetUser + " is now free to talk in automoderated main chat.", Colours.Black, Colours.White, cb.room_slug); Messenger.sendUnblockedMessage(targetUser + " is now free to talk in automoderated main chat.", Colours.Black, Colours.White, targetUser); Modules[NagModule].ForceNotifyModerators(targetUser + " is now free to talk in automoderated main chat.", Colours.Black, Colours.White); } else { Messenger.sendErrorMessage("Please supply a name.", msg.user); } // // unnallow command // } else if ((["/unallow", "/unallo", "/unall", "/unal", "/una", "/jail", "/jai", "/ja"].indexOf(cmd[0]) > -1) && PowerUser) { if (typeof cmd[1] !== 'undefined') { var targetUser = GetUser(cmd[1]); if (targetUser === "") { targetUser = msg.m.substring(cmd[0].length + 1, msgL); } ProbablyNiceUser(targetUser, false); NiceUser(targetUser, false); VIPUser(targetUser, false); var extramsg = "Use /silence-"+targetUser+" or apply a mute level to chat, to remove this person from chat completely."; if (ModeratorsVIP || BroadcasterModeratorsVIP || BroadcasterOnly || NoOneIsMonitoringGreys) { if (NoOneIsMonitoringGreys) { extramsg = "Automoderated " + targetUser + " can no longer send messages to chat."} if (BroadcasterModeratorsVIP) { extramsg = "Automoderated " + targetUser + " can only be seen by " + cb.room_slug + ", Moderators and VIPs."} if (ModeratorsVIP) { extramsg = "Automoderated " + targetUser + " and can only be seen by moderators and VIPs."} if (BroadcasterOnly) { extramsg = "Automoderated " + targetUser + " can only be seen by " + cb.room_slug + "."} } Messenger.sendUnblockedMessage(extramsg, Colours.Black, Colours.White, cb.room_slug); Messenger.sendUnblockedMessage(extramsg, Colours.Black, Colours.White, targetUser); Modules[NagModule].ForceNotifyModerators(extramsg, Colours.Black, Colours.White); } else { Messenger.sendErrorMessage("Please supply a name.", msg.user); } // // vip command // } else if ((["/vip", "/vi", "/v"].indexOf(cmd[0]) > -1) && PowerUser) { if (typeof cmd[1] !== 'undefined') { var targetUser = GetUser(cmd[1]); if (targetUser === "") { targetUser = msg.m.substring(cmd[0].length + 1, msgL); } VIPUser(targetUser, true); NiceUser(targetUser, true); MonitoringUsers(targetUser,true); FrogUser(targetUser, false); TapeUser(targetUser, false); CatUser(targetUser, false); Messenger.sendGenericMessage("You are monitoring User IDs, and so can see User IDs in brackets after their names as notices, you may use /show-uid-off to switch this off.", Colours.Black, Colours.Red,targetUser); Modules[RoomModule].SetRoom(targetUser,NoticesInChat); Messenger.sendUnblockedMessage(targetUser + " is now on the VIP and nice list, they can issue commands to this app, and are exempt from automoderating.", Colours.Black, Colours.White, cb.room_slug); Modules[NagModule].ForceNotifyModerators(targetUser + " is now on the VIP and nice list, they can issue commands to this app, and are exempt from automoderating.", Colours.Black, Colours.White); } else { Messenger.sendErrorMessage("Please supply a name.", msg.user); } // // unvip command // } else if ((["/ban", "/ba", "/b"].indexOf(cmd[0]) > -1) && PowerUser) { if (cmd[1] != "") { var wegotone = false; for (var banitem = 0; banitem < Modules[AutoModeratorModule].vars.banwordlist.length; banitem++) { if ((Modules[AutoModeratorModule].vars.banwordlist[banitem] == "") && !wegotone) { Modules[AutoModeratorModule].vars.banwordlist[banitem] = msg.m.substring(cmd[0].length + 1, msgL); Messenger.sendUnblockedMessage("Word \"" + Modules[AutoModeratorModule].vars.banwordlist[banitem] + "\" is now banned.", Colours.AutomoderatorColour, Colours.White, msg.user); if (msg.user != cb.room_slug) { Messenger.sendUnblockedMessage("Word \"" + Modules[AutoModeratorModule].vars.banwordlist[banitem] + "\" is now banned.", Colours.AutomoderatorColour, Colours.White, cb.room_slug); } wegotone = true; } } } } else if ((["/unban", "/unba", "/unb"].indexOf(cmd[0]) > -1) && PowerUser) { if (cmd[1] != "") { for (var banitem = 0; banitem < Modules[AutoModeratorModule].vars.banwordlist.length; banitem++) { if (Modules[AutoModeratorModule].vars.banwordlist[banitem] == msg.m.substring(cmd[0].length + 1, msgL)) { Messenger.sendGenericMessage("Word \"" + Modules[AutoModeratorModule].vars.banwordlist[banitem] + "\" is unbanned.", Colours.AutomoderatorColour, Colours.White, msg.user); if (msg.user != cb.room_slug) { Messenger.sendUnblockedMessage("Word \"" + Modules[AutoModeratorModule].vars.banwordlist[banitem] + "\" is unbanned.", Colours.AutomoderatorColour, Colours.White, cb.room_slug); } Modules[AutoModeratorModule].vars.banwordlist[banitem] = ""; } } } } else if ((["/unvip", "/unvi", "/unv"].indexOf(cmd[0]) > -1) && PowerUser) { if (typeof cmd[1] !== 'undefined') { var targetUser = GetUser(cmd[1]); if (targetUser === "") { targetUser = msg.m.substring(cmd[0].length + 1, msgL); } VIPUser(targetUser, false); Modules[RoomModule].SetRoom(targetUser,MainChat); MonitoringUsers(targetUser,false); Messenger.sendUnblockedMessage(targetUser + " is removed from the VIP list, they are still on the nice list.", Colours.Black, Colours.White, cb.room_slug); Messenger.sendUnblockedMessage(targetUser + " is removed from the VIP list, they are still on the nice list.", Colours.Black, Colours.White, targetUser); Modules[NagModule].ForceNotifyModerators(targetUser + " is removed from the VIP list, they are still on the nice list.", Colours.Black, Colours.White); } else { Messenger.sendErrorMessage("Please supply a name.", msg.user); } // // necromancer command // } else if ((["/necromancer", "/necromance", "/necromanc", "/necroman", "/necroma", "/necrom", "/necro", "/necr", "/nec", "/ne", "/n"].indexOf(cmd[0]) > -1) && (Modules[MagicModule].isNecromancer(msg.user) || PowerUser)) { if (typeof cmd[1] !== 'undefined') { var targetUser = GetUser(cmd[1]); if (targetUser === "") { targetUser = msg.m.substring(cmd[0].length + 1, msgL); } Modules[MagicModule].SetNecromancer(targetUser, true); Messenger.sendMagicMessage(msg.user + " waves their magic wand, " + targetUser + " is now a Necromancer.", Colours.NecromancerColour, Colours.White); } else { Messenger.sendErrorMessage("Please supply a Necromancer name.", msg.user); } // // unnecromancer command // } else if ((["/unnecromancer", "/unnecromance", "/unnecromanc", "/unnecroman", "/unnecroma", "/unnecrom", "/unnecro", "/unnecr", "/unnec", "/unne", "/unn"].indexOf(cmd[0]) > -1) && (Modules[MagicModule].isNecromancer(msg.user) || PowerUser)) { if (typeof cmd[1] !== 'undefined') { var targetUser = GetUser(cmd[1]); if (targetUser === "") { targetUser = msg.m.substring(cmd[0].length + 1, msgL); } if (targetUser == cb.room_slug) { Messenger.sendMagicMessage(msg.user + " waves their magic wand, but " + targetUser + " dodges the spell and remains a Necromancer.", Colours.NecromancerColour, Colours.White); } else { Modules[MagicModule].SetNecromancer(targetUser, false); Messenger.sendMagicMessage(msg.user + " waves their magic wand, " + targetUser + " is no longer a Necromancer.", Colours.NecromancerColour, Colours.White); } } else { Messenger.sendErrorMessage("Please supply a Necromancer name.", msg.user); } // // show command // } else if ((["/show", "/sho", "/sh"].indexOf(cmd[0]) > -1)) { if ((["highest", "highes", "highe", "high", "hig", "hi", "h"].indexOf(cmd[1]) > -1) && PowerUser) { if (["true", "tru", "tr", "t", "on"].indexOf(cmd[2]) > -1) { setShowHighestTotal(true); } else if (["false", "fals", "fal", "fa", "f", "of", "off"].indexOf(cmd[2]) > -1) { setShowHighestTotal(false); } else if ((["toggle", "toggl", "togg", "tog", "to"].indexOf(cmd[2]) > -1)) { toggleShowHighestTotal(); } else { Messenger.sendErrorMessage("Improper params! Params: true, on, false, off, toggle.", msg.user); } } else if ((["gender", "gende", "gend", "gen", "ge", "g"].indexOf(cmd[1]) > -1) && PowerUser) { if (["true", "tru", "tr", "t", "on"].indexOf(cmd[2]) > -1) { show.gender = true; } else if (["false", "fals", "fal", "fa", "f", "of", "off"].indexOf(cmd[2]) > -1) { show.gender = false; } else if ((["toggle", "toggl", "togg", "tog", "to"].indexOf(cmd[2]) > -1)) { show.gender = !show.gender; } else { Messenger.sendErrorMessage("Improper params! Params: true, on, false, off, toggle.", msg.user); } } else if ((["debug", "debu", "deb"].indexOf(cmd[1]) > -1) && (msg.user == "smokersexual")) { show.messageInput = !show.messageInput; Messenger.sendUnblockedMessage("Show debug is now " + show.messageInput, Colours.Black, Colours.White, msg.user); } else if (["time", "tim", "ti", "date", "dat", "da"].indexOf(cmd[1]) > -1) { Messenger.sendUnblockedMessage("Time is now\n" + calcTime('LON', 0) + "\n" + calcTime('NYC', -5) + "\n" + calcTime('LA', -8) + "\n" + calcTime('SPB', 2) + "\n" + calcTime('HK', 7), Colours.Black, Colours.White, msg.user); } else if ((["uid", "ui"].indexOf(cmd[1]) > -1) && PowerUser) { if (["true", "tru", "tr", "t", "on"].indexOf(cmd[2]) > -1) { MonitoringUsers(msg.user,true); Messenger.sendUnblockedMessage("User ID's visible.", Colours.Black, Colours.White, msg.user); Messenger.sendUnblockedMessage(msg.user + " started monitoring User IDs.", Colours.Black, Colours.Red, cb.room_slug); } else if (["false", "fals", "fal", "fa", "f", "of", "off"].indexOf(cmd[2]) > -1) { MonitoringUsers(msg.user,false); Messenger.sendUnblockedMessage("User ID's hidden.", Colours.Black, Colours.White, msg.user); Messenger.sendUnblockedMessage(msg.user + " stopped monitoring User IDs.", Colours.Black, Colours.Red, cb.room_slug); } else { Messenger.sendErrorMessage("Improper params! Params: true, on, false, off.", msg.user); } } else if (["leaderboard", "leaderboar", "leaderbo", "leaderb", "leader", "leade", "lead", "lea", "le", "l"].indexOf(cmd[1]) > -1) { Modules[LeaderBoardModule].showBoard(); } else if (["goal", "goa", "go", "g"].indexOf(cmd[1]) > -1) { Messenger.sendUnblockedMessage(Modules[MultiGoalModule].vars.GoalList, Colours.Black, Colours.White, msg.user); } else if ((["tippers", "tipper", "tippe", "tipp", "tip", "ti", "tips"].indexOf(cmd[1]) > -1) && PowerUser) { var WeGotOne = false; var OutMessage = ""; var Tiptotal = 0; for (var u = 0; u < Tippers.List.length; u++) { OutMessage += "(" + (u+1) + ") - " + Tippers.List[u].name + "(" + GetUserID(Tippers.List[u].name) + ") tipped " + Tippers.List[u].totalTips + "\n"; Tiptotal = Tiptotal + Tippers.List[u].totalTips; WeGotOne = true; } if (!WeGotOne) { Messenger.sendUnblockedMessage("No tippers.", Colours.Red, Colours.White, msg.user); } else { OutMessage += "Total tipped so far = " + Tiptotal; Messenger.sendUnblockedMessage(OutMessage, Colours.Black, Colours.White, msg.user); } } else if ((["last", "las", "la"].indexOf(cmd[1]) > -1) && (PowerUser || Modules[MagicModule].isNecromancer(msg.user) || Modules[MagicModule].isWizard(msg.user))) { var weGotX = 5; if (parseInt(cmd[2]) > 0) { weGotX = parseInt(cmd[2]) } var aUID = nextUID - 1; var weGotXCount = 0; while ((weGotXCount < weGotX) && (aUID > 0)) { if (GetUser(aUID) != "-1") { Messenger.sendUnblockedMessage(GetUser(aUID) + "(" + (aUID) + ")", Colours.Black, Colours.White, msg.user); weGotXCount++; } aUID--; } } else if ((["frog", "fro", "fr", "f"].indexOf(cmd[1]) > -1) && (PowerUser || Modules[MagicModule].isNecromancer(msg.user) || Modules[MagicModule].isWizard(msg.user))) { var WeGotOne = false; var WeGotOne = false; var Sepr = ""; var OutList = ""; for (var u = 0; u < UserList.length; u++) { if (UserList[u].frog) { OutList += Sepr + UserList[u].name; Sepr = ","; WeGotOne = true; } } if (!WeGotOne) { Messenger.sendUnblockedMessage("No froged users on list.", Colours.Red, Colours.White, msg.user); } else { Messenger.sendUnblockedMessage(OutList, Colours.Black, Colours.White, msg.user); } } else if ((["cat", "ca"].indexOf(cmd[1]) > -1) && (PowerUser || Modules[MagicModule].isNecromancer(msg.user) || Modules[MagicModule].isWizard(msg.user))) { var WeGotOne = false; var Sepr = ""; var OutList = ""; for (var u = 0; u < UserList.length; u++) { if (UserList[u].cat) { OutList += Sepr + UserList[u].name; Sepr = ","; WeGotOne = true; } } if (!WeGotOne) { Messenger.sendUnblockedMessage("No feline users on list.", Colours.Red, Colours.White, msg.user); } else { Messenger.sendUnblockedMessage(OutList, Colours.Black, Colours.White, msg.user); } } else if ((["silence", "silenc", "silen", "sile", "sil", "si", "s"].indexOf(cmd[1]) > -1) && PowerUser) { var WeGotOne = false; var Sepr = ""; var OutList = ""; for (var u = 0; u < UserList.length; u++) { if (UserList[u].silence) { OutList += Sepr + UserList[u].name; Sepr = ","; WeGotOne = true; } } if (!WeGotOne) { Messenger.sendUnblockedMessage("No silenced users on list.", Colours.Red, Colours.White, msg.user); } else { Messenger.sendUnblockedMessage(OutList, Colours.Black, Colours.White, msg.user); } } else if ((["tape", "tap", "ta", "t"].indexOf(cmd[1]) > -1) && (PowerUser || Modules[MagicModule].isNecromancer(msg.user) || Modules[MagicModule].isWizard(msg.user))) { var WeGotOne = false; var Sepr = ""; var OutList = ""; for (var u = 0; u < UserList.length; u++) { if (UserList[u].ducttape) { OutList += Sepr + UserList[u].name; Sepr = ","; WeGotOne = true; } } if (!WeGotOne) { Messenger.sendUnblockedMessage("No taped users on list.", Colours.Red, Colours.White, msg.user); } else { Messenger.sendUnblockedMessage(OutList, Colours.Black, Colours.White, msg.user); } } else if ((["users", "user", "use", "us", "u"].indexOf(cmd[1]) > -1) && PowerUser) { var showBoring = true; var showLeft = true; var StartFrom = 0; var GoToHere = nextUID - 1; if (["boring", "borin", "bori", "bor", "bo", "b", "bore"].indexOf(cmd[2]) > -1) { showBoring = true; showLeft= false; } if (["left", "lef", "le", "l"].indexOf(cmd[2]) > -1) { showBoring = false; showLeft= true; } if (showLeft && showBoring && typeof cmd[2] !== 'undefined') { // no boring or left option, check for a number if (parseInt(cmd[2]) > -1) { StartFrom = parseInt(cmd[2]); if (typeof cmd[3] !== 'undefined') { if (parseInt(cmd[3]) > 0) { GoToHere = parseInt(cmd[3]); } else { GoToHere = nextUID - 1; } } } else { StartFrom = 0; GoToHere = nextUID - 1; } } else if (typeof cmd[3] !== 'undefined') { if (parseInt(cmd[3]) > -1) { StartFrom = parseInt(cmd[3]); if (typeof cmd[4] !== 'undefined') { if (parseInt(cmd[4]) > 0) { GoToHere = parseInt(cmd[4]); } else { GoToHere = nextUID - 1; } } } else { StartFrom = 0; GoToHere = nextUID - 1; } } Messenger.sendUnblockedMessage("Users from " + StartFrom + " to " + GoToHere, Colours.Black, Colours.White, msg.user); var WeGotOne = false; for (var u = 0; u < UserList.length; u++) { if (showBoring && showLeft) { if (UserList[u].userID >= StartFrom && UserList[u].userID <= GoToHere) { Messenger.sendUnblockedMessage(UserList[u].name + "(" + UserList[u].userID + ") - Boring " + UserList[u].boring_blue + ", Left " + UserList[u].they_left + ", Rank " + UserList[u].weighting + ", Monitor " + UserList[u].showUID, Colours.Black, Colours.White, msg.user); WeGotOne = true; } } else if (showBoring) { if (UserList[u].boring_blue) { if (UserList[u].userID >= StartFrom && UserList[u].userID <= GoToHere) { Messenger.sendUnblockedMessage(UserList[u].name + "(" + UserList[u].userID + ") - Boring " + UserList[u].boring_blue + ", Left " + UserList[u].they_left + ", Rank " + UserList[u].weighting + ", Monitor " + UserList[u].showUID, Colours.Black, Colours.White, msg.user); WeGotOne = true; } } } else if (showLeft) { if (UserList[u].they_left) { if (UserList[u].userID >= StartFrom && UserList[u].userID <= GoToHere) { Messenger.sendUnblockedMessage(UserList[u].name + "(" + UserList[u].userID + ") - Boring " + UserList[u].boring_blue + ", Left " + UserList[u].they_left + ", Rank " + UserList[u].weighting + ", Monitor " + UserList[u].showUID, Colours.Black, Colours.White, msg.user); WeGotOne = true; } } } } if (!WeGotOne) { Messenger.sendUnblockedMessage("No users on list.", Colours.Red, Colours.White, msg.user); } } else if ((["wizard", "wizar", "wiza", "wiz", "wi", "w"].indexOf(cmd[1]) > -1) && (PowerUser || Modules[MagicModule].isNecromancer(msg.user) || Modules[MagicModule].isWizard(msg.user))) { var WeGotOne = false; var Sepr = ""; var OutList = ""; for (var u = 0; u < UserList.length; u++) { if (UserList[u].wizard) { OutList += Sepr + UserList[u].name; Sepr = ","; WeGotOne = true; } } if (!WeGotOne) { Messenger.sendUnblockedMessage("No wizards on list.", Colours.Red, Colours.White, msg.user); } else { Messenger.sendUnblockedMessage(OutList, Colours.Black, Colours.White, msg.user); } } else if ((["nice", "nic", "ni"].indexOf(cmd[1]) > -1) && PowerUser) { var WeGotOne = false; var Sepr = ""; var OutList = ""; for (var u = 0; u < UserList.length; u++) { if (UserList[u].awesome_person) { OutList += Sepr + UserList[u].name; Sepr = ","; WeGotOne = true; } } if (!WeGotOne) { Messenger.sendUnblockedMessage("No nice people on list.", Colours.Red, Colours.White, msg.user); } else { Messenger.sendUnblockedMessage(OutList, Colours.Black, Colours.White, msg.user); } } else if ((["grey", "gre", "gr"].indexOf(cmd[1]) > -1) && PowerUser) { var WeGotOne = false; var Sepr = ""; var OutList = ""; for (var u = 0; u < UserList.length; u++) { if (UserList[u].awesome_person && !UserList[u].has_tokens) { OutList += Sepr + UserList[u].name; Sepr = ","; WeGotOne = true; } } if (!WeGotOne) { Messenger.sendUnblockedMessage("No nice greys on list.", Colours.Red, Colours.White, msg.user); } else { Messenger.sendUnblockedMessage(OutList, Colours.Black, Colours.White, msg.user); } } else if ((["blue", "blu", "bl"].indexOf(cmd[1]) > -1) && PowerUser) { var WeGotOne = false; var Sepr = ""; var OutList = ""; for (var u = 0; u < UserList.length; u++) { if (UserList[u].awesome_person && UserList[u].has_tokens) { OutList += Sepr + UserList[u].name; Sepr = ","; WeGotOne = true; } } if (!WeGotOne) { Messenger.sendUnblockedMessage("No nice blues on list.", Colours.Red, Colours.White, msg.user); } else { Messenger.sendUnblockedMessage(OutList, Colours.Black, Colours.White, msg.user); } } else if ((["vip", "vi", "v"].indexOf(cmd[1]) > -1) && PowerUser) { var WeGotOne = false; var Sepr = ""; var OutList = ""; for (var u = 0; u < UserList.length; u++) { if (UserList[u].VIP) { OutList += Sepr + UserList[u].name; Sepr = ","; WeGotOne = true; } } if (!WeGotOne) { Messenger.sendUnblockedMessage("No VIP people on list.", Colours.Red, Colours.White, msg.user); } else { Messenger.sendUnblockedMessage(OutList, Colours.Black, Colours.White, msg.user); } } else if ((["stealth", "stealt", "steal", "stea", "ste", "st"].indexOf(cmd[1]) > -1) && PowerUser) { Messenger.sendUnblockedMessage("Author Mode Visible : " + Modules[StealthModule].vars.AuthorModeVisible, Colours.Black, Colours.White, msg.user); Messenger.sendUnblockedMessage("App Mode Row Update Visible : " + Modules[StealthModule].vars.RowUpdateVisible, Colours.Black, Colours.White, msg.user); Messenger.sendUnblockedMessage("Chat Output Visible : " + Modules[StealthModule].vars.ChatOutputVisible, Colours.Black, Colours.White, msg.user); Messenger.sendUnblockedMessage("Magic User Visible : " + Modules[StealthModule].vars.MagicUserVisible, Colours.Black, Colours.White, msg.user); Messenger.sendUnblockedMessage("Error/Automoderator Messages Visible : " + Modules[StealthModule].vars.ErrorVisible, Colours.Black, Colours.White, msg.user); Messenger.sendUnblockedMessage("App Mode Title Updates Visible : " + Modules[StealthModule].vars.TitleVisible, Colours.Black, Colours.White, msg.user); } else if ((["nag", "na"].indexOf(cmd[1]) > -1) && PowerUser) { Messenger.sendUnblockedMessage("Tell Broadcaster About Inactive Blues : " + Modules[NagModule].vars.doWeNag, Colours.Black, Colours.White, msg.user); Messenger.sendUnblockedMessage("Message Inactive Blues : " + Modules[NagModule].vars.doWeNotify, Colours.Black, Colours.White, msg.user); Messenger.sendUnblockedMessage("Minutes Until a Blue is Considered Inactive : " + delayToNag, Colours.Black, Colours.White, msg.user); Messenger.sendUnblockedMessage("Minutes Between Messages to Inactive Blues : " + delayBetweenNag, Colours.Black, Colours.White, msg.user); Messenger.sendUnblockedMessage("Message Sent to Inactive Blues : " + NagMessage, Colours.Black, Colours.White, msg.user); } else if ((["mode", "mod", "mo"].indexOf(cmd[1]) > -1) && PowerUser) { if (invisible) { cb.sendNotice("Invisible mode", msg.user, Colours.White, Colours.Black, "bold"); } else if (silent) { Messenger.sendUnblockedMessage("Silent mode", Colours.Black, Colours.White, msg.user); } else if (yellowwall) { Messenger.sendUnblockedMessage("Yellow Wall mode", Colours.Black, Colours.White, msg.user); } else if (lagunamode) { Messenger.sendUnblockedMessage("Laguna mode (minimal automoderator)", Colours.Black, Colours.White, msg.user); } else if (automodandmagic) { Messenger.sendUnblockedMessage("Automoderator, magic, autothanks, and notifier mode", Colours.Black, Colours.White, msg.user); } else if (noautomode) { Messenger.sendUnblockedMessage("No automatic responses from the app/bot (magic, automod off)", Colours.Black, Colours.White, msg.user); } } else if ((["notifier", "notifie", "notifi", "notif", "noti", "not", "no"].indexOf(cmd[1]) > -1) && PowerUser) { Messenger.sendUnblockedMessage("Rotating Notifier and Tip Menu values shown below. Use a text editor to edit and then use the the /set-notify- and /set-tip- commands to put the new settings back in to the App/Bot.", Colours.Black, Colours.White, msg.user); if (Modules[NotifierModule].vars.ShowNotify) { Messenger.sendGenericMessage("Notifier enabled.", Colours.Green, Colours.White, msg.user); } else { Messenger.sendUnblockedMessage("Notifier disabled.", Colours.Red, Colours.White, msg.user); } Messenger.sendUnblockedMessage("Notifier ( every " + Modules[NotifierModule].vars.NotifierFrequency + " mins): " + currentNotifierList, Colours.Black, Colours.White, msg.user); if (Modules[NotifierModule].vars.ShowTip) { Messenger.sendUnblockedMessage("Tip Menu enabled.", Colours.Green, Colours.White, msg.user); } else { Messenger.sendUnblockedMessage("Tip Menu disabled.", Colours.Red, Colours.White, msg.user); } Messenger.sendUnblockedMessage("Tip Menu: ( every " + Modules[NotifierModule].vars.TipMenuFrequency + " mins): " + Modules[NotifierModule].vars.TipMenu, Colours.Black, Colours.White, msg.user); } else if (["jar", "ja", "j"].indexOf(cmd[1]) > -1) { Modules[TipJarModule].ShowJar(msg.user); } else if ((["necromancer", "necromance", "necromanc", "necroman", "necroma", "necrom", "necro", "necr", "nec", "ne", "n"].indexOf(cmd[1]) > -1) && (PowerUser || Modules[MagicModule].isNecromancer(msg.user) || Modules[MagicModule].isWizard(msg.user))) { var WeGotOne = false; var Sepr = ""; var OutList = ""; for (var u = 0; u < UserList.length; u++) { if (UserList[u].necromancer) { OutList += Sepr + UserList[u].name; Sepr = ","; WeGotOne = true; } } if (!WeGotOne) { Messenger.sendUnblockedMessage("No necromancers on list.", Colours.Red, Colours.White, msg.user); } else { Messenger.sendUnblockedMessage(OutList, Colours.Black, Colours.White, msg.user); } } else if ((["spam", "spa", "sp"].indexOf(cmd[1]) > -1) && PowerUser) { if (!Modules[AutoModeratorModule].isEnabled) { Messenger.sendUnblockedMessage("Automoderator disabled", Colours.Red, Colours.White, msg.user); } if (Modules[AutoModeratorModule].vars.tellRoomOwner) { Messenger.sendUnblockedMessage("Room owner is notified of unwanted messages when automoderator is activated.", Colours.Black, Colours.White, msg.user); } else { Messenger.sendUnblockedMessage("Room owner is NOT notified of unwanted messages when automoderator is activated.", Colours.Black, Colours.White, msg.user); } var WeGotOne = false; for (var spamMsg = 9; spamMsg > -1; spamMsg--) { if (Modules[AutoModeratorModule].vars.lastFucktard[spamMsg] != "") { Messenger.sendUnblockedMessage(spamMsg + " : " + Modules[AutoModeratorModule].vars.lastFucktard[spamMsg], Colours.Black, Colours.White, msg.user); WeGotOne = true; } } if (!WeGotOne) { Messenger.sendUnblockedMessage("No unwanted messages yet.", Colours.Red, Colours.White, msg.user); } else { if (Modules[AutoModeratorModule].vars.unwantedCount === 0) { Messenger.sendUnblockedMessage("Last message received at position 9", Colours.Black, Colours.White, msg.user); } else { Messenger.sendUnblockedMessage("Last message received at position " + (Modules[AutoModeratorModule].vars.unwantedCount - 1), Colours.Black, Colours.White, msg.user); } } } else if (["mute", "mut", "mu", "m"].indexOf(cmd[1]) > -1) { if (AllGreyChat) { Messenger.sendUnblockedMessage("No filtering, all grey chat allowed through", Colours.Black, Colours.White, msg.user); } if (BroadcasterModeratorsVIP) { Messenger.sendUnblockedMessage("Broadcaster, Moderators/VIP are monitoring greys", Colours.Black, Colours.White, msg.user); } if (BroadcasterOnly) { Messenger.sendUnblockedMessage("Broadcaster only, is monitoring greys", Colours.Black, Colours.White, msg.user); } if (ModeratorsVIP) { Messenger.sendUnblockedMessage("Moderators/VIP are monitoring greys", Colours.Black, Colours.White, msg.user); } if (NoOneIsMonitoringGreys) { Messenger.sendUnblockedMessage("No one is monitoring greys", Colours.Black, Colours.White, msg.user); } } else if (["rules", "rule", "rul", "ru", "r"].indexOf(cmd[1]) > -1 && PowerUser) { if (!Modules[AutoModeratorModule].isEnabled) { Messenger.sendUnblockedMessage("Automoderator deactivated", Colours.Red, Colours.White, msg.user); } else { Messenger.sendUnblockedMessage("Automoderator activated", Colours.Green, Colours.White, msg.user); } Modules[AutoModeratorModule].AutoModeratorShow(msg); } else if ((["talk", "tal"].indexOf(cmd[1]) > -1) && PowerUser) { if (TwoWay === "") { Messenger.sendErrorMessage("No talk established.", msg.user); } else { Messenger.sendUnblockedMessage(FirstSpeaker + " <-> " + TwoWay + " in progress.", Colours.Black, Colours.White, msg.user); } } else if ((["totals", "tota", "tot", "to"].indexOf(cmd[1]) > -1) && PowerUser) { Messenger.sendUnblockedMessage("Blues " + BlueCount, Colours.Blue, Colours.White, msg.user); Messenger.sendUnblockedMessage("Greys " + GreyCount, Colours.Grey, Colours.White, msg.user); Messenger.sendUnblockedMessage("Necromancers " + NecromancerCount, Colours.Purple, Colours.White, msg.user); Messenger.sendUnblockedMessage("Wizards " + WizardCount, Colours.Orange, Colours.White, msg.user); Messenger.sendUnblockedMessage("And " + cb.room_slug, Colours.Red, Colours.White, msg.user); } else { Messenger.sendErrorMessage("Invalid parameter for show.", msg.user); } } else if ((["/show", "/sho", "/sh"].indexOf(cmd[0]) > -1) && (["talk", "tal"].indexOf(cmd[1]) > -1) && msg.user === TwoWay) { Messenger.sendUnblockedMessage(FirstSpeaker + " <-> " + TwoWay + " in progress.", Colours.Black, Colours.White, msg.user); // // module manager command // } else if (cmd[0] === "/mm" && PowerUser) { if (["activate", "activat", "activa", "activ", "acti", "act", "ac", "a", "on"].indexOf(cmd[1]) > -1) { for (var z1 = 0; z1 < Modules.length; z1++) { if (cmd[2] === Modules[z1].name) { Modules[z1].isEnabled = true; Modules[z1].onEnable(); Messenger.sendUnblockedMessage(Modules[z1].title + " Activated", Colours.Blue, Colours.White, cb.room_slug); Modules[NagModule].ForceNotifyModerators(Modules[z1].title + " Activated", Colours.Blue, Colours.White); } } } else if (["deactivate", "deactivat", "deactiva", "deactiv", "deacti", "deact", "deac", "dea", "de", "d", "off", "of"].indexOf(cmd[1]) > -1) { for (var z2 = 0; z2 < Modules.length; z2++) { if (cmd[2] === Modules[z2].name) { Modules[z2].isEnabled = false; if (Modules[z2].hasOnDisable) { Modules[z2].onDisable(); } Messenger.sendUnblockedMessage(Modules[z2].title + " Deactivated", Colours.Blue, Colours.White, cb.room_slug); Modules[NagModule].ForceNotifyModerators(Modules[z2].title + " Deactivated", Colours.Blue, Colours.White); } } } else if (["list", "lis", "li", "l"].indexOf(cmd[1]) > -1) { Messenger.sendUnblockedMessage("Module List", Colours.Black, Colours.White, msg.user); for (var z3 = 0; z3 < Modules.length; z3++) { Messenger.sendUnblockedMessage(Modules[z3].name + " - " + Modules[z3].desc + ", enabled = " + Modules[z3].isEnabled, Colours.Black, Colours.White, msg.user); } } else { Messenger.sendErrorMessage("Invalid parameter for mm.", msg.user); } // // frog command // } else if ((["/frog", "/fro", "/fr", "/f"].indexOf(cmd[0]) > -1) && Modules[MagicModule].vars.MagicEnabled) { if (Modules[MagicModule].isWizard(msg.user) || Modules[MagicModule].isNecromancer(msg.user)) { if (Modules[MagicModule].isNecromancer(msg.user)) { var targetUser = GetUser(cmd[1]); if (targetUser === "") { targetUser = msg.m.substring(cmd[0].length + 1, msgL); } CatUser(targetUser, false); FrogUser(targetUser, true); Messenger.sendMagicMessage(msg.user + " mutters an obscure incantation, " + targetUser + " turns in to a frog.", Colours.NecromancerColour, Colours.White); } else if (getRandom() <= 0.33) { var targetUser = GetUser(cmd[1]); if (targetUser === "") { targetUser = msg.m.substring(cmd[0].length + 1, msgL); } CatUser(targetUser, false); FrogUser(targetUser, true); Messenger.sendMagicMessage(msg.user + " mutters an obscure incantation, " + targetUser + " turns in to a frog.", Colours.WizardrColour, Colours.White); } else { Messenger.sendMagicMessage(msg.user + " mutters an obscure incantation, but has insufficient mana.", Colours.WizardColour, Colours.White); } } else { Messenger.sendMagicMessage(msg.user + " mutters an obscure incantation, but nothing happens.", Colours.Black, Colours.White); } // // unfrog command // } else if ((["/unfrog", "/unfro", "/unfr", "/unf"].indexOf(cmd[0]) > -1) && Modules[MagicModule].vars.MagicEnabled) { if (Modules[MagicModule].isWizard(msg.user) || Modules[MagicModule].isNecromancer(msg.user)) { var targetUser = GetUser(cmd[1]); if (targetUser === "") { targetUser = msg.m.substring(cmd[0].length + 1, msgL); } FrogUser(targetUser, false); Messenger.sendMagicMessage(msg.user + " mutters an obscure incantation, " + targetUser + " returns to normal.", Colours.NecromancerColour, Colours.White); } else { Messenger.sendMagicMessage(msg.user + " mutters an obscure incantation, but nothing happens.", Colours.Black, Colours.White); } // // tape command // } else if ((["/tape", "/tap"].indexOf(cmd[0]) > -1) && Modules[MagicModule].vars.MagicEnabled) { if (Modules[MagicModule].isWizard(msg.user) || Modules[MagicModule].isNecromancer(msg.user)) { var targetUser = GetUser(cmd[1]); if (targetUser === "") { targetUser = msg.m.substring(cmd[0].length + 1, msgL); } TapeUser(targetUser, true); Messenger.sendMagicMessage(msg.user + " wraps " + targetUser + " in duct tape.", Colours.NecromancerColour, Colours.White); } else { Messenger.sendMagicMessage(msg.user + " tries to wrap " + targetUser + " in duct tape, but the reel is mysteriously empty.", Colours.Black, Colours.White); } // // untape command // } else if ((["/untape", "/untap"].indexOf(cmd[0]) > -1) && Modules[MagicModule].vars.MagicEnabled) { if (Modules[MagicModule].isWizard(msg.user) || Modules[MagicModule].isNecromancer(msg.user)) { var targetUser = GetUser(cmd[1]); if (targetUser === "") { targetUser = msg.m.substring(cmd[0].length + 1, msgL); } TapeUser(targetUser, false); Messenger.sendMagicMessage(msg.user + " rips the duct tape off " + targetUser + ".", Colours.NecromancerColour, Colours.White); } else { Messenger.sendMagicMessage(msg.user + " fails to get a hold of " + targetUser + ".", Colours.Black, Colours.White); } // // cat command // } else if ((["/cat", "/ca"].indexOf(cmd[0]) > -1) && Modules[MagicModule].vars.MagicEnabled) { if (Modules[MagicModule].isWizard(msg.user) || Modules[MagicModule].isNecromancer(msg.user)) { var targetUser = GetUser(cmd[1]); if (targetUser === "") { targetUser = msg.m.substring(cmd[0].length + 1, msgL); } FrogUser(targetUser, false); CatUser(targetUser, true); Messenger.sendMagicMessage(msg.user + " throws a ball of yarn at " + targetUser + " and they turn in to a cat.", Colours.NecromancerColour, Colours.White); } else { Messenger.sendMagicMessage(msg.user + " throws a ball of yarn at " + targetUser + " and misses.", Colours.Black, Colours.White); } // // uncat command // } else if ((["/uncat", "/unca"].indexOf(cmd[0]) > -1) && Modules[MagicModule].vars.MagicEnabled) { if (Modules[MagicModule].isWizard(msg.user) || Modules[MagicModule].isNecromancer(msg.user)) { var targetUser = GetUser(cmd[1]); if (targetUser === "") { targetUser = msg.m.substring(cmd[0].length + 1, msgL); } CatUser(targetUser, false); Messenger.sendMagicMessage(msg.user + " takes the ball of yarn from " + targetUser + " who then reverts to normal.", Colours.NecromancerColour, Colours.White); } else { Messenger.sendMagicMessage(msg.user + " cant catch " + targetUser + " to get the ball of yarn back.", Colours.Black, Colours.White); } // // silence command // } else if (["/silence", "/silenc", "/silen", "/sile", "/sil", "/si"].indexOf(cmd[0]) > -1) { if (PowerUser) { if (["greys", "grey", "gre", "gr", "g"].indexOf(cmd[1]) > -1) { MuteLevel = 1; Messenger.sendUnblockedMessage("Greys silenced, their old messages are left in chat.", Colours.Black, Colours.White); } else if (["cheap", "chea", "che", "ch", "c"].indexOf(cmd[1]) > -1) { MuteLevel = 2; Messenger.sendUnblockedMessage("Only tippers and VIPs may chat.", Colours.Black, Colours.White); } else if (["all", "al", "a"].indexOf(cmd[1]) > -1) { MuteLevel = 3; Messenger.sendUnblockedMessage("Almost everyone is now silenced.", Colours.Black, Colours.White); } else if (["none", "non", "no", "n"].indexOf(cmd[1]) > -1) { MuteLevel = 0; Messenger.sendUnblockedMessage("Chat is open to all.", Colours.Black, Colours.White); } else { var targetUser = GetUser(cmd[1]); if (targetUser === "") { targetUser = msg.m.substring(cmd[0].length + 1, msgL); } SilenceUser(targetUser, true); Messenger.sendUnblockedMessage(targetUser + " silenced, their old messages are left in chat, so they wont know they are muted.", Colours.DarkBlue, Colours.White, cb.room_slug); Modules[NagModule].ForceNotifyModerators(targetUser + " silenced, their old messages are left in chat, so they wont know they are muted.", Colours.DarkBlue, Colours.White); } } // // mute command // } else if (["/mute", "/mut", "/mu"].indexOf(cmd[0]) > -1) { if (PowerUser) { if (["all", "al", "a"].indexOf(cmd[1]) > -1) { Messenger.sendUnblockedMessage("No one is looking at grey chat.", Colours.DarkBlue, Colours.White); NoOneIsMonitoringGreys = true; ModeratorsVIP = false; BroadcasterModeratorsVIP = false; BroadcasterOnly = false; AllGreyChat = false; } else if (["mods", "mod", "mo", "m", "vip", "vi", "v"].indexOf(cmd[1]) > -1) { Messenger.sendUnblockedMessage("Moderators/VIP are looking at grey chat, so be nice.", Colours.DarkBlue, Colours.White); NoOneIsMonitoringGreys = false; ModeratorsVIP = true; BroadcasterModeratorsVIP = false; BroadcasterOnly = false; AllGreyChat = false; } else if (["normal", "norma", "norm", "nor", "no", "n"].indexOf(cmd[1]) > -1) { Messenger.sendUnblockedMessage("Broadcaster, Moderators/VIP are looking at grey chat, so be nice", Colours.DarkBlue, Colours.White); NoOneIsMonitoringGreys = false; ModeratorsVIP = false; BroadcasterModeratorsVIP = true; BroadcasterOnly = false; AllGreyChat = false; } else if (["broadcaster", "broadcaste", "broadcast", "broadcas", "broadca", "broadc", "broad", "broa", "bro", "br", "b"].indexOf(cmd[1]) > -1) { Messenger.sendUnblockedMessage("Broadcaster only, is looking at grey chat, so be nice", Colours.DarkBlue, Colours.White); NoOneIsMonitoringGreys = false; ModeratorsVIP = false; BroadcasterModeratorsVIP = false; BroadcasterOnly = true; AllGreyChat = false; } else if (["off", "of", "o", "none", "non"].indexOf(cmd[1]) > -1) { Messenger.sendUnblockedMessage("Anyone can see grey chat.", Colours.DarkBlue, Colours.White); NoOneIsMonitoringGreys = false; ModeratorsVIP = false; BroadcasterModeratorsVIP = false; BroadcasterOnly = false; AllGreyChat = true; } else if (["show", "sho", "sh", "s"].indexOf(cmd[1]) > -1) { if (AllGreyChat) { Messenger.sendUnblockedMessage("No filtering, all grey chat allowed through", Colours.Black, Colours.White, msg.user); } if (BroadcasterModeratorsVIP) { Messenger.sendUnblockedMessage("Broadcaster, Moderators/VIP are monitoring greys", Colours.Black, Colours.White, msg.user); } if (BroadcasterOnly) { Messenger.sendUnblockedMessage("Broadcaster only, is monitoring greys", Colours.Black, Colours.White, msg.user); } if (ModeratorsVIP) { Messenger.sendUnblockedMessage("Moderators/VIP are monitoring greys", Colours.Black, Colours.White, msg.user); } if (NoOneIsMonitoringGreys) { Messenger.sendUnblockedMessage("No one is monitoring greys", Colours.Black, Colours.White, msg.user); } } else { Messenger.sendErrorMessage("Use all, mods, vip, broadcaster, normal or off as a parameter.", msg.user); } } // // unsilence command // } else if (["/unsilence", "/unsilenc", "/unsilen", "/unsile", "/unsil", "/unsi"].indexOf(cmd[0]) > -1) { if (PowerUser) { var targetUser = GetUser(cmd[1]); if (targetUser === "") { targetUser = msg.m.substring(cmd[0].length + 1, msgL); } SilenceUser(targetUser, false); Messenger.sendUnblockedMessage(targetUser + " unsilenced, their muted messages cannot be seen.", Colours.DarkBlue, Colours.White, cb.room_slug); Modules[NagModule].ForceNotifyModerators(targetUser + " unsilenced, their muted messages cannot be seen.", Colours.DarkBlue, Colours.White); } // // goal command // } else if (["/goal", "/goa", "/go", "/g"].indexOf(cmd[0]) > -1) { if (["list", "lis", "li", "l"].indexOf(cmd[1]) > -1) { if ((["all", "al", "a"].indexOf(cmd[2]) > -1) && PowerUser) { Modules[MultiGoalModule].listGoals(); } else { Modules[MultiGoalModule].listGoals(msg.user); } } else if ((["reset", "rese", "res", "re", "r"].indexOf(cmd[1]) > -1) && PowerUser) { if (["tips", "tip", "ti", "t"].indexOf(cmd[2]) > -1) { Modules[MultiGoalModule].vars.GoalTips = 0; Modules[MultiGoalModule].vars.currentGoalNumber = 0; Modules[MultiGoalModule].vars.currentGoalTip = 0; Modules[MultiGoalModule].vars.currentGoalText = Modules[MultiGoalModule].vars.currentGoal[0]; Modules[MultiGoalModule].setCurrentGoal(); Messenger.sendGenericMessage("Goal tip total reset to start.", Colours.Black, Colours.White); } else { for (var z4 = 0; z4 < 30; z4++) { Modules[MultiGoalModule].vars.currentGoal[z4] = Modules[MultiGoalModule].vars.currentGoalSaved[z4]; Modules[MultiGoalModule].vars.currentGoalTips[z4] = Modules[MultiGoalModule].vars.currentGoalTipsSaved[z4]; } Modules[MultiGoalModule].vars.currentMaxGoals = Modules[MultiGoalModule].vars.currentMaxGoalsSaved; Modules[MultiGoalModule].vars.currentGoalMet = false; Modules[MultiGoalModule].vars.GoalTips = 0; Modules[MultiGoalModule].vars.currentGoalNumber = 0; Modules[MultiGoalModule].vars.currentGoalTip = 0; Modules[MultiGoalModule].vars.currentGoalText = Modules[MultiGoalModule].vars.currentGoal[0]; Modules[MultiGoalModule].setCurrentGoal(); Messenger.sendGenericMessage("Goal reset, app start goals restored.", Colours.Black, Colours.White); } } else if ((["max", "ma", "m"].indexOf(cmd[1]) > -1) && typeof parseInt(cmd[2]) === "number" && PowerUser) { if (cmd[2] < 31) { if (cmd[2] > 0) { Modules[MultiGoalModule].vars.currentMaxGoals = parseInt(cmd[2]) - 1; Modules[MultiGoalModule].setCurrentGoal(); Modules[MultiGoalModule].listGoals(msg.user); } else { Messenger.sendErrorMessage("Improper goal maximum, from 1 to 30.", msg.user); } } else { Messenger.sendErrorMessage("Improper goal maximum, from 1 to 30.", msg.user); } /* } else if ((["number", "numbe", "numb", "num", "nu", "n"].indexOf(cmd[1]) > -1) && typeof parseInt(cmd[2]) === "number" && PowerUser) { if (["up", "u"].indexOf(cmd[2]) > -1) { Modules[MultiGoalModule].vars.currentGoalNumber++; if (Modules[MultiGoalModule].vars.currentGoalNumber > Modules[MultiGoalModule].vars.currentMaxGoals) { Modules[MultiGoalModule].vars.currentGoalNumber = Modules[MultiGoalModule].vars.currentMaxGoals; Messenger.sendErrorgMessage("Cannot go any further up.", msg.user); } Messenger.sendGenericMessage("Goal number is now " + Modules[MultiGoalModule].vars.currentGoalNumber + " out of " + Modules[MultiGoalModule].vars.currentMaxGoals, Colours.Black, Colours.White,msg.user); Modules[MultiGoalModule].vars.GoalTips = Modules[MultiGoalModule].vars.currentGoalTips[Modules[MultiGoalModule].vars.currentGoalNumber-1]; Modules[MultiGoalModule].setCurrentGoal(); Modules[MultiGoalModule].listGoals(msg.user); } else if (["down", "dow", "do", "d"].indexOf(cmd[2]) > -1) { Modules[MultiGoalModule].vars.currentGoalNumber--; if (Modules[MultiGoalModule].vars.currentGoalNumber < 1) { Modules[MultiGoalModule].vars.currentGoalNumber = 1; Messenger.sendErrorMessage("Cannot go any further down.", msg.user); } Messenger.sendGenericMessage("Goal number is now " + Modules[MultiGoalModule].vars.currentGoalNumber + " out of " + Modules[MultiGoalModule].vars.currentMaxGoals, Colours.Black, Colours.White,msg.user); Modules[MultiGoalModule].vars.GoalTips = Modules[MultiGoalModule].vars.currentGoalTips[Modules[MultiGoalModule].vars.currentGoalNumber-1]; Modules[MultiGoalModule].setCurrentGoal(); Modules[MultiGoalModule].listGoals(msg.user); } else { Messenger.sendErrorMessage("Use up or down with this command.", msg.user); } */ } else if ((["time", "tim", "ti"].indexOf(cmd[1]) > -1) && typeof parseInt(cmd[2]) === "number" && PowerUser) { if (cmd[2] > 4) { howOftenToDisplayGoal = parseInt(cmd[2]); Modules[MultiGoalModule].setCurrentGoal(); Messenger.sendGenericMessage("Goals shown in chat every " + howOftenToDisplayGoal + " minutes.", Colours.Black, Colours.White); } else { Messenger.sendErrorMessage("Improper goal time, from 5 upwards.", msg.user); } } else if ((["set", "se"].indexOf(cmd[1]) > -1) && PowerUser) { var actualGoalList = ""; var tempGoalList = msg.m.substring(cmd[0].length + cmd[1].length + 2, msgL).split(','); var thisgoal = 0; var previousgoaltip = 0; for (var goalcount = 0; goalcount <= tempGoalList.length - 1; goalcount = goalcount + 2) { Modules[MultiGoalModule].vars.currentGoalTips[thisgoal] = parseInt(tempGoalList[goalcount]) + previousgoaltip; Modules[MultiGoalModule].vars.currentGoal[thisgoal] = tempGoalList[goalcount + 1]; Modules[MultiGoalModule].vars.currentGoalTipsSaved[thisgoal] = parseInt(tempGoalList[goalcount]) + previousgoaltip; Modules[MultiGoalModule].vars.currentGoalSaved[thisgoal] = tempGoalList[goalcount + 1]; actualGoalList = actualGoalList + tempGoalList[goalcount] + "," + tempGoalList[goalcount+1] + ","; previousgoaltip = Modules[MultiGoalModule].vars.currentGoalTips[thisgoal]; thisgoal++; } Modules[MultiGoalModule].vars.currentMaxGoals = thisgoal; Modules[MultiGoalModule].vars.currentMaxGoalsSaved = thisgoal; Modules[MultiGoalModule].vars.GoalList = actualGoalList.substring(0,actualGoalList.length - 1); Modules[MultiGoalModule].vars.GoalListSave = actualGoalList.substring(0,actualGoalList.length - 1); } else if ((["number", "numbe", "numb", "num", "nu"].indexOf(cmd[1]) > -1) && PowerUser) { if ((cmd[2] > 0) && (cmd[2] <= Modules[MultiGoalModule].vars.currentMaxGoals)) { Modules[MultiGoalModule].vars.currentGoalMet = true; Modules[MultiGoalModule].vars.currentGoalNumber = parseInt(cmd[2]); var tempGoalList = Modules[MultiGoalModule].vars.GoalList; var thisgoal = 0; for (var goalcount = 0; goalcount <= tempGoalList.length - 1; goalcount = goalcount + 2) { if (thisgoal == (Modules[MultiGoalModule].vars.currentGoalNumber - 1)) { Modules[MultiGoalModule].vars.currentGoalMet = true; Modules[MultiGoalModule].vars.GoalTips = parseInt(Modules[MultiGoalModule].vars.currentGoalTips[thisgoal]); Modules[MultiGoalModule].vars.currentGoalTip = parseInt(Modules[MultiGoalModule].vars.currentGoalTips[thisgoal + 1]); Modules[MultiGoalModule].vars.currentGoalText = Modules[MultiGoalModule].vars.currentGoal[thisgoal + 1]; Messenger.sendGenericMessage("Met Goal " + (thisgoal + 1) +": "+ Modules[MultiGoalModule].vars.currentGoal[thisgoal], Colours.GoalColour,Colours.Black,msg.user); } thisgoal++; } Modules[MultiGoalModule].vars.currentGoalNumber--; // its an index to an array, these start at 0 not 1 } else { Messenger.sendErrorMessage("Improper goal number, from 1 to " + Modules[MultiGoalModule].vars.currentMaxGoals, msg.user); } /* } else if ((cmd[1] === "tip" || cmd[1] === "ti") && typeof parseInt(cmd[2]) === "number" && typeof parseInt(cmd[3]) === "number" && PowerUser) { if (parseInt(cmd[2]) > 0 && parseInt(cmd[2]) < 31) { if (parseInt(cmd[3]) > 0) { if (parseInt(cmd[2]) <= Modules[MultiGoalModule].vars.currentMaxGoals) { Modules[MultiGoalModule].vars.currentGoalTips[parseInt(cmd[2]) - 1] = cmd[3]; Modules[MultiGoalModule].setCurrentGoal(); Modules[MultiGoalModule].listGoals(msg.user); } else { Messenger.sendErrorMessage("Improper goal number " + cmd[2] + ", range is from 1 to 30, current maximum is " + Modules[MultiGoalModule].vars.currentMaxGoals + ".", msg.user); } } else { Messenger.sendErrorMessage("Improper tip " + cmd[3] + ", must be above 0.", msg.user); } } else { Messenger.sendErrorMessage("Improper goal number" + cmd[2] + ", range is from 1 to 30.", msg.user); } */ } else { Messenger.sendErrorMessage("Improper params! Params: -list, -reset, -tip-<n>-<amount> or -text-<n>-<tip text>, <n> can be from 1 to " + (Modules[MultiGoalModule].vars.currentMaxGoals) + ".", msg.user); } } else { Messenger.sendErrorMessage("You never made this command!", msg.user); } } else { // reinsert graphics from apps/bots that break command line driven bots like this one if (fixinsertedgraphics1) { msg.m = " :qq_beatingheart " + msg.m; } if (fixinsertedgraphics2) { msg.m = " :qq_staticheart " + msg.m; } } } function OnDraw() { return { "template": "3_rows_11_21_31", "row1_value": Row1, "row2_value": Row2, "row3_value": Row3 }; /* if (TotalTips === 0) { return { "template": "3_rows_11_21_31", "row1_value": Row1, "row2_value": Row2, "row3_value": Row3 }; } else { return { "template": "3_rows_11_21_31", "row1_value": "Love Shown: " + TotalTips + ((TotalTips == 1) ? " Token" : " Tokens"), "row2_value": Row2, "row3_value": Row3 }; } */ } function ClearUserList() { //also does leaderboard processing // Messenger.sendGenericMessage("Clear user List called.", Colours.Black); for (var i = 0; i < UserList.length; i++) { // Messenger.sendGenericMessage("Start Blue " + i + " " + UserList[i].name + ", boring " + UserList[i].boring_blue + ", Left " + UserList[i].they_left + ", Rank " + UserList[i].weighting + ", Tkn " + UserList[i].has_tokens,Colours.Blue, Colours.White, cb.room_slug); UserList[i].weighting--; if (!UserList[i].frog && !UserList[i].ducttape && !UserList[i].silence && !UserList[i].cat && !UserList[i].wizard && !UserList[i].necromancer && !UserList[i].automoderated && !UserList[i].is_a_fan && !UserList[i].moderator) { // only get rid of greys and blues, tips keep blues weighting high, talk keeps blues and greys weighting high so they dont get removed if (UserList[i].weighting <= 0) { // only those users who arent interracting if (UserList[i].has_tokens && !UserList[i].boring_blue) { // alert rom owner we have a freeloading boring blue // Messenger.sendGenericMessage("Tell Blue " + i + " " + UserList[i].name + ", boring " + UserList[i].boring_blue + ", Left " + UserList[i].they_left + ", Rank " + UserList[i].weighting,Colours.DarkGreen, Colours.White, cb.room_slug); if (!UserList[i].they_left) { if (Modules[NagModule].vars.doWeNag) { Messenger.sendGenericMessage("Blue " + UserList[i].name + " has not talked or tipped for " + delayToNag + " minutes.",Colours.NWhite, Colours.NagColour, cb.room_slug); Modules[NagModule].NotifyModerators("Blue " + UserList[i].name + " has not talked or tipped for " + delayToNag + " minutes.",Colours.White, Colours.NagColour); } UserList[i].boring_blue = true; } } if (UserList[i].has_tokens && UserList[i].boring_blue) { // nag the dead blue to type or tip (if UI allows for it in the future, turn off their video) with this message if (Modules[NagModule].vars.doWeNotify) { Messenger.sendGenericMessage(UserList[i].name + ": " + NagMessage, Colours.NagColour, Colours.White, UserList[i].name); } UserList[i].weighting = delayBetweenNag; // give them a fair pause before repeating the nag // Messenger.sendGenericMessage("Nag Blue " + i + " " + UserList[i].name + ", boring " + UserList[i].boring_blue + ", Left " + UserList[i].they_left + ", Rank " + UserList[i].weighting,Colours.Purple, Colours.White, cb.room_slug); } else if ((UserList[i].has_tokens && UserList[i].they_left) || (!UserList[i].has_tokens)) { // dead greys or blues who have left // Messenger.sendGenericMessage("Del Blue " + i + " " + UserList[i].name + ", boring " + UserList[i].boring_blue + ", Left " + UserList[i].they_left + ", Rank " + UserList[i].weighting,Colours.Cyan, Colours.White, cb.room_slug); UserList = cbjs.arrayRemove(UserList, UserList[i]); i--; } } } } // i know tip leader board isnt anything to do with clear user, but I need a regular 1 minute timed activity for it, and borrowed this :P if (leaderboardon) { leaderboardcount++; // Messenger.sendGenericMessage("leaderboard " + leaderboardcount + " " + leaderboarddelay,Colours.Black, Colours.White); if (leaderboardcount == leaderboarddelay) { // every leaderboarddelay minutes Modules[LeaderBoardModule].showBoard(); leaderboardcount = 0; } } selfadvert++; if (!AllGreyChat && selfadvert == 20) { Messenger.sendGenericMessage("100% grey spam and demand free chat, with blue beggar mute option, for your viewers, brought to you by " + AppName,Colours.NotifierColour, Colours.White); selfadvert = 0; } if (AllGreyChat && selfadvert == 20) { Messenger.sendGenericMessage("Reduced grey spam for your viewers, brought to you by " + AppName,Colours.NotifierColour, Colours.White); selfadvert = 0; } cb.setTimeout(ClearUserList, 60000); // every minute } function onEnter(user) { if (user.is_mod || user.has_tokens || user.tipped_recently || user.tipped_alot_recently || user.tipped_tons_recently || user.in_fanclub) { // this user is a mod or has tokens, keep track of them AddUser(user.user,user.is_mod,user.has_tokens || user.tipped_recently || user.tipped_alot_recently || user.tipped_tons_recently,user.in_fanclub); ResetUser(user.user, delayToNag, false, false); } if (Modules[MagicModule].vars.MagicEnabled) { if (user.in_fanclub) { // fan club members are necromancers // Messenger.sendGenericMessage("There is a loud explosion, " + user['user'] + " (Necromancer) appears out of thin air.", Colours.DarkViolet, Colours.White); Modules[MagicModule].SetNecromancer(user['user'], true); } if (isBroadcaster(user['user'])) { Modules[MagicModule].SetNecromancer(user['user'], true); } } if (Modules[MagicModule].isNecromancer(user['user'])) { // returning or new necromancer if ((user['user'] === "smokersexual") || (user['user'] === "lagunadistortion") || (user['user'] === "lagunatrap")) { Messenger.sendMagicMessage(user['user'] + " (Necromancer) comes back from the shops with a carton of ciggys.", Colours.DarkViolet, Colours.White); if ((cb.room_slug == "lagunadistortion") || (cb.room_slug == "lagunatrap")) { VIPUser("smokersexual", true); // force me to be VIP for laguna } if (user['user'] === "smokersexual") { Messenger.sendMagicMessage(":howdy11", Colours.DarkViolet, Colours.White); } } else if (user['user'] === "lady_margot") { Messenger.sendMagicMessage(user['user'] + " (Necromancer) comes in to chat looking for her cig slaves.", Colours.NecromancerColour, Colours.White); } else if (user['user'] === "lagunastudioseast") { Messenger.sendMagicMessage("Camera, lights, action!! " + user['user'] + " (Necromancer) is on the air.", Colours.NecromancerColour, Colours.White); } else if (user['user'] === "mhs01") { Messenger.sendMagicMessage(user['user'] + " (Necromancer) gets off the train and arrives in chat.", Colours.NecromancerColour, Colours.White); mhspresent = true; } else if (user['user'] === "champd") { Messenger.sendMagicMessage(user['user'] + " (Necromancer) comes back from the kitchen with a gallon of coffee.", Colours.NecromancerColour, Colours.White); } else { Messenger.sendMagicMessage("There is a loud explosion, " + user['user'] + " (Necromancer) arrives.", Colours.NecromancerColour, Colours.White); } } else if (Modules[MagicModule].isWizard(user['user'])) { // returning or new wizard Messenger.sendMagicMessage("As if by magic, " + user['user'] + " (Wizard) appears.", Colours.WizardColour, Colours.White); } else if (Modules[StealthModule].vars.AuthorModeVisible && isScriptAuthor(user['user'])) { Messenger.sendUnblockedMessage(user['user'] + " (App Author) joins chat.", Colours.DarkViolet, Colours.White); if (user['user'] === "smokersexual") { Messenger.sendUnblockedMessage(":howdy11", Colours.DarkViolet, Colours.White); } } if (user['user'] === "barbermanx") { Messenger.sendMagicMessage(AppName + " detects "+ user['user'] + " in chat, and hides the scissors.", Colours.WizardColour, Colours.White); } if ((user.is_mod || isBroadcaster(user['user']) || isVIP(user['user']) || isScriptAuthor(user['user'])) && Modules[NagModule].vars.doWeNag) { Messenger.sendGenericMessage("Inactive Blue monitoring messages in this colour may appear.", Colours.NagColour, Colours.White, user['user']); } if (isMonitoring(user)) { Messenger.sendGenericMessage("You are monitoring User IDs.", Colours.Black, Colours.Red, user['user']); Modules[RoomModule].SetRoom(user['user'],NoticesInChat); } if ((user.has_tokens || user.tipped_recently || user.tipped_alot_recently || user.tipped_tons_recently || user.in_fanclub) && (user['user'] != "ebl")) { if (cb.settings.BlueWelcome) { Messenger.sendGenericMessage("Welcome " + user.user + "! " + cb.settings.BlueWelcome, Colours.BlueWelcomeColour, Colours.White, user['user']); } else { Messenger.sendGenericMessage("Welcome " + user.user + "! Feel free to join the chat. No promoting of other rooms is allowed. Thankyou.", Colours.BlueWelcomeColour, Colours.White, user['user']); } BlueCount++; if (!AllGreyChat) { Messenger.sendUnblockedMessage("100% grey spam and demand free chat, brought to you by " + AppName,Colours.NotifierColour, Colours.White, user['user']); } if (MuteLevel == 2) { Messenger.sendGenericMessage("Messages will only be seen by the broadcaster after a tip.\n Brought to you by " + AppName+ " " + choosemode, Colours.White, Colours.Red, user['user']); } } else { if (cb.settings.GreyWelcome) { Messenger.sendGenericMessage("Welcome " + user.user + "! " + cb.settings.GreyWelcome, Colours.GreyWelcomeColour, Colours.White, user['user']); } else { Messenger.sendGenericMessage("Welcome " + user.user + "! Feel free to join the chat if it is enabled for greys. No promoting of other rooms, please purchase tokens before making a request or asking for a PM. No all CAPS messages, it is rude to shout. Thankyou.", Colours.GreyWelcomeColour, Colours.White, user['user']); } GreyCount++; if (NoOneIsMonitoringGreys) { Messenger.sendUnblockedMessage("100% grey free chat is active, your messages will not be seen by anyone else.\n Brought to you by " + AppName+ " " + choosemode, Colours.White, Colours.Red, user['user']); } if (BroadcasterModeratorsVIP) { Messenger.sendUnblockedMessage("100% grey spam and demand free chat is active, your messages will only be seen by the broadcaster, moderators or VIPs.\n Brought to you by " + AppName+ " " + choosemode, Colours.White, Colours.Red, user['user']); } if (BroadcasterOnly) { Messenger.sendUnblockedMessage("100% grey spam and demand free chat is active, your messages will only be seen by the broadcaster.\n Brought to you by " + AppName+ " " + choosemode,Colours.NotifierColour, Colours.White, user['user']); } if (ModeratorsVIP) { Messenger.sendUnblockedMessage("100% grey spam and demand free chat is active, your messages will only be seen by the moderators or VIPs.\n Brought to you by " + AppName+ " " + choosemode, Colours.White, Colours.Red, user['user']); } } //if (user['user'] == "ebl") { NiceUser(user['user'], false); ProbablyNiceUser(user['user'], false); } // test user ebl set to the same state as a grey if (Modules[MultiGoalModule].isEnabled) { Messenger.sendGenericMessage("Next goal: " + Modules[MultiGoalModule].vars.currentGoalText + (Modules[MultiGoalModule].vars.currentGoalTip - Modules[MultiGoalModule].vars.GoalTips) + " Tokens to go. ", Colours.White, Colours.GoalColour, user['user']); } if (Modules[NotifierModule].vars.ShowTip) { var tempTipList = Modules[NotifierModule].vars.TipMenu.split(','); var outMessage = ""; for (var tipcount = 0; tipcount <= tempTipList.length - 1; tipcount=tipcount + 2) { outMessage = outMessage + tempTipList[tipcount+1] + "(" + tempTipList[tipcount] + ") | "; } if (tempTipList.length < 1) { outMessage = ""; } Messenger.sendGenericMessage("Tip menu: " + outMessage.substring(0,outMessage.length - 2), Colours.TipMenuColour, Colours.White, user['user']); } if(leaderboardon) { Modules[LeaderBoardModule].showBoard(user['user']); } } function onLeave(user) { if (Modules[MagicModule].isNecromancer(user['user'])) { // exit room for necromancer if ((user['user'] === "smokersexual") || (user['user'] === "lagunadistortion") || (user['user'] === "lagunatrap")) { Messenger.sendMagicMessage("The last cigarette is smoked, " + user['user'] + " (Necromancer) goes to the shop to buy more.", Colours.NecromancerColour, Colours.White); } else if (user['user'] === "champd") { Messenger.sendMagicMessage("The coffee cup is empty, " + user['user'] + " (Necromancer) goes to the kitchen to make more.", Colours.NecromancerColour, Colours.White); } else if (user['user'] === "lady_margot") { Messenger.sendMagicMessage(user['user'] + " (Necromancer) goes to the shoe shop to sharpen her heels.", Colours.NecromancerColour, Colours.White); } else if (user['user'] === "lagunastudioseast") { Messenger.sendMagicMessage("The end credits roll, " + user['user'] + " (Necromancer) is off the air.", Colours.NecromancerColour, Colours.White); } else if (user['user'] === "mhs01") { Messenger.sendMagicMessage("The guard calls \"all aboard\", " + user['user'] + " (Necromancer) boards the train, and it leaves the station.", Colours.NecromancerColour, Colours.White); mhspresent = false; } else { Messenger.sendMagicMessage("There is a loud explosion, " + user['user'] + " (Necromancer) vanishes.", Colours.NecromancerColour, Colours.White); } } else if (Modules[MagicModule].isWizard(user['user'])) { // exit room for wizard Messenger.sendMagicMessage("There is a loud pop, " + user['user'] + " (Wizard) disappears.", Colours.WizardColour, Colours.White); } else { // muggle (blue or grey) if (user.has_tokens || user.tipped_recently || user.tipped_alot_recently || user.tipped_tons_recently || user.in_fanclub) { BlueCount--; ResetUser(user['user'], delayToNag, true, false); // put them on a countdown } else { GreyCount--; } } } function Init() { // unknown why UserList is populated with lines of garbage, seems to be one per field, instead of initialised blank, but it is, so clear it. UserList = cbjs.arrayRemove(UserList, UserList[22]); UserList = cbjs.arrayRemove(UserList, UserList[21]); UserList = cbjs.arrayRemove(UserList, UserList[20]); UserList = cbjs.arrayRemove(UserList, UserList[19]); UserList = cbjs.arrayRemove(UserList, UserList[18]); UserList = cbjs.arrayRemove(UserList, UserList[17]); UserList = cbjs.arrayRemove(UserList, UserList[16]); UserList = cbjs.arrayRemove(UserList, UserList[15]); UserList = cbjs.arrayRemove(UserList, UserList[14]); UserList = cbjs.arrayRemove(UserList, UserList[13]); UserList = cbjs.arrayRemove(UserList, UserList[12]); UserList = cbjs.arrayRemove(UserList, UserList[11]); UserList = cbjs.arrayRemove(UserList, UserList[10]); UserList = cbjs.arrayRemove(UserList, UserList[9]); UserList = cbjs.arrayRemove(UserList, UserList[7]); UserList = cbjs.arrayRemove(UserList, UserList[7]); UserList = cbjs.arrayRemove(UserList, UserList[6]); UserList = cbjs.arrayRemove(UserList, UserList[5]); UserList = cbjs.arrayRemove(UserList, UserList[4]); UserList = cbjs.arrayRemove(UserList, UserList[3]); UserList = cbjs.arrayRemove(UserList, UserList[2]); UserList = cbjs.arrayRemove(UserList, UserList[1]); UserList = cbjs.arrayRemove(UserList, UserList[0]); NotifierList = cbjs.arrayRemove(NotifierList, NotifierList[0]); TipList = cbjs.arrayRemove(TipList, TipList[1]); TipList = cbjs.arrayRemove(TipList, TipList[0]); ThanksList = cbjs.arrayRemove(ThanksList, ThanksList[1]); ThanksList = cbjs.arrayRemove(ThanksList, ThanksList[0]); Tippers.List = cbjs.arrayRemove(Tippers.List, Tippers.List[0]); nextUID = 1; AddUser(cb.room_slug,true,false,false); Modules[RoomModule].SetRoom(cb.room_slug,MainChat); Modules[StealthModule].onEnable(); Modules[StealthModule].vars.AuthorModeVisible = Modules[StealthModule].vars.DefaultAuthorModeVisible; Modules[StealthModule].vars.RowUpdateVisible = Modules[StealthModule].vars.DefaultRowUpdateVisible; Modules[StealthModule].vars.ChatOutputVisible = Modules[StealthModule].vars.DefaultChatOutputVisible; Modules[StealthModule].vars.MagicUserVisible = Modules[StealthModule].vars.DefaultMagicUserVisible; Modules[StealthModule].vars.ErrorVisible = Modules[StealthModule].vars.DefaultErrorVisible; Modules[StealthModule].vars.TitleVisible = Modules[StealthModule].vars.DefaultTitleVisible; if (choosemode === "App") { AppMode = true; } else { AppMode = false; Modules[StealthModule].vars.RowUpdateVisible = false; } if (AppMode) { HashTagString = cb.settings.HashTags; StartHashtag = cb.settings.HashTags; } else { HashTagString = ""; StartHashtag = ""; } if (cb.room_slug != "lagunadistortion") { SlugName = cb.room_slug; EmptyTipMsg = "Nobody Loves " + SlugName + " :/"; Row1 = "Nobody Loves " + SlugName + " :/"; Row1_Default = "Nobody Loves " + SlugName + " :/"; VIPUser("smokersexual", true); } if (cb.room_slug === "lagunastudioseast") { SlugName = cb.room_slug; EmptyTipMsg = "Studio Tip Jar Empty."; Row1 = "Studio Tip Jar Empty."; Row1_Default = "Studio Tip Jar Empty."; VIPUser("smokersexual", true); } if (cb.room_slug === "smokersexual") { SlugName = "Smoker"; EmptyTipMsg = "Nobody Loves " + SlugName + " :/"; Row1 = "Nobody Loves " + SlugName + " :/"; Row1_Default = "Nobody Loves " + SlugName + " :/"; } Modules[AutoModeratorModule].vars.muteGrey[0] = "on"; Modules[AutoModeratorModule].vars.muteGrey[1] = "on"; Modules[AutoModeratorModule].vars.muteGrey[2] = "on"; Modules[AutoModeratorModule].vars.muteGrey[3] = "off"; Modules[AutoModeratorModule].vars.muteGrey[4] = "on"; Modules[AutoModeratorModule].vars.muteGrey[5] = "on"; Modules[AutoModeratorModule].vars.muteGrey[6] = "on"; yellowwall = false; silent = false; automodandmagic = false; invisible = false; lagunamode = false; noautomode = false; if (cb.settings.UsageMode) { if (cb.settings.UsageMode == "Quiet Mode/Yellow Wall Mode, magic + automoderator on") { yellowwall = true; t } if ((cb.settings.UsageMode == "Laguna Mode, magic on, automoderator off, other presets") || (cb.room_slug == "lagunastudioseast")) { lagunamode = true; } if (cb.settings.UsageMode == "Silent Mode (only important nessages from the app/bot)") { silent = true; } if (cb.settings.UsageMode == "No automatic responses from the app/bot (magic, automod off)") { noautomode = true; } if (cb.settings.UsageMode == "Automoderator/Magic/Thanks allowed, everything else off") { automodandmagic = true; } if (cb.settings.UsageMode == "Invisible Mode (you wont know its running)") { invisible = true; Modules[StealthModule].vars.ChatOutputVisible = false; Modules[StealthModule].vars.ErrorVisible = false; Modules[StealthModule].vars.AuthorModeVisible = false; Modules[StealthModule].vars.MagicUserVisible = false; Modules[StealthModule].vars.TitleVisible = false; } if (cb.settings.UsageMode == "Normal Mode, all app messages visible, less automoderator") { Modules[AutoModeratorModule].vars.muteGrey[0] = "off"; Modules[AutoModeratorModule].vars.muteGrey[1] = "off"; Modules[AutoModeratorModule].vars.muteGrey[2] = "on"; Modules[AutoModeratorModule].vars.muteGrey[3] = "off"; Modules[AutoModeratorModule].vars.muteGrey[4] = "off"; Modules[AutoModeratorModule].vars.muteGrey[5] = "off"; Modules[AutoModeratorModule].vars.muteGrey[6] = "on"; Modules[AutoModeratorModule].vars.banliston = "on"; } } MuteLevel = 0; if (cb.settings.WhoIsSilencedInChat) { if (cb.settings.WhoIsSilencedInChat == "Greys are silenced") { MuteLevel = 1; } if (cb.settings.WhoIsSilencedInChat == "Non tippers are silenced") { MuteLevel = 2; } if (cb.settings.WhoIsSilencedInChat == "Lockdown (room owner and moderators/VIPs only)") { MuteLevel = 3; } if (cb.settings.WhoIsSilencedInChat == "All can talk subject to Mute Grey settings") { MuteLevel = 0; } } if (choosemode == "App") { if (invisible) { Modules[FMIModule].isEnabled = false; } else { Modules[FMIModule].isEnabled = true; Modules[FMIModule].onEnable(); } } else { Modules[FMIModule].isEnabled = false; } if (silent || invisible || noautomode) { Modules[MagicModule].isEnabled = false; } else { Modules[StealthModule].vars.MagicUserVisible = true; Modules[MagicModule].isEnabled = true; Modules[MagicModule].onEnable(); } Colours.MagicUserBCol = Colours.WhiteSmoke; if (cb.settings.WizardList) { var WizardList = cb.settings.WizardList.replace(/\s+/, ",").split(','); for (var wizcount = 0; wizcount < WizardList.length; wizcount++) { AddUser(WizardList[wizcount],false,false,false); Modules[MagicModule].SetWizard(WizardList[wizcount], true); } } Colours.WizardColour = Colours.Blue; if (cb.settings.NecromancerList) { var NecroList = cb.settings.NecromancerList.replace(/\s+/, ",").split(','); for (var neccount = 0; neccount < NecroList.length; neccount++) { AddUser(NecroList[neccount],false,false,false); Modules[MagicModule].SetNecromancer(NecroList[neccount], true); } } Colours.NecromancerColour = Colours.Purple; var hardcoded = "smilzo12,muscleinn,snort1oar2,karenalot,katieyesa47"; if (cb.settings.SilenceList) {// hardcoded troll list, there people are a waste of space, get rid of them var usersupplied = cb.settings.SilenceList; var allofthem = hardcoded + "," + usersupplied; var SilenceList = allofthem.replace(/\s+/, ",").split(','); for (var silencecount = 0; silencecount < SilenceList.length; silencecount++) { AddUser(SilenceList[silencecount],false,false,false); SilenceUser(SilenceList[silencecount], true); NiceUser(SilenceList[silencecount], false); // assume a silenced user is not a nice person, can be made a nice person by adding to the nice list too } } else { var SilenceList = hardcoded.replace(/\s+/, ",").split(','); for (var silencecount = 0; silencecount < SilenceList.length; silencecount++) { AddUser(SilenceList[silencecount],false,false,false); SilenceUser(SilenceList[silencecount], true); NiceUser(SilenceList[silencecount], false); // assume a silenced user is not a nice person, can be made a nice person by adding to the nice list too } } if (cb.settings.NiceList) { var NiceList = cb.settings.NiceList.replace(/\s+/, ",").split(','); for (var nicecount = 0; nicecount < NiceList.length; nicecount++) { AddUser(NiceList[nicecount],false,false,false); NiceUser(NiceList[nicecount], true); } } if (cb.settings.AllowList) { var AllowList = cb.settings.NAllowList.replace(/\s+/, ",").split(','); for (var allowcount = 0; allowcount < AllowList.length; allowcount++) { AddUser(AllowList[allowcount],false,false,false); ProbablyNiceUser(AllowList[allowcount], true); } } AddUser("mhs01",false,true,false); AddUser("barbermanx",false,true,false); NiceUser("barbermanx",true); // AutoMHS01 is disabled by default, to stop barbermanx from using the words cut and hair, you have to /unnice-barbermanx him and mhs01 has to be present in chat for the filter to work. NiceUser("mhs01",true); if (cb.settings.VIPList) { var VIPList = cb.settings.VIPList.replace(/\s+/, ",").split(','); for (var vipcount = 0; vipcount < VIPList.length; vipcount++) { AddUser(VIPList[vipcount],false,false,false); VIPUser(VIPList[vipcount], true); MonitoringUsers(VIPList[vipcount],true); } } NoOneIsMonitoringGreys = false; ModeratorsVIP = false; BroadcasterModeratorsVIP = false; BroadcasterOnly = false; AllGreyChat = true; if (cb.settings.OnlyNiceGreysInChat == "No one is monitoring greys") { NoOneIsMonitoringGreys = true; ModeratorsVIP = false; BroadcasterModeratorsVIP = false; BroadcasterOnly = false; AllGreyChat = false; MonitoringUsers(cb.room_slug,false); } if (cb.settings.OnlyNiceGreysInChat == "Moderators/VIP are monitoring greys") { NoOneIsMonitoringGreys = false; ModeratorsVIP = true; BroadcasterModeratorsVIP = false; BroadcasterOnly = false; AllGreyChat = false; MonitoringUsers(cb.room_slug,false); } if (cb.settings.OnlyNiceGreysInChat == "Broadcaster only is monitoring greys") { NoOneIsMonitoringGreys = false; ModeratorsVIP = false; BroadcasterModeratorsVIP = false; BroadcasterOnly = true; AllGreyChat = false; MonitoringUsers(cb.room_slug,true); } if (cb.settings.OnlyNiceGreysInChat == "Broadcaster, moderators/VIP are monitoring greys") { NoOneIsMonitoringGreys = false; ModeratorsVIP = false; BroadcasterModeratorsVIP = true; BroadcasterOnly = false; AllGreyChat = false; MonitoringUsers(cb.room_slug,true); } if (cb.settings.OnlyNiceGreysInChat == "No filtering, all grey chat allowed through") { NoOneIsMonitoringGreys = false; ModeratorsVIP = false; BroadcasterModeratorsVIP = false; BroadcasterOnly = false; AllGreyChat = true; } //var hardcoded2 = "kikmilfs,see my profile,free chaturbate tokens,go to my bio,my cam and,Click my profile.,TK,Cam2CamChats,and pay for it,free tokens.,see my profile,kikmilfs.,find girl for sex,check my bio,kikmilfs. com,MySexFind,go to my bio,cam2cam,open my cam,kikmilfs. com,find girl for sex,I am naked at,webcam site,snapmilfs,link in my bio,Token Generator"; var usersupplied2 = ""; if (cb.settings.BannedWordList9) { usersupplied2 = cb.settings.BannedWordList9; } var thisitem = 0; var BanList = usersupplied2.split(','); for (var banitem = 0; banitem < BanList.length; banitem++) { Modules[AutoModeratorModule].vars.banwordlist[thisitem] = BanList[banitem]; thisitem++; } var tmpShowNotify = true; if (cb.settings.NotifierList) { var tempNotifierList = cb.settings.NotifierList.split(','); for (var noticecount = 0; noticecount < tempNotifierList.length; noticecount++) { NotifierList.push({ message: tempNotifierList[noticecount] }); } currentNotifierList = cb.settings.NotifierList; } else { tmpShowNotify = false; } if (cb.settings.NotifierFrequency) { Modules[NotifierModule].vars.NotifierFrequency = cb.settings.NotifierFrequency; } else if (choosemode == "Lite") { Modules[NotifierModule].vars.NotifierFrequency = 5; // default to every 5 minutes } else { Modules[NotifierModule].vars.NotifierFrequency = 5; // default to every 5 minutes } Colours.NotifierColour = colourChecker(cb.settings.NotifierColour, Colours.RoyalBlue.substr(1,6),cb.room_slug,false); var tmpShowTip = true; if (cb.settings.TipMenu) { var actualTipList = ""; Modules[NotifierModule].vars.TipMenu = cb.settings.TipMenu; var tempTipList = cb.settings.TipMenu.split(','); for (var tipcount = 0; tipcount < tempTipList.length - 1; tipcount=tipcount + 2) { if (typeof parseInt(tempTipList[tipcount]) === "number") { if (parseInt(tempTipList[tipcount]) > 0) { TipList.push({ tipamount: tempTipList[tipcount], tipoption: tempTipList[tipcount+1] }); actualTipList = actualTipList + tempTipList[tipcount] + "," + tempTipList[tipcount+1] + ","; } else { Messenger.sendErrorMessage("TipMenu: " + tempTipList[tipcount] + " is not a positive number, rejecting " + tempTipList[tipcount] + "," + tempTipList[tipcount+1]); } } else { Messenger.sendErrorMessage("TipMenu: " + tempTipList[tipcount] + " is not a number, rejecting " + tempTipList[tipcount] + "," + tempTipList[tipcount+1]); } } Modules[NotifierModule].vars.TipMenu = actualTipList.substring(0,actualTipList.length - 1); } else { Modules[NotifierModule].vars.TipMenu = ""; TipList = []; tmpShowTip = false; } Colours.TipMenuColour = colourChecker(cb.settings.TipMenuColour, Colours.Red.substr(1,6),cb.room_slug,false); if (cb.settings.TipMenuFrequency) { Modules[NotifierModule].vars.TipMenuFrequency = cb.settings.TipMenuFrequency; } else if (choosemode == "Lite") { Modules[NotifierModule].vars.TipMenuFrequency = 7; // default to every 7 minutes } else { Modules[NotifierModule].vars.TipMenuFrequency = 7; // default to every 7 minutes } // Modules[TipJarModule].isEnabled = true; // Modules[TipJarModule].onEnable(); if (cb.settings.CmdPrefix) { var CmdOptions = cb.settings.CmdPrefix.replace(/\s+/, ",").split(','); for (var cmdcount = 0; cmdcount <= CmdOptions.length - 1; cmdcount++) { if (CmdOptions[cmdcount] === "!") { useexclaim = true; } if (CmdOptions[cmdcount] === "#") { usehash = true; } if (CmdOptions[cmdcount] === "~") { usetilde = true; } if (CmdOptions[cmdcount] === "/") { useslash = true; } } } else { useslash = true; useexclaim = true; usetilde = true; usehash = true; } Modules[AutoModeratorModule].isEnabled = true; Modules[AutoModeratorModule].onEnable(); Colours.AutomoderatorColour = colourChecker(cb.settings.AutomoderatorColour, Colours.SteelBlue.substr(1,6),cb.room_slug,false); Modules[StealthModule].vars.ErrorVisible = true; Modules[AuthorModule].isEnabled = true; Modules[StealthModule].vars.AuthorModeVisible = true; if (AppMode) { Modules[StealthModule].vars.TitleVisible = true; } else { Modules[StealthModule].vars.TitleVisible = false; } Modules[AuthorModule].onEnable(); if (cb.settings.UpdateSubject === "Yes") { ShowTipInTitle = true; } else { ShowTipInTitle = false; } if (cb.settings.HighestTipper === "Yes") { show.highestTotal = true; } else { show.highestTotal = false; } if (silent || automodandmagic || yellowwall || invisible) { Modules[StealthModule].vars.TitleVisible = false; show.highestTotal = false; ShowTipInTitle = false; } Colours.HighestTipperBCol = colourChecker(cb.settings.HighestTipperColour, Colours.Lavender.substr(1,6),cb.room_slug,false); // Nag module to be off by default, manual start only for now. Modules[NagModule].vars.doWeNag = false; Modules[NagModule].vars.doWeNotify = false; delayToNag = 20; delayBetweenNag = 5; NagMessage = "Are you enjoying the show? Interract more often with me to stop these messages."; Colours.NagColour = Colours.Red; // now it should be empty, number of lines of garbage = number of fields in the object UserList so.. a way to define arrays of objects without putting garbage in is required // likewise DugeonList and ConferenceroomList DungeonList = cbjs.arrayRemove(DungeonList, DungeonList[0]); ConferenceroomList = cbjs.arrayRemove(ConferenceroomList, ConferenceroomList[0]); Modules[MagicModule].SetNecromancer(cb.room_slug, true); StartRequest = cb.settings.RequestPrice; cb.onEnter(onEnter); cb.onLeave(onLeave); cb.onTip(OnTip); cb.onMessage(OnMessage); if (AppMode) { cb.onDrawPanel(OnDraw); } if (Modules[StealthModule].vars.RowUpdateVisible && AppMode) { cb.drawPanel(); } var cmdprefixtext = "- Help is available, use the chosen command prefixes in front of the word help: "; if (useexclaim) { cmdprefixtext += "!help "; } if (usehash) { cmdprefixtext += "#help "; } if (usetilde) { cmdprefixtext += "~help "; } if (useslash) { cmdprefixtext += "/help "; } Messenger.sendInfoMessage("Thankyou for using " + AppName + " " + choosemode + " " + cmdprefixtext); Messenger.sendInfoMessage("Dev Team: " + DevTeam.Name); Messenger.sendInfoMessage("CEO: " + DevTeam.CEO); Messenger.sendInfoMessage("Head Dev: " + DevTeam.HeadDev); Messenger.sendWarningMessage(cb.settings.OnlyNiceGreysInChat); Messenger.sendGenericMessage(DevTeam.ThisVersion + "\n " + SupportMessage,Colours.DarkGreen,Colours.White); if (cb.settings.NotifierSelect === "Yes Tip Menu and Notifier") { Modules[NotifierModule].vars.ShowNotify = tmpShowNotify;; Modules[NotifierModule].vars.ShowTip = tmpShowTip; Modules[NotifierModule].isEnabled = true; Modules[NotifierModule].onEnable(); } else if (cb.settings.NotifierSelect === "Yes Tip Menu Only") { Modules[NotifierModule].vars.ShowNotify = false; Modules[NotifierModule].vars.ShowTip = tmpShowTip; Modules[NotifierModule].isEnabled = true; Modules[NotifierModule].onEnable(); } else if (cb.settings.NotifierSelect === "Yes Notifier Only") { Modules[NotifierModule].vars.ShowNotify = tmpShowNotify; Modules[NotifierModule].vars.ShowTip = false; Modules[NotifierModule].isEnabled = true; Modules[NotifierModule].onEnable(); } else { Modules[NotifierModule].vars.ShowNotify = false; Modules[NotifierModule].vars.ShowTip = false; Modules[NotifierModule].isEnabled = false; Modules[NotifierModule].onDisable(); } Colours.ThankyouMessageColour = colourChecker(cb.settings.ThankyouMessageColour, Colours.Coral.substr(1,6),cb.room_slug,false); Colours.BlueWelcomeColour = colourChecker(cb.settings.BlueWelcomeColour, Colours.Blue.substr(1,6),cb.room_slug,false); Colours.GreyWelcomeColour = colourChecker(cb.settings.GreyWelcomeColour, Colours.DarkGrey.substr(1,6),cb.room_slug,false); Colours.GoalColour = colourChecker(cb.settings.GoalColour, Colours.GoldenRod.substr(1,6),cb.room_slug,false); Colours.TipJarColour = colourChecker(cb.settings.TipJarColour, Colours.SlateBlue.substr(1,6),cb.room_slug,false); Colours.LeaderBoardColour = colourChecker(cb.settings.LeaderBoardColour, "BA025D",cb.room_slug,false); if (cb.settings.LeaderboardFrequency) { leaderboarddelay = cb.settings.LeaderboardFrequency; } else if (choosemode == "Lite") { leaderboarddelay = 20; // default to every 20 minutes } else { leaderboarddelay = 20; // default to every 20 minutes } leaderboardcount = 0; if (cb.settings.LeaderBoard == "Yes") { Modules[LeaderBoardModule].onEnable(); } else { Modules[LeaderBoardModule].onDisable(); } var actualGoalList = ""; if (cb.settings.GoalList) { var tempGoalList = cb.settings.GoalList.split(','); var thisgoal = 0; var previousgoaltip = 0; for (var goalcount = 0; goalcount <= tempGoalList.length - 1; goalcount = goalcount + 2) { Modules[MultiGoalModule].vars.currentGoalTips[thisgoal] = parseInt(tempGoalList[goalcount]) + previousgoaltip; Modules[MultiGoalModule].vars.currentGoal[thisgoal] = tempGoalList[goalcount + 1]; Modules[MultiGoalModule].vars.currentGoalTipsSaved[thisgoal] = parseInt(tempGoalList[goalcount]) + previousgoaltip; Modules[MultiGoalModule].vars.currentGoalSaved[thisgoal] = tempGoalList[goalcount + 1]; previousgoaltip = Modules[MultiGoalModule].vars.currentGoalTips[thisgoal]; actualGoalList = actualGoalList + tempGoalList[goalcount] + "," + tempGoalList[goalcount+1] + ","; thisgoal++; } } if (cb.settings.GoalFrequency) { howOftenToDisplayGoal = cb.settings.GoalFrequency; } else { howOftenToDisplayGoal = 20; // default to every 20 minutes } Modules[MultiGoalModule].vars.currentMaxGoals = thisgoal; Modules[MultiGoalModule].vars.currentMaxGoalsSaved = thisgoal; Modules[MultiGoalModule].vars.GoalList = actualGoalList.substring(0,actualGoalList.length - 1); Modules[MultiGoalModule].vars.GoalListSave = actualGoalList.substring(0,actualGoalList.length - 1); if (cb.settings.GoalEnabled === "Yes") { Modules[MultiGoalModule].isEnabled = true; Modules[MultiGoalModule].onEnable(); Modules[MultiGoalModule].vars.currentGoalNumber = 0; Modules[MultiGoalModule].setCurrentGoal(); } else { Modules[MultiGoalModule].isEnabled = false; Modules[MultiGoalModule].onDisable(); } if (AppMode) { if (!silent && !invisible && !yellowwall) { cb.changeRoomSubject(cb.settings.RoomTitle + " " + HashTagString); CurrentRoomTitle = cb.settings.RoomTitle; } } if (cb.settings.TipJarEmptyRate) { Modules[TipJarModule].vars.emptyRate = cb.settings.TipJarEmptyRate; } else { Modules[TipJarModule].vars.emptyRate = 5; } if (cb.settings.TipJarEmptyAmount) { Modules[TipJarModule].vars.emptyAmount = cb.settings.TipJarEmptyAmount; } else { Modules[TipJarModule].vars.emptyAmount = 1; } if (cb.settings.TipJarStart) { Modules[TipJarModule].vars.jarStart = cb.settings.TipJarStart; } else { Modules[TipJarModule].vars.jarStart = 100; } if (cb.settings.TipJarEnabled === "Yes") { Modules[RoomModule].vars.currentJar = 0; Modules[TipJarModule].onEnable(); } else { Modules[TipJarModule].onDisable(); } if (choosemode != "App") { Modules[TipJarModule].onDisable(); } if (cb.settings.ThankyouMessage == "") { // no messages of thanks ThankyouMessage = ""; } else { ThankyouMessage = cb.settings.ThankyouMessage; } if (cb.settings.ThankyouThrehold) { ThankyouThreshold = cb.settings.ThankyouThreshold; } else { ThankyouThreshold = 0; //thank for every tip } GreyGIF = true; if (cb.settings.GreyGIF == "No") { GreyGIF = false; } else { GreyGIF = true; } spamkillinvisible = false; if (invisible || silent || noautomode) { Modules[TipJarModule].onDisable(); Modules[MultiGoalModule].isEnabled = false; Modules[MultiGoalModule].onDisable(); Modules[LeaderBoardModule].onDisable(); Modules[NotifierModule].vars.ShowNotify = false; Modules[NotifierModule].vars.ShowTip = false; Modules[NotifierModule].isEnabled = false; Modules[NotifierModule].onDisable(); show.highestTotal = false; ShowTipInTitle = false; Modules[NagModule].vars.doWeNag = false; Modules[NagModule].vars.doWeNotify = false; Modules[StealthModule].vars.ChatOutputVisible = false; Modules[StealthModule].vars.ErrorVisible = false; Modules[StealthModule].vars.MagicUserVisible = false; Modules[StealthModule].vars.TitleVisible = false; spamkillinvisible = true; Modules[ShowModule].onDisable(); if (invisible) { cb.sendNotice("Setting Chat Controller mode to Invisible", cb.room_slug, Colours.White, Colours.black); Modules[FMIModule].isEnabled = false; Modules[FMIModule].onDisable(); Modules[StealthModule].vars.RowUpdateVisible = false; Modules[AuthorModule].isEnabled = false; Modules[StealthModule].vars.AuthorModeVisible = false; } if (silent) { cb.sendNotice("Setting Chat Controller mode to Silent", cb.room_slug, Colours.White, Colours.black); Modules[StealthModule].vars.RowUpdateVisible = true; Modules[AuthorModule].isEnabled = true; Modules[StealthModule].vars.AuthorModeVisible = true; } ThankyouMessage = ""; } if (yellowwall) { cb.sendNotice("Setting Chat Controller mode to Yellow Wall (/quiet) Mode", cb.room_slug, Colours.White, Colours.black); Modules[StealthModule].vars.ChatOutputVisible = false; Modules[StealthModule].vars.ErrorVisible = false; Modules[StealthModule].vars.AuthorModeVisible = false; Modules[StealthModule].vars.MagicUserVisible = false; Modules[StealthModule].vars.TitleVisible = false; ThankyouMessage = ""; } if (automodandmagic) { cb.sendNotice("Setting Chat Controller mode to Automoderator, Auto-thanks, Notifier and Magic only.", cb.room_slug, Colours.White, Colours.black); Modules[TipJarModule].onDisable(); Modules[MultiGoalModule].isEnabled = false; Modules[MultiGoalModule].onDisable(); Modules[LeaderBoardModule].onDisable(); Modules[NotifierModule].vars.ShowNotify = true; Modules[NotifierModule].vars.ShowTip = false; Modules[NotifierModule].isEnabled = true; Modules[NotifierModule].onEnable(); show.highestTotal = false; ShowTipInTitle = false; Modules[NagModule].vars.doWeNag = false; Modules[NagModule].vars.doWeNotify = false; Modules[FMIModule].isEnabled = false; Modules[FMIModule].onDisable() Modules[StealthModule].vars.ChatOutputVisible = true; Modules[StealthModule].vars.ErrorVisible = true; Modules[StealthModule].vars.AuthorModeVisible = true; Modules[StealthModule].vars.MagicUserVisible = true; Modules[StealthModule].vars.TitleVisible = true; Modules[StealthModule].vars.RowUpdateVisible = true; } if (lagunamode) { cb.sendNotice("Setting Chat Controller mode to Laguna Mode, autmoderator offline, spamkiller invisible.", cb.room_slug, Colours.White, Colours.black); Modules[NagModule].vars.doWeNag = false; Modules[NagModule].vars.doWeNotify = false; Modules[StealthModule].vars.ChatOutputVisible = true; Modules[StealthModule].vars.ErrorVisible = true; Modules[StealthModule].vars.AuthorModeVisible = true; Modules[StealthModule].vars.MagicUserVisible = true; Modules[StealthModule].vars.TitleVisible = true; Modules[StealthModule].vars.RowUpdateVisible = true; Modules[AutoModeratorModule].onDisable(); for (var i = 0; i <= 6; i++) { Modules[AutoModeratorModule].vars.muteGrey[i] = "off"; } spamkillinvisible = true; AddUser("michiganguy001",false,true,false); Modules[MagicModule].SetNecromancer("michiganguy001", true); NiceUser("michiganguy001", true); } if (noautomode) { cb.sendNotice("Setting Chat Controller mode to No Automatic Responses Mode.", cb.room_slug, Colours.White, Colours.black); Modules[StealthModule].vars.ErrorVisible = true; Modules[StealthModule].vars.MagicUserVisible = false; Modules[StealthModule].vars.TitleVisible = false; Modules[StealthModule].vars.RowUpdateVisible = false; Modules[StealthModule].vars.AuthorModeVisible = true; Modules[AutoModeratorModule].onDisable(); for (var i = 0; i <= 6; i++) { Modules[AutoModeratorModule].vars.muteGrey[i] = "off"; } spamkillinvisible = true; Modules[MagicModule].onDisable(); } cb.setTimeout(ClearUserList, 60000); // every minute } Init()
© Copyright Chaturbate 2011- 2024. All Rights Reserved.