Bots Home
|
Create an App
chatbot1
Author:
glancor
Description
Source Code
Launch Bot
Current Users
Created by:
Glancor
// / <reference path="~/Scripts/Chaturbate.js" /> var choosemode = "App"; // set to App, Bot or Lite (a simplified bot mode) // 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: "#DEB887", GoalColour: "#DAA520", TipJarColour: "#6A5ACD", TipMenuColour: "#8FBC8F", NotifierColour: "#4169E1", TalkColour: "#000000", SayColour: "#000000", VipColour: "#FFF5EE" }; // Constants const DevTeam = { Name: "Laguna Studios", CEO: "LagunaDistortion", DonateMe: "simplypleasurable", HeadDev: "Martin aka Smokersexual", ThisVersion: "*NEW* Dont forget the /ban command, useful if a new spam message shows up. *UPDATED*Multigoal update in progress, if you are using it, it should be fine, but if it breaks, sorry. See /help-goal and /help-multigoal." }; const AppName = "Chat Controller " + choosemode + " 3.5"; const SupportMessage = "Contact " + DevTeam.HeadDev + " on KIK at AlfredVButler for support, if you wish to donate tokens, please tip " + DevTeam.DonateMe + " as we share that account. Thanks for using " + AppName + " " + choosemode; 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 Conferenceroom = 2; 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!"]; const Row1_Default = "Nobody Loves " + SlugName + " :/"; // default row values when running in app mode const Row2_Default = "Last Tipper: " + LastTip; const Row3_Default = (cb.settings.RequestPrice > 0) ? "Tip " + cb.settings.RequestPrice + " if you want a request!" : cb.settings.RoomMessage; const HashTagString_Default = "#couple #bareback #married #fuck #pussy #ass #tits #dildo"; // Variables var AppMode = true; var HashTagString = ""; var TotalTips = 0; var LastTip = "-- (0)"; var SlugName = "Laguna"; 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 greyGIF = true; 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 CurrentRoomTitle = ""; var ShowTipInTitle = false; var howOftenToDisplayGoal = 20; var useslash = false; var useexclaim = false; var usetilde = false; var usehash = false; var Tippers = { Highest: { name: "", totalTips: 0 }, List: [] }; var DungeonList = [{ name: "" }]; var ConferenceroomList = [{ name: "" }]; var NotifierList = [{ message: "" }]; var TipList = [{ tipamount: 0 }, { tipoption: "" }]; var UserList = [{ name: "" }, { userID: 0 }, { 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 }, { moderator: false }, { showUID: false }, { has_tokens: false }, { has_tipped: 0 }, { boring_blue: false }, { 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 }; var currentNotifierList = ""; var doWeNag = true; // boring blue nagger var delayToNag = 5; var delayBetweenNag = 2; var leaderboarddelay = 500; 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."; 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> turns on, or off, the inactive blue nagger (-notify) or monitor (-on), sets the delay before declaring a blue inactive, inactive message interval, and inactive message text.\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-<all/blue/grey>-<on/off> and /set-rules-<blue/grey>-<number>-<on/off> when automoderator is active, turns the text filtering rules on or off.\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 three versions of " + AppName + ", the app, the bot, and the lite 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 useless, 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.\nThe main difference in the Lite bot is that on start up, there are less options to play with, so it is less daunting. Once started, the full command line inertface is there for use in all three versions.\n If you use apps, like crazyticket or the ohmibod apps, then use one of the two bot versions. If English is not your 1st language, or the startup looks daunting, stick to the Lite version and get someone like me trained up in how to use the command line while you do your show. KIK me at AlftedVButler, I can and will train your moderators if needed. I only speak 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) The ability to persist some data between app runs. If you remember to access the certain data stored in the app (via the /show command, most commands may be abbreviated e.g. /sh), you can enter it in on the next app start. \n2) A fun magic system, frogs, cats and duct tape, a separate set of commands, unrelated to VIP/moderator oriented commands of the rest of " + AppName + ".\n3) Grey friendly automoderator (greys have helped to fine tune it), parts of it can be switched off. Kills that token generator spam."; case 4: return "4) Non moderators can be made VIP's and given near moderator rights, 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.\n5) 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 can disable the prefix for " + AppName + " so the two do not clash.\n6) Boring blue nagger/notifier, tells you those who can tip who just sit there and watch, a lot of apps let you deal with freeloading greys, now you can deal with those freeloading blues too.\n7) In chat-PM, currently one to one.\8) 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.\n9) Can operate almost invisibly, various parts of " + AppName + " can be muted, and there is a yellow wall mode. It is modular, so you need not run all of the features. See /help-modular and /help-yellowwall for more info.\n10) No need to restart " + AppName + " if you want to change things, a command system (e.g. /help) 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 or Lite (minimal parameters on bot start, get started quickly) mode.\n12) The colour of various messages from the " + AppName + " modules can be changed."; } }, 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, and row 3 is the request price. When FMI is activated, row 3 is a rotating series of messages. It is recommended that you only try to change row 3."; 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.\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), id 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 which may cause an update. When FMI is activated, the row 3 message is incorporated in to the rotating sequence of messages, and replaced 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, it removes unwanted messages from the general viewers chat. As room owner or moderator, you still get to see it, along with the automod rule it broke, in order to decide what action to take. \nToken generator spam is killed by default whether automoderator is on or not, you will have to type in commands to alter automoderator behaviour to allow this stuff to get through. The thought is that no one wants to see that stuff, but if you do, then you can. \nAutomoderator off is the best setting for people out there on cam looking for people to C2C with, online dating, or looking to PM greys for amazon shows, and other activities. Automoderator on is better for people aiming for tokens, or private shows, and those wanting to concentrate on blue viewers. Automoderator, /ban, /nice and /silence can 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 for greys or blues, and the /set-rule command.\n/set-rule-grey-number-on/off and /set-rule-blue-number-on/off e.g. /set-rule-grey-3-on.\nThe default for blue automoderation is no blue advertising or requests to go view other cams, and a message about there being a possible token fee for PMs (but the PM request is forwarded to the broadcaster).\nThe default for grey automoderation is to try and tell them to tip before demands, that PMs are not normally accepted without tokens (but the request is still seen by the broadcaster), no adverising, no CAPS lock messages, attempts try to divert begging, and go view other cams.\nAutomoderator does not block valid use of the letters pm e.g. 10pm, and some caps messages lie LOL."; case 4: return "There are no filters to block GIFs in automod at this time. as most GIF blockers kill smileys too :) and :D . Use something like ultrabot for that. The default response for automoderator is to turn people in to frogs for that message only, and to remove the message text. PM requests are let through with a warning they may not be accepted. Use /show-spam to view the last 10 rejected messages. Use /nice to allow people to be exempt from automod. Quite often it is useful to disable grey CAPS lock automoderation. Use /silence to get rid of unwanted people ( see /help-silence).\nOccasionally a new word/phrase you want banned suddenl appears in chat, normally some new webcam site. You may use the /ban-<1/2/3>-phrase command. There are up to 3 phrases you can ban. e.g. /ban-3-hello world bans the phrase hello world form chat, use /ban-<1/2/3>- witouta phrase to clear the banned word. Use /ban-list to show the 3 banned phrases, feel free to use my KIK details to message me new phrases you want banned."; } }, 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. Useful if you are a token-centric broadcaster, you can go kick them out of the room. Useful if you are chat oriented, 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."; 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 at this point, 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> 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). "; } }, 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- command if you need to change the goals at any time. Use /show-goal to list the current goals, use a tet 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."; } }, 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 /helpt-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-loeaderboard-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), (coming soon multi way multi room in chat PM - the conference facility). /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 i a /say 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"; 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."; } }, 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 "Exempting greys from automoderation and other /silence options is a use for this."; } }, 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 silences all chat except tippers, 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 currenrt goals in a format that can be copy/pasted in to the /goal-set command, or the app when you start it. If you wish to have a new set of goals, the best solution is to use /nn to deactivate multigoal, then use the /goal-reset-tip and /goal-set commands to create a new goal, then use /mm to reactivate the multi goal."; } }, // Normal user version of goal help goal2: function (intA) { switch (intA) { case 1: return "goal"; case 2: return "/goal-list"; case 3: return "List goals to yourself. "; } }, 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"; 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."; } }, 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 + " output to the room title and chat window. 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) { // for those rare messages that must get through (in chat PM), spam/automoderator stats 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(Row3, out, 100); cb.log("Row 3 set to " + out); Modules[FMIModule].vars.timedMessageNumber++; if (Modules[FMIModule].vars.timedMessageNumber == 6) { 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 == 10 && Modules[MultiGoalModule].isEnabled) { if ((Modules[MultiGoalModule].vars.currentGoalTip - Modules[MultiGoalModule].vars.GoalTips) > 0) { // Messenger.sendGenericMessage("debug: " + Modules[MultiGoalModule].vars.currentGoalTip + " " + Modules[MultiGoalModule].vars.GoalTips, Colours.White, Colours.GoalColour); if (Modules[MultiGoalModule].vars.displayMessage > (howOftenToDisplayGoal * 3)) { // 3 lots of 20 seconds in a minute 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 { if ((Modules[MultiGoalModule].vars.displayMessag * 12) > (howOftenToDisplayGoal * 60)) { Messenger.sendGenericMessage("All goals met.", Colours.Green, Colours.White); 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(Row3, Row3_Message, 100); 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. "); for (var z = 0; z < Modules[MultiGoalModule].vars.currentMaxGoals; z++) { // list the goals Messenger.sendGenericMessage(z + 1 + " " + Modules[MultiGoalModule].vars.currentGoal[z] + " " + Modules[MultiGoalModule].vars.currentGoalTips[z] + " Tokens.", Colours.GoalColour, Colours.White, myself); cb.log(Modules[MultiGoalModule].vars.currentGoal[z] + "-" + Modules[MultiGoalModule].vars.currentGoalTips[z]); if (Modules[StealthModule].vars.RowUpdateVisible && AppMode) { cb.drawPanel(); } } 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[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(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, 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, 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: ["on", "on", "on", "off", "on", "on", "on"], muteBlue: ["on", "on", "off", "off", "on"], unwantedCount: 0, tempban1: "", tempban2: "", tempban3: "", mutereasonsgrey: [{ regexp: /^.*?\b(fuck|finger|show|zoom|see|touch|spread|lick|pound|fck)\b.\b(body|ass|him|her|his|pussy|boobs?|bobs?|tits?|vagina|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: 'No demands without a tip first, so purchase some tokens.', ruletext: 'Demands that require tokens' }, { regexp: /((?=.*pm)|(?=.*c2c)|(?=.*pvt.msg))/i, notice: 'A PM or C2C will cost you tokens, and you dont have any, ' + cb.room_slug + ' will see your request if grey chat is not muted.', ruletext: 'PM or C2C requests' }, { regexp: /((?=.*18f cam)|(?=.*streamingnaked)|(?=.*18female)|(?=.*erotimo)|(?=.*amecam)|(?=.*18 f)|(?=.*19 f)|(?=.*bestwork)|(?=.*freecam)|(?=.*kikcams)|(?=.*yespills)|(?=.*ellago)|(?=.*kikfuck)|(?=.*Getdrugsfast)|(?=.*bbgirly175)|(?=.*Amecam)|(?=.*pornmeds)|(?=.*swipegirls)|(?=.*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 room.?.?)|(?=.*watch my cam.?.?)|(?=.*see my cam.?.?)|(?=.*like my cam.?.?)|(?=.*who wants to see my.?.?)|(?=.*open cam.?.?)|(?=.*on cam.?.?)|(?=.*open my cam.?.?)|(?=.*watch me.?.?)|(?=.*view my cam.?.?)|(?=.*add my.?.?)|(?=.*view me.?.?))/i, notice: 'The fee for this is a $250 Amazon card, please pay up now.', ruletext: 'Visit other rooms' }], mutereasonsothers: [{ regexp: /((?=.*pm)|(?=.*c2c)|(?=.*pvt.msg))/i, notice: 'There may be a token fee for a PM or C2C, ' + cb.room_slug + ' will see your request.', ruletext: 'PM or C2C requests' }, { regexp: /((?=.*18f cam)|(?=.*streamingnaked)|(?=.*18female)|(?=.*erotimo)|(?=.*amecam)|(?=.*18 f)|(?=.*19 f)|(?=.*bestwork)|(?=.*freecam)|(?=.*kikcams)|(?=.*yespills)|(?=.*ellago)|(?=.*kikfuck)|(?=.*Getdrugsfast)|(?=.*bbgirly175)|(?=.*Amecam)|(?=.*pornmeds)|(?=.*swipegirls)|(?=.*premium.?.?cheat)|(?=.*free.?.?tokens?)|(?=.*tokens?.?.?free)|(?=.*tokens?.?.?gen)|(?=.*tokens.4.?)|(?=.*free.?.?token?)|(?=.*unlimited.?.?token?)|(?=.*500K tokens.?.?)|(?=.*token giveaway.?.?)|(?=.*tokens adder.?.?)|(?=.*tons of token.?.?)|(?=.*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, tip me 5000 tokens, and I will promote you myself.', ruletext: 'Illegal website advertising' }, { regexp: /((?=.*slut)|(?=.*whore)|(?=.*ugly)|(?=.*fat))/i, notice: 'Some rudeness is still not allowed, no matter how much you might be able to tip.', ruletext: 'Rudeness' }, { regexp: /^[A-Z\s]+/, notice: 'You have your Caps Lock pressed, deselect it and try again, room owner has seen your message, no one else has.', ruletext: 'CAPS lock' }, { regexp: /((?=.*visit my room.?.?)|(?=.*watch my cam.?.?)|(?=.*come to my cam.?.?)|(?=.*see my cam.?.?)|(?=.*like my cam.?.?)|(?=.*who wants to see my.?.?)|(?=.*open cam.?.?)|(?=.*on cam.?.?)|(?=.*open my cam.?.?)|(?=.*watch me.?.?)|(?=.*view my cam.?.?)|(?=.*view me.?.?))/i, notice: 'The fee for this is 5000 tokens, 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); 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; // look for bad greys, if (((!msg['has_tokens']) && (!msg['is_mod']) && (!msg['in_fanclub']) && (!msg['msg.tipped_recently']) && (!msg['tipped_alot_recently']) && (!msg['tipped_tons_recently']) && (!isBroadcaster(msg.user)) && (MuteLevel == 0)) /*|| (msg.user == "ebl2")*/) { //any MuteLevel other than 0 blocks greys threrfore only automod MuteLevel 0 // grey message filtering for (var i = 0; i <= 6; i++) { if ((msg.m.search(Modules[AutoModeratorModule].vars.mutereasonsgrey[i].regexp) != -1) && (Modules[AutoModeratorModule].vars.muteGrey[i] == "on")) { 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 === "LMFAO") || (msg.m === "OK") || (msg.m === "LMAO") || (msg.m === "BRB"))) { // second check for all uppercase Modules[AutoModeratorModule].vars.frogMe = false; Modules[AutoModeratorModule].vars.muteMe = false; } if (i == 2) { // we know this stuff is shit, dont even give it the honour of a frogging, just get rid of it Modules[AutoModeratorModule].vars.invisible = false; // future expansion, make this true to hid this sort of spam } 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; } Modules[AutoModeratorModule].vars.muteReason = Modules[AutoModeratorModule].vars.mutereasonsgrey[i].notice; //Messenger.sendGenericMessage("Ban." + i, Colours.Blue, Colours.White,msg.user); return; } } var t1 = new RegExp(Modules[AutoModeratorModule].vars.tempban1, 'i'); var t2 = new RegExp(Modules[AutoModeratorModule].vars.tempban2, 'i'); var t3 = new RegExp(Modules[AutoModeratorModule].vars.tempban3, 'i'); if (Modules[AutoModeratorModule].vars.tempban1 != "" && msg.m.search(t1) != -1) { Modules[AutoModeratorModule].vars.muteMe = true; Modules[AutoModeratorModule].vars.frogMe = true; Modules[AutoModeratorModule].vars.muteReason = "you have entered temporarily banned phrase 1."; } if (Modules[AutoModeratorModule].vars.tempban2 != "" && msg.m.search(t2) != -1) { Modules[AutoModeratorModule].vars.muteMe = true; Modules[AutoModeratorModule].vars.frogMe = true; Modules[AutoModeratorModule].vars.muteReason = "you have entered temporarily banned phrase 2."; } if (Modules[AutoModeratorModule].vars.tempban3 != "" && msg.m.search(t3) != -1) { Modules[AutoModeratorModule].vars.muteMe = true; Modules[AutoModeratorModule].vars.frogMe = true; Modules[AutoModeratorModule].vars.muteReason = "you have entered temporarily banned phrase 3."; } if (Modules[AutoModeratorModule].vars.tempban3 == "footjob") { Modules[AutoModeratorModule].vars.muteMe = true; Modules[AutoModeratorModule].vars.frogMe = true; Modules[AutoModeratorModule].vars.muteReason = "Automoderator thinks you are begging for a footjob. Tip first."; } } // look for bad blues (exlude broadcaster) if ((msg['has_tokens'] || msg['in_fanclub']) || msg['msg.tipped_recently'] || msg['tipped_alot_recently'] || msg['tipped_tons_recently'] && (!isBroadcaster(msg.user))) { // blue message filtering for (var i = 0; i <= 4; i++) { if ((msg.m.search(Modules[AutoModeratorModule].vars.mutereasonsothers[i].regexp) != -1) && (Modules[AutoModeratorModule].vars.muteBlue[i] == "on")) { Modules[AutoModeratorModule].vars.muteMe = true; Modules[AutoModeratorModule].vars.frogMe = false; if ((i == 1) || (i == 2) || (i == 3) || (i == 4)) { //frog CAPS, spammers or rude Modules[AutoModeratorModule].vars.frogMe = true; } if ((i == 3) && (msg.m.toUpperCase() != msg.m)) { // second check for all uppercase Modules[AutoModeratorModule].vars.frogMe = false; Modules[AutoModeratorModule].vars.muteMe = false; } if ((i == 3) && ((msg.m === "LOL") || (msg.m === "LMFAO") || (msg.m === "LMAO") || (msg.m === "OK") || (msg.m === "BRB"))) { // second check for all uppercase Modules[AutoModeratorModule].vars.frogMe = false; Modules[AutoModeratorModule].vars.muteMe = false; } Modules[AutoModeratorModule].vars.exceptionMe = false; if (i === 0) { //let through PM requests messages Modules[AutoModeratorModule].vars.exceptionMe = true; } if (i == 1) { // we know this stuff is shit, dont even give it the honour of a frogging, just get rid of it Modules[AutoModeratorModule].vars.invisible = false; // future expansion, make this true to hid this sort of spam } 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 ==0)) { // dont want to bounce times that have a PM in then Modules[AutoModeratorModule].vars.muteMe = false; Modules[AutoModeratorModule].vars.frogMe = false; Modules[AutoModeratorModule].vars.exceptionMe = false; } Modules[AutoModeratorModule].vars.muteReason = Modules[AutoModeratorModule].vars.mutereasonsothers[i].notice; //Messenger.sendGenericMessage("Ban." + i, Colours.Blue, Colours.White,msg.user); return; } } var t1 = new RegExp(Modules[AutoModeratorModule].vars.tempban1, 'i'); var t2 = new RegExp(Modules[AutoModeratorModule].vars.tempban2, 'i'); var t3 = new RegExp(Modules[AutoModeratorModule].vars.tempban3, 'i'); if (Modules[AutoModeratorModule].vars.tempban1 != "" && msg.m.search(t1) != -1) { Modules[AutoModeratorModule].vars.muteMe = true; Modules[AutoModeratorModule].vars.frogMe = true; Modules[AutoModeratorModule].vars.muteReason = "you have entered temporarily banned phrase 1."; } if (Modules[AutoModeratorModule].vars.tempban2 != "" && msg.m.search(t2) != -1) { Modules[AutoModeratorModule].vars.muteMe = true; Modules[AutoModeratorModule].vars.frogMe = true; Modules[AutoModeratorModule].vars.muteReason = "you have entered temporarily banned phrase 2."; } if (Modules[AutoModeratorModule].vars.tempban3 != "" && msg.m.search(t3) != -1) { Modules[AutoModeratorModule].vars.muteMe = true; Modules[AutoModeratorModule].vars.frogMe = true; Modules[AutoModeratorModule].vars.muteReason = "you have entered temporarily banned phrase 3."; } } }, killadverts: 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); 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; // look for bad greys, if ((!msg['has_tokens']) && (!msg['is_mod']) && (!msg['in_fanclub']) && (!msg['msg.tipped_recently']) && (!msg['tipped_alot_recently']) && (!msg['tipped_tons_recently']) && (!isBroadcaster(msg.user))) { // grey message filtering if ((msg.m.search(Modules[AutoModeratorModule].vars.mutereasonsgrey[2].regexp) != -1) && (Modules[AutoModeratorModule].vars.muteGrey[2] == "on")) { Modules[AutoModeratorModule].vars.muteMe = true; Modules[AutoModeratorModule].vars.invisible = false; // future expansion, make this true to hid this sort of spam Modules[AutoModeratorModule].vars.muteReason = Modules[AutoModeratorModule].vars.mutereasonsgrey[2].notice; return; } } // look for bad blues (exlude broadcaster) if ((msg['has_tokens'] || msg['in_fanclub']) || msg['msg.tipped_recently'] || msg['tipped_alot_recently'] || msg['tipped_tons_recently'] && (!isBroadcaster(msg.user))) { // blue message filtering if ((msg.m.search(Modules[AutoModeratorModule].vars.mutereasonsothers[1].regexp) != -1) && (Modules[AutoModeratorModule].vars.muteBlue[1] == "on")) { Modules[AutoModeratorModule].vars.muteMe = true; Modules[AutoModeratorModule].vars.invisible = false; // future expansion, make this true to hid this sort of spam Modules[AutoModeratorModule].vars.muteReason = Modules[AutoModeratorModule].vars.mutereasonsothers[1].notice; return; } } }, 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], Colours.Black, Colours.White,msg.user); } for (var i = 0; i <= 4; i++) { Messenger.sendUnblockedMessage("Blue " + i + " : " + Modules[AutoModeratorModule].vars.mutereasonsothers[i].ruletext + " : " + Modules[AutoModeratorModule].vars.mutereasonsothers[i].notice + " : " + Modules[AutoModeratorModule].vars.muteBlue[i], Colours.Black, Colours.White,msg.user); } }, onEnable: function () { Modules[AutoModeratorModule].isEnabled = true; Messenger.sendGenericMessage("Auto Moderator activated.", Colours.AutomoderatorColour, Colours.White); }, onDisable: function () { Modules[AutoModeratorModule].isEnabled = false; Messenger.sendGenericMessage("Auto Moderator not active.", Colours.AutomoderatorColour, Colours.White); } }, { 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.ShowNotify) { Messenger.sendGenericMessage("Rotating notifier started every " + Modules[NotifierModule].vars.NotifierFrequency + " minutes.", Colours.NotifierColour, Colours.White); } 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); } 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) { Messenger.sendGenericMessage("Leaderboard!",Colours.LeaderBoardColour,Colours.White,theuser); if (Tippers.List.length == 1) { Messenger.sendGenericMessage(Tippers.List[0].name + " : " + Tippers.List[0].totalTips,Colours.LeaderBoardColour,Colours.White,theuser); } else if (Tippers.List.length == 2) { Messenger.sendGenericMessage(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(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("No tippers.",Colours.LeaderBoardColour,Colours.White,theuser); } }, onEnable: function () { leaderboardon = true; 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) { for (var t = 0; t < UserList.length; t++) { if (UserList[t].name == auser) { if (!UserList[t].silence) { Modules[NagModule].NotifyMonitorsWarning("Message from user " + auser + "(" + GetUserID(auser) + ")"); } } } 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; } } 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: "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", }]; if (choosemode == "App") { cb.settings_choices = cb.settings_choices.concat( { name: "FMIEnabled", type: "choice", choice1: "Yes", choice2: "No", defaultValue: "Yes", label: "Activate For My Information (FMI) on startup?" }); } if (choosemode != "Lite") { cb.settings_choices = cb.settings_choices.concat( { name: "MagicFlag", type: "choice", choice1: "Yes Visible", choice2: "Yes Invisible", choice3: "No", defaultValue: "Yes Visible", label: "Enable magic use (highlight magic users, show magic use)?" }, { name: "MagicColour", type: "str", minLength: 6, maxLength: 6, defaultValue: "F5F5F5", label: "Magic users background highlight (for default use F5F5F5)?" }, { name: "NecromancerList", type: "str", minLength: 1, maxLength: 255, defaultValue: "smokersexual,lagunadistortion,mhs01", label: "List of Necromancer users (comma separated list)", required: false }, { name: "NecromancerColour", type: "str", minLength: 6, maxLength: 6, defaultValue: "800080", label: "Necromancer magic colour (for default use 800080)?" }, { name: "WizardList", type: "str", minLength: 1, maxLength: 255, defaultValue: "", label: "List of Wizard users (comma separated list)", required: false }, { name: "WizardColour", type: "str", minLength: 6, maxLength: 6, defaultValue: "0000FF", label: "Wizard magic colour (for default use 0000FF)?" }); } cb.settings_choices = cb.settings_choices.concat( { name: "SilenceList", type: "str", minLength: 1, maxLength: 2500, defaultValue: "", label: "List of Silenced users (comma separated list)", required: false }, { name: "NiceList", type: "str", minLength: 1, maxLength: 2500, defaultValue: "", label: "List of Nice users (comma separated list)", required: false }, { name: "VIPList", type: "str", minLength: 1, maxLength: 2500, defaultValue: "smokersexual,lagunadistortion", label: "List of VIP users (comma separated list), note that the script authors are VIPs by default", required: false }, { name: "AutomoderatorFlag", type: "choice", choice1: "Yes", choice2: "No", defaultValue: "Yes", label: "Enable Automoderator?" }); if (choosemode != "Lite") { cb.settings_choices = cb.settings_choices.concat( { name: "AutomoderatorColour", type: "str", minLength: 6, maxLength: 6, defaultValue: "FFA500", label: "Automoderator message colour (for default use FFA500)?" }, { 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. No promoting of other rooms is allowed. Thankyou.", label: "This is what blues see when entering chat (blank for no message).", required: false }, { name: "GreyWelcome", type: "str", minLength: 1, maxLength: 2500, defaultValue: "Feel free to join the chat. 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 }); } if (choosemode == "App") { cb.settings_choices = cb.settings_choices.concat( { name: "UpdateSubject", type: "choice", choice1: "Yes", choice2: "No", defaultValue: "Yes", label: "Update Subject on Tip?" }, { name: "HighestTipper", type: "choice", choice1: "Yes", choice2: "No", defaultValue: ((show.highestTotal) ? "Yes" : "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: "#couple,#bareback,#married,#fuck,#pussy,#ass,#tits,#dildo", required: false }); } if (choosemode != "Lite") { 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)?" }); } cb.settings_choices = cb.settings_choices.concat( { 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" }); if (choosemode != "Lite") { cb.settings_choices = cb.settings_choices.concat( { name: "LeaderBoardColour", type: "str", minLength: 6, maxLength: 6, defaultValue: "DEB887", label: "Leader Board colour (for default use DEB887)?" }); } cb.settings_choices = cb.settings_choices.concat( { 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: 3, required: false }); if (choosemode != "Lite") { cb.settings_choices = cb.settings_choices.concat( { name: "NotifierColour", type: "str", minLength: 6, maxLength: 6, defaultValue: "4169E1", label: "Leader Board colour (for default use 4169E1)?" }); } cb.settings_choices = cb.settings_choices.concat( { 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: 5, required: false }); if (choosemode != "Lite") { cb.settings_choices = cb.settings_choices.concat( { name: "TipMenuColour", type: "str", minLength: 6, maxLength: 6, defaultValue: "8FBC8F", label: "Tip Menu colour (for default use 8FBC8F)?" }); } 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 }); } if (choosemode != "Lite") { cb.settings_choices = cb.settings_choices.concat( { name: "GoalEnabled", type: "choice", choice1: "Yes", choice2: "No", defaultValue: "No", label: "Activate Multi Goal on startup?" }, { 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: 2000, defaultValue: "", required: false }); //Thank you Mx2k6!! /* var goalSettings = []; goalSettings.push({ name: 'NumberOfGoals', label: 'Number of goals for Multi Goal module', type: 'int', minValue: 1, defaultValue: (Modules[MultiGoalModule].vars.currentMaxGoalsDefault), required: false }); for (var gSetting = 0; gSetting <= 9; gSetting++) { goalSettings.push({ name: 'goal_' + (gSetting+1) + '_tokens', label: 'Goal ' + (gSetting+1) + ' Token Amount', type: 'int', minValue: 0, defaultValue: (Modules[MultiGoalModule].vars.currentGoalTipsDefault[gSetting]), required: false }); goalSettings.push({ name: 'goal_' + (gSetting+1) + '_description', label: 'Goal ' + (gSetting+1) + ' Description', type: 'str', minLength: 0, maxLength: 255, defaultValue: (Modules[MultiGoalModule].vars.currentGoalDefault[gSetting]), required: false }); } cb.settings_choices = cb.settings_choices.concat(goalSettings); */ } 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.", msg.user); } else if (New.length <= charLimit) { if (Row === Row1) { Row1 = New; if (Modules[StealthModule].vars.RowUpdateVisible) { cb.drawPanel(); } } else if (Row === Row2) { Row2 = New; if (Modules[StealthModule].vars.RowUpdateVisible) { cb.drawPanel(); } } else if (Row === Row3) { Row3 = New; if (Modules[StealthModule].vars.RowUpdateVisible) { cb.drawPanel(); } } } else if (New.length > charLimit) { Messenger.sendErrorMessage("String is too long!.", msg.user); } } else { Messenger.sendErrorMessage("Only available when run as an App.", msg.user); } } // 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") && 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, weighting: 0, frog: false, cat: false, silence: false, ducttape: false, wizard: false, necromancer: false, automoderated: false, moderator: is_a_mod, showUID: false, has_tokens: can_tip, has_tipped: 0, boring_blue: false, roomID: MainChat, awesome_person: false, 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, weighting: 0, frog: false, cat: false, silence: false, ducttape: false, wizard: false, necromancer: false, automoderated: false, moderator: is_a_mod, showUID: false, has_tokens: can_tip, has_tipped: kerching, boring_blue: false, awesome_person: false, 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; } } } } 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; } // 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; return; } } UserList.push({ name: username, userID: nextUID, weighting: 0, frog: setfrog, cat: false, silence: false, ducttape: false, wizard: false, necromancer: false, automoderated: false, moderator: false, has_tokens: false, has_tipped: 0, boring_blue: false, roomID: MainChat, 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; return; } } UserList.push({ name: username, userID: nextUID, weighting: 0, frog: false, cat: setcat, silence: false, ducttape: false, wizard: false, necromancer: false, automoderated: false, moderator: false, has_tokens: false, has_tipped: 0, boring_blue: false, roomID: MainChat, 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, weighting: 0, frog: false, cat: false, silence: false, ducttape: false, wizard: false, necromancer: false, automoderated: setauto, moderator: false, has_tokens: false, has_tipped: 0, boring_blue: false, roomID: MainChat, 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, weighting: 0, frog: false, cat: false, silence: setsilence, ducttape: false, wizard: false, necromancer: false, automoderated: false, moderator: false, has_tokens: false, has_tipped: 0, boring_blue: false, roomID: MainChat, 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; return; } } UserList.push({ name: username, userID: nextUID, weighting: 0, frog: false, cat: false, silence: false, ducttape: setducttape, wizard: false, necromancer: false, automoderated: false, moderator: false, has_tokens: false, has_tipped: 0, boring_blue: false, roomID: MainChat, 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 isNice(username) { for (var t = 0; t < UserList.length; t++) { if (UserList[t].name == username) { return UserList[t].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 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); // 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.BurlyWood, 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.BurlyWood, 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; function OnMessage(msg) { var msgL = msg.m.length; var spellCast = false; // 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; } } */ 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; Messenger.sendErrorMessage(out, msg.user); 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); } } 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) && !isNice(msg.user) && !isBroadcaster(msg.user)) { Messenger.sendWarningMessage("You cannot use GIFs right now, only you can see your GIFs.", msg.user); msg["X-Spam"] = true; } } if (MuteLevel == 1) { // all grey messages except /nice greys are blockef 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) && !isBroadcaster(msg.user)) { msg["X-Spam"] = true; Messenger.sendWarningMessage("Most grey messages are currently muted, and this includes yours. Buy tokens to talk.", msg.user); } } else if (MuteLevel == 2) { // if you tipped, or have been /nice'd, then you cna talk if (!hasUserTipped(msg.user) && !msg.is_mod && !msg.in_fanclub && !isScriptAuthor(msg.user) && !isNice(msg.user) && !isBroadcaster(msg.user)) { if (msg.has_tokens || msg.tipped_recently || msg.tipped_alot_recently || msg.tipped_tons_recently) { Messenger.sendWarningMessage("Most non tippers are muted at the moment, however the room owner and moderators have seen your message, and can add you to chat if they want to.", msg.user); Messenger.sendWarningMessage("Muted User " + msg.user + "(" + GetUserID(msg.user) + "): " + msg.m, cb.room_slug); Modules[NagModule].NotifyModeratorsWarning("Muted User " + msg.user + "(" + GetUserID(msg.user) + "): " + msg.m); } else { Messenger.sendWarningMessage("Most messages are currently muted. Please tip at least 1 token to have your messages visible in chat.", msg.user); } msg["X-Spam"] = true; } } else if (MuteLevel == 3) { //room owner, mods, and /nice users only if (!msg.is_mod && !isScriptAuthor(msg.user) && !isNice(msg.user) && !isBroadcaster(msg.user)) { msg["X-Spam"] = true; Messenger.sendWarningMessage("Most messages are currently muted, main chat probably got too busy to moderate, sorry! Please enjoy the show, and use tip notes or a PM to message the performer.", msg.user); } } // Splits the string at the - and stores it in an array var cmd = msg.m.toLowerCase().split("-"); // unwanted message check, greys filtered aggressively, blues less so, mods, VIP's, nice users, and broadcaster never if (Modules[AutoModeratorModule].isEnabled && (!msg.is_mod && !isScriptAuthor(msg.user) && !isNice(msg.user) && !isBroadcaster(msg.user))) { Modules[AutoModeratorModule].AutoModerator(msg); if (Modules[AutoModeratorModule].vars.muteMe) { Messenger.sendWarningMessage(Modules[AutoModeratorModule].vars.muteReason, msg.user); // tell them they failed automoderation // MuteLevel of 0 = any can chat, therefore need to tell the room owner and mods of n automod, a higher MuteLevel means automod messages are not seen, a blue can always tip their way back in to favour if (Modules[AutoModeratorModule].vars.tellRoomOwner && !Modules[AutoModeratorModule].vars.invisible && (MuteLevel == 0)) { // tell room owner if all chat is allowed and room owner wants to see Messenger.sendWarningMessage(msg.user + " : " + Modules[AutoModeratorModule].vars.muteReason + " : " + msg.m, cb.room_slug); } if (!Modules[AutoModeratorModule].vars.invisible && (MuteLevel == 0)) { //likewise tell moderators Modules[NagModule].NotifyModeratorsWarning(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) { // show frog text if magic enabled Messenger.sendMagicMessage("Automoderator dislikes a message, " + msg.user + " briefly turns in to a frog.", Colours.AutomderatorColour, Colours.White); } // frog them anyhow, just incase someone turns magic back on FrogUser(msg.user, true); // the automoderate, remove their exemption frm the nagger, and set their message to spam. AutomoderateUser(msg.user, true); ResetUser(msg.user,delayBetweenNag,false,false); if (!Modules[MagicModule].vars.MagicEnabled) { 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; } } } else { // if an offender puts in a good message though, let them back in, might have neen an innocent mistake if (isModerated(msg.user)) { FrogUser(msg.user, false); AutomoderateUser(msg.user, false); RankUser(msg.user, 5); } } } else if (!msg.is_mod && !isScriptAuthor(msg.user) && !isNice(msg.user) && !isBroadcaster(msg.user)) { // dont care if automod is off, this stuff aint getting thru if the filer is on, period Modules[AutoModeratorModule].killadverts(msg); if (Modules[AutoModeratorModule].vars.muteMe) { Messenger.sendWarningMessage(Modules[AutoModeratorModule].vars.muteReason, msg.user); ResetUser(msg.user,delayBetweenNag,false,false); msg["X-Spam"] = true; } } // check for user being a frog (frogs 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 (isFrog(msg.user)) { spellCast = true; msg.m = "[The Frog]: " + FrogMessages[currentCount]; msg['background'] = Colours.GreenYellow; } // 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]; } } // silence is golden, and best of all, they dont know they are silenced // however they can still issue commands if (isSilence(msg.user)) { msg["X-Spam"] = true; } magicMessagePreviousCount = zeroToTwo; } } // 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) && !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); } // 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 ((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 = " "; if (PowerUser) { tempBody = Help.features(1) + s + "App Features" + 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.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.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" ; } else { tempBody = Help.features(1) + s + "App Features" + e + Help.goal(1) + s + "/goal-show" + e + Help.show(1) + s + "/show-necromancers /show-wizards /show-rules /show-tippers"; } 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-set.", 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] == 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.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.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.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 { 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)"; } 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.sendGenericMessage("Author Mode Visible : " + Modules[StealthModule].vars.AuthorModeVisible, Colours.Black, Colours.White, msg.user); Messenger.sendGenericMessage("Row Update Visible : " + Modules[StealthModule].vars.RowUpdateVisible, Colours.Black, Colours.White, msg.user); Messenger.sendGenericMessage("Chat Output Visible : " + Modules[StealthModule].vars.ChatOutputVisible, Colours.Black, Colours.White, msg.user); Messenger.sendGenericMessage("Magic User Visible : " + Modules[StealthModule].vars.MagicUserVisible, Colours.Black, Colours.White, msg.user); Messenger.sendGenericMessage("Error Messages Visible : " + Modules[StealthModule].vars.ErrorVisible, Colours.Black, Colours.White, msg.user); Messenger.sendGenericMessage("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(Row1, msg.m.substring(cmd[0].length + cmd[1].length + 2, msgL), 55); } else if (cmd[1] === "2") { SetRow(Row2, msg.m.substring(cmd[0].length + cmd[1].length + 2, msgL), 55); } else if (cmd[1] === "3") { SetRow(Row3, 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 ((["title", "titl", "tit", "ti"].indexOf(cmd[1]) > -1) && !AppMode) { Messenger.sendErrorMessage("Only available when run as an App.", msg.user); } else if ((["colour", "color", "colou", "colo", "col", "co","c"].indexOf(cmd[1]) > -1) && AppMode) { 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 (["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.DarkSeaGreen.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].NotifyModerators("Inactive Blue Monitoring System enabled.", Colours.Black, Colours.White); 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].NotifyModerators("Inactive Blue Nagging System enabled.", Colours.Black, Colours.White); 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].NotifyModerators("Inactive Blue Nagging System disabled.", Colours.Black, Colours.White); 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].NotifyModerators("Room owner can see spam", Colours.Black, Colours.White); Messenger.sendGenericMessage("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].NotifyModerators("Room owner can not see spam", Colours.Black, Colours.White); Messenger.sendGenericMessage("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 (["all", "al", "a"].indexOf(cmd[2]) > -1) { if (cmd[3] === "on") { for (var i = 0; i <= 6; i++) { Modules[AutoModeratorModule].vars.muteGrey[i] = "on"; } for (var i = 0; i <= 3; i++) { Modules[AutoModeratorModule].vars.muteBlue[i] = "on"; } Messenger.sendGenericMessage("All Spam Filters On", Colours.Black, Colours.White, msg.user); } else if (cmd[3] === "off" || cmd[3] === "of") { for (var i = 0; i <= 6; i++) { Modules[AutoModeratorModule].vars.muteGrey[i] = "off"; } for (var i = 0; i <= 3; i++) { Modules[AutoModeratorModule].vars.muteBlue[i] = "off"; } Messenger.sendGenericMessage("All Spam Filters Off", Colours.Black, Colours.White, msg.user); } else { Messenger.sendErrorMessage("Use either all-on or all-off with this command", msg.user); } } else if (["blue", "blu", "bl", "b"].indexOf(cmd[2]) > -1) { if (cmd[3] === "on") { for (var i = 0; i <= 3; i++) { Modules[AutoModeratorModule].vars.muteBlue[i] = "on"; } Messenger.sendGenericMessage("All Blue Spam Filters On", Colours.Black, Colours.White, msg.user); } else if (cmd[3] === "off" || cmd[3] === "of") { for (var i = 0; i <= 3; i++) { Modules[AutoModeratorModule].vars.muteBlue[i] = "off"; } Messenger.sendGenericMessage("All Blue Spam Filters Off", Colours.Black, Colours.White, msg.user); } else if (["0", "1", "2", "3"].indexOf(cmd[3]) > -1) { if (cmd[4] === "on") { Modules[AutoModeratorModule].vars.muteBlue[parseInt(cmd[3])] = "on"; Messenger.sendGenericMessage("Blue Spam Filter " + cmd[3] + " On", Colours.Black, Colours.White, msg.user); } else if (cmd[4] === "off" || cmd[4] === "of") { Modules[AutoModeratorModule].vars.muteBlue[parseInt(cmd[3])] = "off"; Messenger.sendGenericMessage("Blue Spam Filter " + cmd[3] + " Off", Colours.Black, Colours.White, msg.user); } else { Messenger.sendErrorMessage("Use either blue-<0 to 6>-on or blue-<0 to 3>-off with this command", msg.user); } } else { Messenger.sendErrorMessage("Use either blue-on or blue-off with this command", msg.user); } } else if (["grey", "gre", "gr", "g"].indexOf(cmd[2]) > -1) { if (cmd[3] === "on") { for (var i = 0; i <= 6; i++) { Modules[AutoModeratorModule].vars.muteGrey[i] = "on"; } Messenger.sendGenericMessage("All Grey Spam Filters On", Colours.Black, Colours.White, msg.user); } else if (cmd[3] === "off" || cmd[3] === "of") { for (var i = 0; i <= 6; i++) { Modules[AutoModeratorModule].vars.muteGrey[i] = "off"; } Messenger.sendGenericMessage("All Grey Spam Filters Off", Colours.Black, Colours.White, msg.user); } else if (["0", "1", "2", "3", "4", "5", "6"].indexOf(cmd[3]) > -1) { if (cmd[4] === "on") { Modules[AutoModeratorModule].vars.muteGrey[parseInt(cmd[3])] = "on"; Messenger.sendGenericMessage("Grey Spam Filter " + cmd[3] + " On", Colours.Black, Colours.White, msg.user); } else if (cmd[4] === "off" || cmd[4] === "of") { Modules[AutoModeratorModule].vars.muteGrey[parseInt(cmd[3])] = "off"; Messenger.sendGenericMessage("Grey Spam Filter " + cmd[3] + " Off", Colours.Black, Colours.White, msg.user); } else { Messenger.sendErrorMessage("Use either grey-<0 to 3>-on or grey-<0 to 6>-off with this command", msg.user); } } else { Messenger.sendErrorMessage("Use either grey-on or grey-off with this command", msg.user); } } else { Messenger.sendErrorMessage("Syntax set-rules-<options>-<on/off>, <options> is: all, blue or grey (with an optional rule number)", 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.White, Colours.ForestGreen); 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 > 4) { 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 5 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.Black, 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.Black, 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.Black, 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.Black, 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"].indexOf(cmd[0]) > -1) && PowerUser) { 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 ((["/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); // // fed up with laguna forgetting to call me when starting a show // constant reminders until he remembers. // } 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); // // 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); Messenger.sendGenericMessage(targetUser + " is now on the nice list, they are exempt from automoderating.", Colours.Black, Colours.White, cb.room_slug); Messenger.sendGenericMessage(targetUser + " is now on the nice list, they are exempt from automoderating.", Colours.Black, Colours.White, targetUser); Modules[NagModule].NotifyModerators(targetUser + " is now on the nice list, they are 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.sendGenericMessage(targetUser + " is removed from the nice and VIP list.", Colours.Black, Colours.White, cb.room_slug); Messenger.sendGenericMessage(targetUser + " is removed from the nice and VIP list.", Colours.Black, Colours.White, targetUser); Modules[NagModule].NotifyModerators(targetUser + " is removed from the nice and VIP list.", 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); 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.sendGenericMessage(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].NotifyModerators(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] == "1") { if (cmd[2] != "") { Modules[AutoModeratorModule].vars.tempban1 = msg.m.substring(cmd[0].length + cmd[1].length + 2, msgL); } else { Modules[AutoModeratorModule].vars.tempban1 = ""; } Messenger.sendGenericMessage("These words are banned: (1) " + Modules[AutoModeratorModule].vars.tempban1 + ", (2) " + Modules[AutoModeratorModule].vars.tempban2 + ", (3) " + Modules[AutoModeratorModule].vars.tempban3, Colours.Black, Colours.White, msg.user); } else if (cmd[1] == "2") { if (cmd[2] != "") { Modules[AutoModeratorModule].vars.tempban2 = msg.m.substring(cmd[0].length + cmd[1].length + 2, msgL); } else { Modules[AutoModeratorModule].vars.tempban2 = ""; } Messenger.sendGenericMessage("These words are banned: (1) " + Modules[AutoModeratorModule].vars.tempban1 + ", (2) " + Modules[AutoModeratorModule].vars.tempban2 + ", (3) " + Modules[AutoModeratorModule].vars.tempban3, Colours.Black, Colours.White, msg.user); } else if (cmd[1] == "3") { if (cmd[2] != "") { Modules[AutoModeratorModule].vars.tempban3 = msg.m.substring(cmd[0].length + cmd[1].length + 2, msgL); } else { Modules[AutoModeratorModule].vars.tempban3 = ""; } Messenger.sendGenericMessage("These words are banned: (1) " + Modules[AutoModeratorModule].vars.tempban1 + ", (2) " + Modules[AutoModeratorModule].vars.tempban2 + ", (3) " + Modules[AutoModeratorModule].vars.tempban3, Colours.Black, Colours.White, msg.user); } else if (["list", "lis", "li", "l"].indexOf(cmd[1]) > -1) { Messenger.sendGenericMessage("These words are banned: (1) " + Modules[AutoModeratorModule].vars.tempban1 + ", (2) " + Modules[AutoModeratorModule].vars.tempban2 + ", (3) " + Modules[AutoModeratorModule].vars.tempban3, Colours.Black, Colours.White, msg.user); } else { Messenger.sendErrorMessage("Please use 1, 2 or 3 followed by the banned word or phrase with this command, or list to show the banned words.", msg.user); } } 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.sendGenericMessage(targetUser + " is removed from the VIP list, they are still on the nice list.", Colours.Black, Colours.White, cb.room_slug); Messenger.sendGenericMessage(targetUser + " is removed from the VIP list, they are still on the nice list.", Colours.Black, Colours.White, targetUser); Modules[NagModule].NotifyModerators(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 ((["uid", "ui"].indexOf(cmd[1]) > -1) && PowerUser) { if (["true", "tru", "tr", "t", "on"].indexOf(cmd[2]) > -1) { MonitoringUsers(msg.user,true); Messenger.sendGenericMessage("User ID's visible.", Colours.Black, Colours.White, msg.user); Messenger.sendGenericMessage(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.sendGenericMessage("User ID's hidden.", Colours.Black, Colours.White, msg.user); Messenger.sendGenericMessage(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.sendGenericMessage(Modules[MultiGoalModule].vars.GoalList, Colours.Black, Colours.White, msg.user); } else if (["tippers", "tipper", "tippe", "tipp", "tip", "ti", "tips"].indexOf(cmd[1]) > -1) { var WeGotOne = false; for (var u = 0; u < Tippers.List.length; u++) { if ((["all", "al", "a"].indexOf(cmd[2]) > -1 ) && PowerUser) { Messenger.sendGenericMessage("(" + (u+1) + ") - " + Tippers.List[u].name + "(" + GetUserID(Tippers.List[u].name) + ") tipped " + Tippers.List[u].totalTips, Colours.Black, Colours.White); } else { Messenger.sendGenericMessage("(" + (u+1) + ") - " + Tippers.List[u].name + " tipped " + Tippers.List[u].totalTips, Colours.Black, Colours.White, msg.user); } WeGotOne = true; } if (!WeGotOne) { Messenger.sendGenericMessage("No tippers.", Colours.Red, 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.sendGenericMessage(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.sendGenericMessage("No froged users on list.", Colours.Red, Colours.White, msg.user); } else { Messenger.sendGenericMessage(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 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.sendGenericMessage("No feline users on list.", Colours.Red, Colours.White, msg.user); } else { Messenger.sendGenericMessage(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.sendGenericMessage("No silenced users on list.", Colours.Red, Colours.White, msg.user); } else { Messenger.sendGenericMessage(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.sendGenericMessage("No taped users on list.", Colours.Red, Colours.White, msg.user); } else { Messenger.sendGenericMessage(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.sendGenericMessage("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.sendGenericMessage(UserList[u].name + "(" + UserList[u].userID + ") - Boring " + UserList[u].boring_blue + ", Left " + UserList[u].they_left + ", Rank " + UserList[u].weighting, 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.sendGenericMessage(UserList[u].name + "(" + UserList[u].userID + ") - Boring " + UserList[u].boring_blue + ", Left " + UserList[u].they_left + ", Rank " + UserList[u].weighting, 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.sendGenericMessage(UserList[u].name + "(" + UserList[u].userID + ") - Boring " + UserList[u].boring_blue + ", Left " + UserList[u].they_left + ", Rank " + UserList[u].weighting, Colours.Black, Colours.White, msg.user); WeGotOne = true; } } } } if (!WeGotOne) { Messenger.sendGenericMessage("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.sendGenericMessage("No wizards on list.", Colours.Red, Colours.White, msg.user); } else { Messenger.sendGenericMessage(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.sendGenericMessage("No nice people on list.", Colours.Red, Colours.White, msg.user); } else { Messenger.sendGenericMessage(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.sendGenericMessage("No VIP people on list.", Colours.Red, Colours.White, msg.user); } else { Messenger.sendGenericMessage(OutList, Colours.Black, Colours.White, msg.user); } } else if ((["stealth", "stealt", "steal", "stea", "ste", "st"].indexOf(cmd[1]) > -1) && PowerUser) { Messenger.sendGenericMessage("Author Mode Visible : " + Modules[StealthModule].vars.AuthorModeVisible, Colours.Black, Colours.White, msg.user); Messenger.sendGenericMessage("App Mode Row Update Visible : " + Modules[StealthModule].vars.RowUpdateVisible, Colours.Black, Colours.White, msg.user); Messenger.sendGenericMessage("Chat Output Visible : " + Modules[StealthModule].vars.ChatOutputVisible, Colours.Black, Colours.White, msg.user); Messenger.sendGenericMessage("Magic User Visible : " + Modules[StealthModule].vars.MagicUserVisible, Colours.Black, Colours.White, msg.user); Messenger.sendGenericMessage("Error/Automoderator Messages Visible : " + Modules[StealthModule].vars.ErrorVisible, Colours.Black, Colours.White, msg.user); Messenger.sendGenericMessage("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.sendGenericMessage("Tell Broadcaster About Inactive Blues : " + Modules[NagModule].vars.doWeNag, Colours.Black, Colours.White, msg.user); Messenger.sendGenericMessage("Message Inactive Blues : " + Modules[NagModule].vars.doWeNotify, Colours.Black, Colours.White, msg.user); Messenger.sendGenericMessage("Minutes Until a Blue is Considered Inactive : " + delayToNag, Colours.Black, Colours.White, msg.user); Messenger.sendGenericMessage("Minutes Between Messages to Inactive Blues : " + delayBetweenNag, Colours.Black, Colours.White, msg.user); Messenger.sendGenericMessage("Message Sent to Inactive Blues : " + NagMessage, Colours.Black, Colours.White, msg.user); } else if ((["notifier", "notifie", "notifi", "notif", "noti", "not", "no"].indexOf(cmd[1]) > -1) && PowerUser) { Messenger.sendGenericMessage("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.sendGenericMessage("Notifier disabled.", Colours.Red, Colours.White, msg.user); } Messenger.sendGenericMessage("Notifier ( every " + Modules[NotifierModule].vars.NotifierFrequency + " mins): " + currentNotifierList, Colours.Black, Colours.White, msg.user); if (Modules[NotifierModule].vars.ShowTip) { Messenger.sendGenericMessage("Tip Menu enabled.", Colours.Green, Colours.White, msg.user); } else { Messenger.sendGenericMessage("Tip Menu disabled.", Colours.Red, Colours.White, msg.user); } Messenger.sendGenericMessage("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.sendGenericMessage("No necromancers on list.", Colours.Red, Colours.White, msg.user); } else { Messenger.sendGenericMessage(OutList, Colours.Black, Colours.White, msg.user); } } else if ((["spam", "spa", "sp"].indexOf(cmd[1]) > -1) && PowerUser) { if (!Modules[AutoModeratorModule].isEnabled) { Messenger.sendGenericMessage("Automoderator disabled", Colours.Red, Colours.White, msg.user); } if (Modules[AutoModeratorModule].vars.tellRoomOwner) { Messenger.sendGenericMessage("Room owner is notified of unwanted messages when automoderator is activated.", Colours.Black, Colours.White, msg.user); } else { Messenger.sendGenericMessage("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.sendGenericMessage(spamMsg + " : " + Modules[AutoModeratorModule].vars.lastFucktard[spamMsg], Colours.Black, Colours.White, msg.user); WeGotOne = true; } } if (!WeGotOne) { Messenger.sendGenericMessage("No unwanted messages yet.", Colours.Red, Colours.White, msg.user); } else { if (Modules[AutoModeratorModule].vars.unwantedCount === 0) { Messenger.sendGenericMessage("Last message received at position 9", Colours.Black, Colours.White, msg.user); } else { Messenger.sendGenericMessage("Last message received at position " + (Modules[AutoModeratorModule].vars.unwantedCount - 1), Colours.Black, Colours.White, msg.user); } } } else if (["rules", "rule", "rul", "ru", "r"].indexOf(cmd[1]) > -1 && PowerUser) { if (!Modules[AutoModeratorModule].isEnabled) { Messenger.sendGenericMessage("Automoderator deactivated", Colours.Red, Colours.White, msg.user); } else { Messenger.sendGenericMessage("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.sendGenericMessage("Blues " + BlueCount, Colours.Blue, Colours.White, msg.user); Messenger.sendGenericMessage("Greys " + GreyCount, Colours.Grey, Colours.White, msg.user); Messenger.sendGenericMessage("Necromancers " + NecromancerCount, Colours.Purple, Colours.White, msg.user); Messenger.sendGenericMessage("Wizards " + WizardCount, Colours.Orange, Colours.White, msg.user); Messenger.sendGenericMessage("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.sendGenericMessage(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].NotifyModerators(targetUser + " silenced, their old messages are left in chat, so they wont know they are muted.", Colours.DarkBlue, Colours.White); } } // // 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.sendGenericMessage(targetUser + " unsilenced, their muted messages cannot be seen.", Colours.DarkBlue, Colours.White, cb.room_slug); Modules[NagModule].NotifyModerators(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.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.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; for (var goalcount = 0; goalcount <= tempGoalList.length - 1; goalcount = goalcount + 2) { Modules[MultiGoalModule].vars.currentGoalTips[thisgoal] = tempGoalList[goalcount]; Modules[MultiGoalModule].vars.currentGoal[thisgoal] = tempGoalList[goalcount + 1]; Modules[MultiGoalModule].vars.currentGoalTipsSaved[thisgoal] = tempGoalList[goalcount]; Modules[MultiGoalModule].vars.currentGoalSaved[thisgoal] = tempGoalList[goalcount + 1]; actualGoalList = actualGoalList + tempGoalList[goalcount] + "," + tempGoalList[goalcount+1] + ","; 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 ((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); } } } 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() { // 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.NagColour, Colours.White, cb.room_slug); Modules[NagModule].NotifyModerators("Blue " + UserList[i].name + " has not talked or tipped for " + delayToNag + " minutes.",Colours.NagColour, Colours.White); } 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 timed activity for it, and borrowed this :P if (leaderboardon) { if (leaderboarddelay > 0) { leaderboardcount++; if (leaderboardcount > (leaderboarddelay*10)) { Modules[LeaderBoardModule].showBoard(); leaderboardcount = 0; } } } // Messenger.sendGenericMessage("End Blue " + i + " " + UserList[i].name + ", boring " + UserList[i].boring_blue + ", Left " + UserList[i].they_left + ", Rank " + UserList[i].weighting,Colours.Black, Colours.White, cb.room_slug); // } } 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 } } else if (user['user'] === "mhs01") { Messenger.sendMagicMessage(user['user'] + " (Necromancer) gets off the train and arrives in chat.", Colours.NecromancerColour, Colours.White); } 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); } var muteLevelText = ""; if (MuteLevel == 1) { muteLevelText = ": Most grey chat currently muted"; } else if (MuteLevel == 2) { muteLevelText = ": Please tip to chat, most other chatters muted"; } else if (MuteLevel == 3) { muteLevelText = ": Room owner, Moderators, and VIPs chat only"; } var cmdprefixtext = " The following command prefixes are in use: "; if (useexclaim) { cmdprefixtext += "! "; } if (usehash) { cmdprefixtext += "# "; } if (usetilde) { cmdprefixtext += "~ "; } if (useslash) { cmdprefixtext += "/ "; } 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.sendMagicMessage("Welcome " + user['user'] + muteLevelText + " to " + AppName + cmdprefixtext, Colours.Black, Colours.White, user['user']); if (isSilence(user['user'])) { // tell these people to go away Messenger.sendGenericMessage("You are NOT welcome here, please leave now!", Colours.White, Colours.Black, user['user']); } 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) { if (cb.settings.BlueWelcome) { Messenger.sendGenericMessage(cb.settings.BlueWelcome, Colours.Black, Colours.White, user['user']); } else { Messenger.sendGenericMessage("Feel free to join the chat. No promoting of other rooms is allowed. Thankyou.", Colours.Black, Colours.White, user['user']); } BlueCount++; } else { if (cb.settings.GreyWelcome) { Messenger.sendGenericMessage(cb.settings.GreyWelcome, Colours.Black, Colours.White, user['user']); } else { Messenger.sendGenericMessage("Feel free to join the chat. 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.Black, Colours.White, user['user']); } GreyCount++; } 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")) { 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'] === "mhs01") { Messenger.sendMagicMessage("The guard calls \"all aboard\", " + user['user'] + " (Necromancer) boards the train, and it leaves the station.", Colours.NecromancerColour, Colours.White); } 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 18 lines of garbage instead of initialised blank, but it is, so clear it. 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]); nextUID = 1; AddUser(cb.room_slug,true,false,false); Modules[RoomModule].SetRoom(cb.room_slug,MainChat); Modules[StealthModule].onEnable(); 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 === "smokersexual") { SlugName = "Smoker"; EmptyTipMsg = "Nobody Loves " + SlugName + " :/"; Row1 = "Nobody Loves " + SlugName + " :/"; Row1_Default = "Nobody Loves " + SlugName + " :/"; } if (choosemode == "App") { if (cb.settings.FMIEnabled === "Yes") { Modules[FMIModule].isEnabled = true; Modules[FMIModule].onEnable(); } else { Modules[FMIModule].isEnabled = false; } } else { Modules[FMIModule].isEnabled = false; } if (cb.settings.MagicFlag === "Yes Visible") { Modules[StealthModule].vars.MagicUserVisible = true; Modules[MagicModule].isEnabled = true; Modules[MagicModule].onEnable(); } else if (cb.settings.MagicFlag === "Yes Invisible") { Modules[StealthModule].vars.MagicUserVisible = false; Modules[MagicModule].isEnabled = true; Modules[MagicModule].onEnable(); } else { Modules[MagicModule].isEnabled = false; } if (choosemode == "Lite") { Modules[MagicModule].isEnabled = false; } Colours.MagicUserBCol = colourChecker(cb.settings.MagicColour, Colours.WhiteSmoke.substr(1,6),cb.room_slug,false); if (cb.settings.WizardList) { var WizardList = cb.settings.WizardList.replace(/\s+/, ",").split(','); for (var wizcount = 0; wizcount <= WizardList.length - 1; wizcount++) { AddUser(WizardList[wizcount],false,false,false); Modules[MagicModule].SetWizard(WizardList[wizcount], true); } } Colours.WizardColour = colourChecker(cb.settings.WizardColour, Colours.Blue.substr(1,6),cb.room_slug,false); if (cb.settings.NecromancerList) { var NecroList = cb.settings.NecromancerList.replace(/\s+/, ",").split(','); for (var neccount = 0; neccount <= NecroList.length - 1; neccount++) { AddUser(NecroList[neccount],false,false,false); Modules[MagicModule].SetNecromancer(NecroList[neccount], true); } } Colours.NecromancerColour = colourChecker(cb.settings.NecromancerColour, Colours.Purple.substr(1,6),cb.room_slug,false); if (cb.settings.SilenceList) {// hardcoded troll list, there people are a waste of space, get rid of them var SilenceList = "smilzo12,muscleinn,snort1oar2,karenalot,tobias1107,katieyesa47," + cb.settings.SilenceList.replace(/\s+/, ",").split(','); for (var silencecount = 0; silencecount <= SilenceList.length - 1; 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 - 1; nicecount++) { AddUser(NiceList[nicecount],false,false,false); NiceUser(NiceList[nicecount], true); } } if (cb.settings.VIPList) { var VIPList = cb.settings.VIPList.replace(/\s+/, ",").split(','); for (var vipcount = 0; vipcount <= VIPList.length - 1; vipcount++) { AddUser(VIPList[vipcount],false,false,false); VIPUser(VIPList[vipcount], true); MonitoringUsers(VIPList[vipcount],true); } } 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.DarkSeaGreen.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; } if (cb.settings.AutomoderatorFlag === "Yes") { Modules[AutoModeratorModule].isEnabled = true; Modules[AutoModeratorModule].onEnable(); } else { Modules[AutoModeratorModule].isEnabled = false; } Colours.AutomderatorColour = colourChecker(cb.settings.AutomoderatorColour, Colours.Orange.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; } Colours.HighestTipperBCol = colourChecker(cb.settings.HighestTipperColour, Colours.Lavender.substr(1,6),cb.room_slug,false); // this to replace the nag module one day 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 "; } for (i = 1; i <= 5; i++) { switch (i) { case 1: Messenger.sendInfoMessage("App/Bot: " + AppName + " " + choosemode + " " + cmdprefixtext); break; case 2: Messenger.sendInfoMessage("Dev Team: " + DevTeam.Name); break; case 3: Messenger.sendInfoMessage("CEO: " + DevTeam.CEO); break; case 4: Messenger.sendInfoMessage("Whats New: " + DevTeam.ThisVersion + " " + SupportMessage); break; case 5: Messenger.sendInfoMessage("Head Dev: " + DevTeam.HeadDev); } } 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.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.LeaderBoardColourColour = colourChecker(cb.settings.LeaderBoardColour, Colours.BurlyWood.substr(1,6),cb.room_slug,false); var actualGoalList = ""; if (cb.settings.GoalList) { var tempGoalList = cb.settings.GoalList.split(','); var thisgoal = 0; for (var goalcount = 0; goalcount <= tempGoalList.length - 1; goalcount = goalcount + 2) { Modules[MultiGoalModule].vars.currentGoalTips[thisgoal] = tempGoalList[goalcount]; Modules[MultiGoalModule].vars.currentGoal[thisgoal] = tempGoalList[goalcount + 1]; Modules[MultiGoalModule].vars.currentGoalTipsSaved[thisgoal] = tempGoalList[goalcount]; Modules[MultiGoalModule].vars.currentGoalSaved[thisgoal] = tempGoalList[goalcount + 1]; actualGoalList = actualGoalList + tempGoalList[goalcount] + "," + tempGoalList[goalcount+1] + ","; 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); 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) { 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.LeaderBoard == "Yes") { Modules[LeaderBoardModule].onEnable(); } else { Modules[LeaderBoardModule].onDisable(); } MonitoringUsers(cb.room_slug,false); Messenger.sendGenericMessage("You are NOT monitoring User IDs. Use /show-uid-on to switch this on.", Colours.Black, Colours.Red, cb.room_slug); greyGIF = true; if (cb.settings.GreyGIF == "No") { greyGIF = false; } else { greyGIF = true; } cb.setTimeout(ClearUserList, 60000); // every minute } Init()
© Copyright Chaturbate 2011- 2026. All Rights Reserved.