Bots Home
|
Create an App
hot family bot
Author:
everlast_69
Description
Source Code
Launch Bot
Current Users
Created by:
Everlast_69
/************************************************************* ** ** Title: Mell's Loyal Family ** Authors: noiett (noiett.cb@gmail.com | @biosandapps) ** tablesalt90 (tablesalt90@gmail.com | @tablesalt90) ** ** Version: 1.8.1 Mar 18, 2018 ** First Version: May 17, 2014 ** Description: Chat bot for use by Missy_Mell - chaturbate.com/missy_mell* ** ** Bot originally created by tablesalt90 until v1.6.2 Aug 26, 2016. ** Currently maintained by noiett since v1.7 Jan 7, 2017. ** *************************************************************/ /* Features: Updated spam filter to catch new spam message patterns Aug 2016 Spam filter based on username patterns - adds user to filter list upon entering the room if in pattern list (^^ awesome for stopping spam "bots" that use naming patterns to create new accounts after being silenced) Tip menu and Raffle ticket menu Family members can use color and view level commands model and mods can paint users with colors allow mods/broadcaster to change foreground and background colors can use color names or hashcodes Keeps track of all tips Show tip scoreboard (all tips) Announce top X tippers (public) Send tippers lists to self (private) Manage users in groups: Friends, Family, Lovers, Fiances, Husbands and one Custom Group Allow Mods to use commands Special user greetings Greetings for group members Gender Emotes (male, female, couple, trans) or custom icon for special users User timeouts (forever or specified time) Model can be muted/unmuted with tips Spam blocker, blocks advertisments from grey users Auto timeout for grey that demand, ask for pm, ask to view cam, etc Emote blocker for grey users Select background colors for group users Thank you note for tippers, custom message for certain tip amounts Automatically add user to group for specific tip amounts and send reminder to model to add them in config Flood control to stop timeout users from flooding the room with notices 2 custom notifications with selectable time delay Send public room notice Send notice to all mods Send private notice to broadcaster If used by another model sends exclusive notice to them at startup, also tells each user as they enter. Ghost function lets silenced or banned users type through chat notices */ /* * Setup vars */ var daystobday = daysUntilNext(12, 18); var botVersion = "1.8.1"; var botDate = "Mar 18, 2018"; var lastMessgeTime = 0; var lastMessageName = ""; var tippers = new Array(); var timeoutMessages = new Array(); var mutedMessages = new Array(); var timeoutUsersArray = new Array(); var timeoutReleaseArray = new Array(); var valentineUsersArray = new Array(); var easterBunzUsersArray = new Array(); var friendUsersArray = new Array(); var familyUsersArray = new Array(); var loverUsersArray = new Array(); var fianceUsersArray = new Array(); var husbandUsersArray = new Array(); var customUsersArray = new Array(); var ghostUsersArray = new Array(); var spamPatternArray = new Array(); var spamUsersArray = new Array(); var userColors = new Array(); var specialLines = new Array(); var specialNames = new Array(); var lastClocks = new Array(); var customName = ""; var tempString = ""; var tempNum = 0; var tempArray = new Array(); var modelName = cb.room_slug; var msgNotify = ""; var msgPublic = ""; var msgPrivate = ""; var msgModel = ""; var msgMod = ""; var tsColorD = "#007020"; var tsColor = tsColorD; var tsBackgroundD = "#eeffcc"; var tsBackground = tsBackgroundD; var groupColor = "#FFFFFF"; var autoNotice1Text = ""; var autoNotice2Text = ""; var botTrigger = "/melbot"; var botTrigger2 = "/mb"; var timeoutReleaseInterval = 1; var daystounlock = daysUntilNext(3, 24); var customGroup = false; var modCommands = true; var fanCommands = false; var userGreets = true; var userBalls = true; var genderEmotes = true; var allowGreyEmotes = true; var unmaskTimeout = false; var noGreyChat = false; var mutedEpoch = 0; var botMsgBg = '#BDDEDC'; var botAlertBg = '#D32B2B'; var botNoteBg = '#99FF66'; var botAlert2Bg = '#CCFF00'; var botGhostBg = '#EDEDED'; var sendEmailMsg = 'If you didn\'t send your email address in the tip note, tip 1 token with your email address so your videos can be sent to you!'; var sendAppMsg = 'If you didn\'t send your username in the tip note, tip 1 token with your username so I can add you!'; var sendAppEmailMsg = 'If you didn\'t send your username or email address in the tip note, please tip 1 token with your info'; var raffleMsg ='The raffle drawing will be on August 1st 2016 during my broadcast. Be sure to be here and see if you win any prizes!!!'; var bdayNoticeText = ":itsmellysbday \n Wish Melly a happy birthday with a tip! \n"; var tipMenu = "Join the Loyal Family! Tip 500 to join the family, 1000 to be my lover, 1500 to be my fiance, or 2000 to be my husband!\n\n" + "20...... Flash Feet\n" + "25...... Rub, Wiggle, Toes\n" + "25...... Lotion or Oil Feet\n" + "30...... Flash Boobs\n" + "35...... Lick, bounce, lotion, oil Boobs\n" + "40...... Flash Ass\n" + "45...... Bounce, shake, wigle, twerk Ass\n" + "50...... Flash Pussy\n" + "55...... 30 Spanks each side hand/paddle\n" + "60...... Footjob/Sensual tease\n" + "70...... Finger Pussy for 5 min\n" + "75...... Finger Ass for 5 min\n" + "85...... POV blowjob with toy\n" + "90...... DP with fingers 5 min\n" + "95...... Name on body & Email pic\n" + "........ (send email in tipnote!)\n" + "100..... Strip tease or Dance\n" + "105..... Buttplug for 5 min\n" + "110..... Dildo (Pussy) for 5 min\n" + "115..... DP (buttplug/dildo) 5 min\n" + "120..... 10 custom pic (nude/non)\n" + "180..... Mute Melly for 5 min\n" + "181..... Unmute Melly instantly\n" + "200..... Ride toy/dildo for 5 min\n" + "222..... Snapchat 4 Life\n" + "250..... Use sex machine for 5 min\n" + "1900.... Instant cum/squirt\n"; var raffleMenu = "Melly\'s Valentine\'s Day Raffle\n" + "1 Ticket = 27 Tokens, 10 Tickets = 230 Tokens\n" + "20 Tickets = 330 Tokens, 30 Tickets = 430 Tokens\n" + "40 Tickets = 530 Tokens, 50 Tickets = 630 Tokens\n" + "60 Tickets = 730 Tokens, 70 Tickets = 830 Tokens\n"; var helpMsg = " may use the following commands:\n" + botTrigger + " spamhelp = show spam filter help\n" + botTrigger + " view [family] = list of level users\n" + botTrigger + " useradd [family] [username] = add username to level\n" + botTrigger + " userdel [family] [username] = delete username from level\n" + botTrigger + " check [username] = show what level a user is in\n" + botTrigger + " mods [on/off] = turns on/off mod commands\n" + botTrigger + " greyemotes [on/off] = turns on/off grey emotes\n" + botTrigger + " tag [tag text] = set your own tag\n" + botTrigger + " settag [username] [tag text] = set a user\'s tag\n" + botTrigger + " note [message] = send a public message to chat\n" + botTrigger + " melnote [message] = send a private message to mel\n" + botTrigger + " modnote [message] = send a private message to mods\n" + botTrigger + " greets [on/off] = turns on/off level user greetings\n" + botTrigger + " tips = show all tippers (private)\n" + botTrigger + " tips # = show top # tippers (private)\n" + botTrigger + " paint [username] [text] [bg] = change a user\'s colors\n" + botTrigger + " colors [text] [bg] = change text and bg color\n" + botTrigger + " colors rest = reset colors to b/w\n" + botTrigger + " text [color] = change text color\n" + botTrigger + " bg [color] = change background color\n" + botTrigger + " status = show bot status\n" + "*** NOTE: To make names stick add them in the bot config."; var spamMsg = " Spam Filter Help\n" + "You may add usernames, partial username, or patterns found in usersname to the filter.\n" + "When users enter their names are check against the filter. If a match is found they are automatically " + "added to the Spammer list and their messages will be blocked.\n" + botTrigger + " add pattern [pattern/name] = add a pattern/name to filter\n" + botTrigger + " del pattern [pattern/name] = delete a pattern/name from filter\n" + botTrigger + " add spammer [username] = add user to the Spammer list\n" + botTrigger + " del spammer [username] = delete user from the Spammer list\n"; clockGraphics = new Array(':5minclock', ':5minclock2', ':5minclock3'); specialLines[0] = new Array('joesdoe_6', 'His majesty, the king is here! Everyone in front of your highness, including the queen herself lol!'); specialLines[1] = new Array('spike8444', 'Guárdati le spalle e fai attenzione!\nEl peligroso jefe del clan \"reina del este\" is here!'); specialLines[2] = new Array('doublexl100', 'If it hadn\'t fapped for melly\'s mo\' I\'d been married a long time ago.\nWhere did you come from, where did you go?\nWhere did you come from, jessy\'s do\''); specialLines[3] = new Array('pervybeel', 'Maaaaaan! I\'m again banned in boring vultures room!\nMan, mell, here I am :crazy'); specialLines[4] = new Array('richacep', 'Why fags don\'t work at sperm banks?\nBecause they would eat all the cum!'); specialLines[5] = new Array('biggbenn87', 'When Benn does push-ups he isn\'t lifting himself up, he\'s pushing the earth down.'); specialLines[6] = new Array('blakjakml', 'Fuck! I\'m again modafakin late!\nOoops, I was shaking my black d in other rooms :hihi'); specialLines[7] = new Array('ryantheviper200', 'Uffff, here I am again because I\'ve lost at Xbox! You fucker!'); specialLines[8] = new Array('hottipper', 'Here is the hottipper!'); specialNames[0] = new Array('tablesalt90',':wts90'); specialNames[1] = new Array('doublexl100',':wjessxl'); specialNames[2] = new Array('runlikeachicken',':wrunlac'); specialNames[3] = new Array('xasdxasd',':blank'); specialNames[4] = new Array('joesdoe_6',':wjoesdoe_6_'); specialNames[5] = new Array('honestboy26',':whonestboy26'); specialNames[6] = new Array('rockerchang',':wrockerchang'); specialNames[7] = new Array('cptbill',':wcptbill'); specialNames[8] = new Array('_kor_',':wkor'); specialNames[9] = new Array('nicu7650',':nicu7650'); specialNames[10] = new Array('floyd87',':wfloyd87_'); specialNames[11] = new Array('nicu7650',':wnicu'); specialNames[12] = new Array('dosenravioli',':wdosenchase :wdosen'); specialNames[13] = new Array('kaylawynn',':wkaylawynn'); specialNames[14] = new Array('wicked_wicked_wicked',':wwicked2'); specialNames[15] = new Array('multitooler4c',':wmultitooler2'); specialNames[16] = new Array('megha1191',':sidishere'); specialNames[17] = new Array('mike69698888',':mikecheers000'); specialNames[18] = new Array('ryantheviper200',':wryantheviper200'); specialNames[19] = new Array('multi4c',':wmultitooler2'); specialNames[20] = new Array('ilovepussies86',':ilps86'); specialNames[21] = new Array('richacep',':wrich'); specialNames[22] = new Array('biggbenn87',':bbenn87'); mutedMessages[0] = '[MUTED] I\'m afraid no one can read you now Mell.'; mutedMessages[1] = '[MUTED] Yes, you look sexy but still I cannot allow you to chat.'; mutedMessages[2] = '[MUTED] You are muted Mell, stop stressing your bot!'; mutedMessages[3] = '[MUTED] Your message has been sent, seen, ignored and humiliated successfully.'; mutedMessages[4] = '[MUTED] I cannot say that I do not disagree with you.'; mutedMessages[5] = '[MUTED] Whatever it is, I\'m against it.'; mutedMessages[6] = '[MUTED] Oh yes baby, I love that!'; mutedMessages[7] = '[MUTED] Me, sarcastic? Never!'; mutedMessages[8] = '[MUTED] Yes. No. Maybe.'; mutedMessages[9] = '[MUTED] What is the answer to this question?'; mutedMessages[10] = '[MUTED] Quick! Have sex with me! I\'ll explain later.'; mutedMessages[11] = '[MUTED] You are probably naked under those clothes.'; mutedMessages[12] = '[MUTED] I wish we were better strangers.'; mutedMessages[13] = '[MUTED] Don\'t think badly of me young lady. My interest is purely sexual.'; mutedMessages[14] = '[MUTED] Stay with me. I want to be alone.'; mutedMessages[15] = '[MUTED] Your body is 70% water and I’m thirsty.'; mutedMessages[16] = '[MUTED] Hey there! I am using WhatsApp.'; mutedMessages[17] = '[MUTED] It\'s not you, it\'s my terrible choice in women.'; mutedMessages[18] = '[MUTED] God made Coke, God made Pepsi, God made Mellbel, so damn sexy!'; mutedMessages[19] = '[MUTED] Better to be late than to arrive ugly.'; mutedMessages[20] = '[MUTED] It\'s not true that I had nothing on. I had the radio on.'; mutedMessages[21] = '[MUTED] Keep typing, no one can read this!'; mutedMessages[22] = '[MUTED] Keep your words short and sweet, you never know which ones you\'ll have to eat.'; mutedMessages[23] = '[MUTED] Just like that, just like that!'; timeoutMessages[1]= '[TIMEOUT] You\'re in timeout, other\'s can\'t see what you\'re typing.'; timeoutMessages[2]= '[TIMEOUT] Give it up no one can read what you\'re typing...'; timeoutMessages[3]= '[TIMEOUT] Keep typing no one can read it!'; timeoutMessages[4]= '[TIMEOUT] Why do you keeping typing? No one can see it!'; timeoutMessages[5]= '[TIMEOUT] Can\'t you read? You\'re in timeout, you can\'t type!'; timeoutMessages[6]= '[TIMEOUT] I can\'t type cuz I laba too much!'; timeoutMessages[7]= '[TIMEOUT] I\'m typing something really stupid right now too bad no one can read it!'; timeoutMessages[8]= '[TIMEOUT] I\'m such an idiot! Why do I keep typing?'; timeoutMessages[9]= '[TIMEOUT] Why do my fingers smell like tuna fish and peanut butter?'; timeoutMessages[10]= '[TIMEOUT] Pardon me, have you seen my pula?'; timeoutMessages[11]= '[TIMEOUT] A baby goat is like a mushroom. I swear if you kill taht duck I\'m scared of toasters.'; timeoutMessages[12]= '[TIMEOUT] Don\'t tell anyone, but I still wet the bed.'; timeoutMessages[13]= '[TIMEOUT] We are all born ignorant, but I work really hard at being stupid.'; timeoutMessages[14]= '[TIMEOUT] Giant rainbows only like it when you whisper.'; timeoutMessages[15]= '[TIMEOUT] Like OMG Eye am sofa king stew pid.'; timeoutMessages[16]= '[TIMEOUT] Has anyone seen Mike Hunt in here?'; timeoutMessages[17]= '[TIMEOUT] My doctor says I spank the monkey too much. I told him I don\'t own a monkey.'; timeoutMessages[18]= '[TIMEOUT] Right now, I\'m like a happy meal without the happy.'; timeoutMessages[19]= '[TIMEOUT] Swiper No Swiping!!!'; timeoutMessages[20]= '[TIMEOUT] I saw a mushroom taco talking to a pineapple kissing a llama.'; timeoutMessages[21]= '[TIMEOUT] I planted bird seed and water them everyday, but no birds are growing in my garden.'; timeoutMessages[22]= '[TIMEOUT] My pula is all sticky.'; timeoutMessages[23]= '[TIMEOUT] Llamas eat sexy paper clips. Just saying.'; timeoutMessages[24]= '[TIMEOUT] I saw a magical orange unicorn dancing on a rainbow with a spoonful of blue cheese dressing.'; timeoutMessages[25]= '[TIMEOUT] On a scale of 1 to 10 my favorite color is W.'; timeoutMessages[26]= '[TIMEOUT] Communist vaginas eat ponies on purple.'; timeoutMessages[27]= '[TIMEOUT] I\'m special. I poop butterflies.'; timeoutMessages[28]= '[TIMEOUT] Sometimes I believe in trees then I hear the unicorns talking.'; timeoutMessages[29]= '[TIMEOUT] I shave my pubic hair with a cheese grater.'; timeoutMessages[30]= '[TIMEOUT] My squid at my chinese food.'; timeoutMessages[31]= '[TIMEOUT] There\'s a purple mushroom in my backyard screaming at a taco.'; timeoutMessages[32]= '[TIMEOUT] Friendly insects eat pink pineapples while looking at your mom.'; timeoutMessages[33]= '[TIMEOUT] I see dead people.'; timeoutMessages[34]= '[TIMEOUT] Don\'t tell anyone, but I\'m dead.'; timeoutMessages[35]= '[TIMEOUT] A fuzzy snake at the clouds.'; timeoutMessages[36]= '[TIMEOUT] A hairy window broke a silly pineapple with a blue sink.'; timeoutMessages[37]= '[TIMEOUT] I like pie.'; timeoutMessages[38]= '[TIMEOUT] Bananas! Bananas! Bananas!'; timeoutMessages[39]= '[TIMEOUT] Don\'t touch my crayons!'; timeoutMessages[40]= '[TIMEOUT] Did you ever notice pineapples don\'t wear bathrobes?'; timeoutMessages[41]= '[TIMEOUT] I\'m secretly a ninja llama, but don\'t tell anyone!'; timeoutMessages[42]= '[TIMEOUT] Sometimes I like to pretend I\'m an electric toster swimming in a field of grapes.'; timeoutMessages[43]= '[TIMEOUT] Polar bears are friendly because they went through menopause and they smell like corn dogs.'; timeoutMessages[44]= '[TIMEOUT] My potato has 38 buttholes.'; timeoutMessages[45]= '[TIMEOUT] I bought an electric pizza softener today.'; timeoutMessages[46]= '[TIMEOUT] I like the feeling of mac and cheese on my face.'; timeoutMessages[47]= '[TIMEOUT] I changed car insurance when I saw 4 goblins square dancin with mexican power rangers.'; timeoutMessages[48]= '[TIMEOUT] I\'m dancing with smurfs and my deek is hard!'; timeoutMessages[49]= '[TIMEOUT] I ride my bike and eat onions.'; timeoutMessages[50]= '[TIMEOUT] Son of a hairy horse cow pickle!'; /* * Settings */ cb.settings_choices = [ { name: 'allowGreyEmotes', type: 'choice', label: 'Allow GREY Graphics?', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes' }, { name: 'genderEmotes', type: 'choice', label: 'Show gender of users in chat?', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes' }, { name: 'autoNotice1', label: 'Notification Message 1, use text and emotes', type: 'str', minLength: 0, maxLength: 512, required: false, defaultValue: '' }, { name: 'autoNotice1Interval', label: 'Show Notification 1 Every x Minutes', type: 'choice', choice1: 2, choice2: 5, choice3: 8, choice4: 10, choice5: 12, choice6: 15, choice7: 20, choice8: 25, choice9: 30, choice10: 45, choice11: 60, defaultValue: 5 }, { name: 'autoNotice2', label: 'Notification Message 2, use text and emotes', type: 'str', minLength: 0, maxLength: 512, required: false, defaultValue: '' }, { name: 'autoNotice2Interval', label: 'Show Notification 2 Every x Minutes', type: 'choice', choice1: 2, choice2: 5, choice3: 8, choice4: 10, choice5: 12, choice6: 15, choice7: 20, choice8: 25, choice9: 30, choice10: 45, choice11: 60, defaultValue: 5 }, { name: 'modCommands', type: 'choice', label: 'Allow Moderators to use commands?', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes' }, { name: 'userGreets', type: 'choice', label: 'Make special user announcements and emotes when they enter?', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes' }, { name: 'userBalls', type: 'choice', label: 'Add balls to Loyal Family members\' messages?', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes' }, { name: 'friendTag', label: '*** FRIENDS *** *** *** Tag for Friend (non-tippers) users', type: 'str', minLength: 0, maxLength: 25, required: true, defaultValue: '[Friend]' }, { name: 'friendList', label: 'List of Friend users, separated by space (their CB usernames exactly)', type: 'str', minLength: 0, maxLength: 10240, required: false, defaultValue: '' }, { name: 'friendColor', label: 'Highlight color to use for Friend users', type: 'choice', choice1: 'White FFFFFF', choice2: 'Aqua 7FFFD4', choice3: 'LtBrown F4A460', choice4: 'Cyan E0FFFF', choice5: 'Gold EEE8AA', choice6: 'Yellow FFF68F', choice7: 'Slate C6E2FF', choice8: 'Pink FFF0F5', choice9: 'Orange FFD39B', choice10: 'Mint BDFCC9', choice11: 'Grey F2F2F2', choice12: 'Plum CD96CD', defaultValue: 'White FFFFFF' }, { name: 'familyTag', label: '*** FAMILY *** *** *** Tag for Family users', type: 'str', minLength: 0, maxLength: 25, required: true, defaultValue: '[Family]' }, { name: 'familyList', label: 'List of Family users, separated by space (their CB usernames exactly)', type: 'str', minLength: 0, maxLength: 10240, required: false, defaultValue: '' }, { name: 'familyColor', label: 'Highlight color to use for Family users', type: 'choice', choice1: 'White FFFFFF', choice2: 'Aqua 7FFFD4', choice3: 'LtBrown F4A460', choice4: 'Cyan E0FFFF', choice5: 'Gold EEE8AA', choice6: 'Yellow FFF68F', choice7: 'Slate C6E2FF', choice8: 'Pink FFF0F5', choice9: 'Orange FFD39B', choice10: 'Mint BDFCC9', choice11: 'Grey F2F2F2', choice12: 'Plum CD96CD', defaultValue: 'White FFFFFF' }, { name: 'loverTag', label: '*** LOVERS *** *** *** Tag for Lovers users', type: 'str', minLength: 0, maxLength: 25, required: true, defaultValue: '[Lover]' }, { name: 'loverList', label: 'List of Lovers users, separated by space (their CB usernames exactly)', type: 'str', minLength: 0, maxLength: 10240, required: false, defaultValue: '' }, { name: 'loverColor', label: 'Highlight color to use for Lover users', type: 'choice', choice1: 'White FFFFFF', choice2: 'Aqua 7FFFD4', choice3: 'LtBrown F4A460', choice4: 'Cyan E0FFFF', choice5: 'Gold EEE8AA', choice6: 'Yellow FFF68F', choice7: 'Slate C6E2FF', choice8: 'Pink FFF0F5', choice9: 'Orange FFD39B', choice10: 'Mint BDFCC9', choice11: 'Grey F2F2F2', choice12: 'Plum CD96CD', defaultValue: 'White FFFFFF' }, { name: 'fianceTag', label: '*** FIANCES *** *** *** Tag for Fiance users', type: 'str', minLength: 0, maxLength: 25, required: true, defaultValue: '[Fiance]' }, { name: 'fianceList', label: 'List of Fiance users, separated by space (their CB usernames exactly)', type: 'str', minLength: 0, maxLength: 10240, required: false, defaultValue: '' }, { name: 'fianceColor', label: 'Highlight color to use for Fiance users', type: 'choice', choice1: 'White FFFFFF', choice2: 'Aqua 7FFFD4', choice3: 'LtBrown F4A460', choice4: 'Cyan E0FFFF', choice5: 'Gold EEE8AA', choice6: 'Yellow FFF68F', choice7: 'Slate C6E2FF', choice8: 'Pink FFF0F5', choice9: 'Orange FFD39B', choice10: 'Mint BDFCC9', choice11: 'Grey F2F2F2', choice12: 'Plum CD96CD', defaultValue: 'White FFFFFF' }, { name: 'husbandTag', label: '*** HUSBANDS *** *** *** Tag for Husband users', type: 'str', minLength: 0, maxLength: 25, required: true, defaultValue: '[Husband]' }, { name: 'husbandList', label: 'List of Husband users, separated by space (their CB usernames exactly)', type: 'str', minLength: 0, maxLength: 10240, required: false, defaultValue: '' }, { name: 'husbandColor', label: 'Highlight color to use for Husband users', type: 'choice', choice1: 'White FFFFFF', choice2: 'Aqua 7FFFD4', choice3: 'LtBrown F4A460', choice4: 'Cyan E0FFFF', choice5: 'Gold EEE8AA', choice6: 'Yellow FFF68F', choice7: 'Slate C6E2FF', choice8: 'Pink FFF0F5', choice9: 'Orange FFD39B', choice10: 'Mint BDFCC9', choice11: 'Grey F2F2F2', choice12: 'Plum CD96CD', defaultValue: 'White FFFFFF' }, { name: 'useValentines', type: 'choice', label: '*** VALENTINE\'S BABES *** *** *** Use Valentine\'s babes category?', choice1: 'Yes', choice2: 'No', defaultValue: 'No' }, { name: 'valentineTag', label: 'Tag for Valentine\'s babes users', type: 'str', minLength: 0, maxLength: 25, required: true, defaultValue: '[Valentine]' }, { name: 'valentineList', label: 'List of Valentine\'s babes users, separated by space (their CB usernames exactly)', type: 'str', minLength: 0, maxLength: 10240, required: false, defaultValue: '' }, { name: 'valentineColor', label: 'Highlight color to use for Valentine\'s babes users', type: 'choice', choice1: 'White FFFFFF', choice2: 'Aqua 7FFFD4', choice3: 'LtBrown F4A460', choice4: 'Cyan E0FFFF', choice5: 'Gold EEE8AA', choice6: 'Yellow FFF68F', choice7: 'Slate C6E2FF', choice8: 'Pink FFF0F5', choice9: 'Orange FFD39B', choice10: 'Mint BDFCC9', choice11: 'Grey F2F2F2', choice12: 'Plum CD96CD', defaultValue: 'White FFFFFF' }, { name: 'useEasterBunz', type: 'choice', label: '*** EASTER BUNZ *** *** *** Use Easter Bunz category?', choice1: 'Yes', choice2: 'No', defaultValue: 'No' }, { name: 'easterBunzTag', label: 'Tag for Easter Bunz users', type: 'str', minLength: 0, maxLength: 25, required: true, defaultValue: '[EasterBunz]' }, { name: 'easterBunzList', label: 'List of Easter Bunz users, separated by space (their CB usernames exactly)', type: 'str', minLength: 0, maxLength: 10240, required: false, defaultValue: '' }, { name: 'easterBunzColor', label: 'Highlight color to use for Easter Bunz users', type: 'choice', choice1: 'White FFFFFF', choice2: 'Aqua 7FFFD4', choice3: 'LtBrown F4A460', choice4: 'Cyan E0FFFF', choice5: 'Gold EEE8AA', choice6: 'Yellow FFF68F', choice7: 'Slate C6E2FF', choice8: 'Pink FFF0F5', choice9: 'Orange FFD39B', choice10: 'Mint BDFCC9', choice11: 'Grey F2F2F2', choice12: 'Plum CD96CD', defaultValue: 'White FFFFFF' }, { name: 'customTag', label: '*** CUSTOM GROUP *** *** *** Tag for Custom Group users', type: 'str', minLength: 0, maxLength: 25, required: true, defaultValue: '[Custom]' }, { name: 'customName', label: 'Name of the Custom Group (no spaces, blank = no group)', type: 'str', minLength: 0, maxLength: 25, required: false, defaultValue: '' }, { name: 'customList', label: 'List of Custom Group users, separated by space (their CB usernames exactly)', type: 'str', minLength: 0, maxLength: 10240, required: false, defaultValue: '' }, { name: 'customColor', label: 'Highlight color to use for Custom Group users', type: 'choice', choice1: 'White FFFFFF', choice2: 'Aqua 7FFFD4', choice3: 'LtBrown F4A460', choice4: 'Cyan E0FFFF', choice5: 'Gold EEE8AA', choice6: 'Yellow FFF68F', choice7: 'Slate C6E2FF', choice8: 'Pink FFF0F5', choice9: 'Orange FFD39B', choice10: 'Mint BDFCC9', choice11: 'Grey F2F2F2', choice12: 'Plum CD96CD', defaultValue: 'White FFFFFF' }, { name: 'spamPatternList', label: 'List spam names to automatically block (fullname or partial)', type: 'str', minLength: 0, maxLength: 10240, required: false, defaultValue: '' } ]; /* * handle tips from users */ var totalTipped = 0; cb.onTip(function (tip) { var divStr = ""; var msgText = ""; var msgNotify = ""; var tipAmount = parseInt(tip['amount']); var name = tip['from_user']; var modelName = cb.room_slug; var modelMuted = (mutedEpoch > 0); // is user in tipper array? if (!tippers[name]) { //nope add them tippers[name] = {username: name, tips: 0}; } if (!tippers[name].tips) { tippers[name].tips = 0; } tippers[name].tips += tipAmount; switch(tipAmount) { case 6666: msgPublic = name + ' tipped for control lovense 1h in public place!!! Thank you!!'; break; case 5555: msgPublic = name + ' tipped for ride ash or use fuck machine for 1 hour!!! Thank you!'; break; case 5000: msgPublic = name + ' tipped to give Melly a day off!!! Thank you!!'; break; case 3500: msgPublic = name + ' tipped for my outfit / used toy today!!! Thank you!!'; msgPrivate = 'Melly will contact you to get your shipping information and which one you want (outfit or used toy)!'; break; case 3434: msgPublic = name + ' tipped to cancel hairy pussy 1 month!!! Thank you!!'; break; case 3333: msgPublic = name + ' tipped for hairy pussy 1 month!!! Thank you!!'; break; case 2500: msgPublic = name + ' tipped to make Melly\'s day!!! Thank you!!'; break; case 2424: msgPublic = name + ' tipped to cancel shaved pussy 1 month!!! Thank you!!'; break; case 2323: if (useEasterBunz) { result = addUser(easterBunzUsersArray, name); if (result instanceof Array) { easterBunzUsersArray = result; msgPublic = name + ' is now ' + modelName + '\'s Easter Bunz!!! Thank you for your tip!'; msgModel = modelName + ', don\'t forget to add ' + name + ' to Easter Bunz in the bot config!'; } else { if (result == 'duplicate') { msgPublic = name + ' is already ' + modelName + '\'s Easter Bunz!!! Thank you for your tip!';; } else { msgPublic = 'Failed to add user ' + name + ' to Easter Bunz. Something went wrong!'; } } } break; case 2222: msgPublic = name + ' tipped for shaved pussy 1 month!!! Thank you!!'; break; case 2121: if (useValentines) { result = addUser(valentineUsersArray, name); if (result instanceof Array) { valentineUsersArray = result; msgPublic = name + ' is now ' + modelName + '\'s Valentine\'s babe!!! Thank you for your tip!'; msgModel = modelName + ', don\'t forget to add ' + name + ' to Valentine\'s babes in the bot config!'; } else { if (result == 'duplicate') { msgPublic = name + ' is already ' + modelName + '\'s Valentine\'s babe!!! Thank you for your tip!';; } else { msgPublic = 'Failed to add user ' + name + ' to Valentine\'s babes. Something went wrong!'; } } } break; case 2000: result = addUser(husbandUsersArray, name); if (result instanceof Array) { husbandUsersArray = result; msgPublic = name + ' is now ' + modelName + '\'s Husband!!! Thank you for your tip!'; msgModel = modelName + ', don\'t forget to add ' + name + ' to Husbands in the bot config!'; } else { if (result == 'duplicate') { msgPublic = name + ' is already ' + modelName + '\'s Husband!!! Thank you for your tip!';; } else { msgPublic = 'Failed to add user ' + name + ' to Husbands. Something went wrong!'; } } break; case 1999: msgPublic = name + ' tipped for insta naked and cum show!!! Thank you!'; msgPrivate = 'You\'re now the DIRECTOR of the show!'; break; /*case 1900: msgPublic = name + ' tipped instant squirt with toy of your choice! Thank you!'; msgPrivate = 'Tell melly which toy you want her to use if you did not put it in the tipnote!'; break;*/ case 1600: msgPublic = name + ' purchased panties! Thank you!'; msgPrivate = 'Melly will contact you to get your shipping information and which panties you want!'; break; case 1500: if (!userInArray (husbandUsersArray, name) ) { result = addUser(fianceUsersArray, name); if (result instanceof Array) { fianceUsersArray = result; msgPublic = name + ' is now ' + modelName + '\'s Fiance!!! Thank you for your tip!'; msgModel = modelName + ', don\'t forget to add ' + name + ' to Fiances in the bot config!'; } else { if (result == 'duplicate') { msgPublic = name + ' is already ' + modelName + '\'s Fiance!!! Thank you for your tip!';; } else { msgPublic = 'Failed to add user ' + name + ' to Fiances. Something went wrong!'; } } } else { msgPublic = name + ' already has a higher status than Fiance! Status not changed. Thank you for your tip!'; } break; case 1222: msgPublic = name + ' tipped for Snapchat for life with screenshots, dick pics and convo allowed! Thank you! Send SC name in 1tk tip if you forgot!'; msgPrivate = sendEmailMsg; break; /* case 1030: msgPublic = name + ' got 80 raffle tickets!!! Tip does not count towards goal...'; msgPrivate = 'Tell melly what color tickets you want!'; break; */ case 1100: msgPublic = name + ' tipped for control lovense 30 min!! Thank you!!'; break; case 1000: if (!userInArray (husbandUsersArray, name) && !userInArray (fianceUsersArray, name)) { result = addUser(loverUsersArray, name); if (result instanceof Array) { loverUsersArray = result; msgPublic = name + ' is now ' + modelName + '\'s Lover!!! Thank you for your tip!'; msgModel = modelName + ', don\'t forget to add ' + name + ' to Lovers in the bot config!'; } else { if (result == 'duplicate') { msgPublic = name + ' is already ' + modelName + '\'s Lover!!! Thank you for your tip!';; } else { msgPublic = 'Failed to add user ' + name + ' to Lovers. Something went wrong!'; } } } else { msgPublic = name + ' already has a higher status than Lover! Status not changed. Thank you for your tip!'; } break; case 830: msgPublic = name + ' got 70 raffle tickets!!! Tip does not count towards goal...'; msgPrivate = 'Tell melly what color tickets you want!'; break; case 730: msgPublic = name + ' got 60 raffle tickets!!! Tip does not count towards goal...'; msgPrivate = 'Tell melly what color tickets you want!'; break; case 630: msgPublic = name + ' got 50 raffle tickets!!! Tip does not count towards goal...'; msgPrivate = 'Tell melly what color tickets you want!'; break; case 550: msgPublic = name + ' tipped for control lovense 10 min!! Thank you!!'; break; case 530: msgPublic = name + ' got 40 raffle tickets!!! Tip does not count towards goal...'; msgPrivate = 'Tell melly what color tickets you want!'; break; case 500: if (!userInArray (husbandUsersArray, name) && !userInArray (fianceUsersArray, name) && !userInArray (loverUsersArray, name)) { result = addUser(familyUsersArray, name); if (result instanceof Array) { familyUsersArray = result; msgPublic = name + ' is now in ' + modelName + '\'s Family!!! Thank you for your tip!'; msgModel = modelName + ', don\'t forget to add ' + name + ' to Family in the bot config!'; } else { if (result == 'duplicate') { msgPublic = name + ' is already in ' + modelName + '\'s Family!!! Thank you for your tip!';; } else { msgPublic = 'Failed to add user ' + name + ' to Family. Something went wrong!'; } } } else { msgPublic = name + ' already has a higher status than Family! Status not changed. Thank you for your tip!'; } break; case 430: msgPublic = name + ' got 30 raffle tickets!!! Tip does not count towards goal...'; msgPrivate = 'Tell melly what color tickets you want!'; break; case 330: msgPublic = name + ' got 20 raffle tickets!!! Tip does not count towards goal...'; msgPrivate = 'Tell melly what color tickets you want!'; break; case 230: msgPublic = name + ' got 10 raffle tickets!!! Tip does not count towards goal...'; msgPrivate = 'Tell melly what color tickets you want!'; break; case 350: msgPublic = name + ' tipped for 10min custom video!!! Thank you!'; msgPrivate = 'If you didn\'t send your email address in the tip note, tip 1 token with your email address so your video can be sent to you!'; break; /* case 299: msgPublic = name + ' tipped 299 tokens for videos!!! Thank you! Video links will be emailed to you shortly!'; msgPrivate = sendEmailMsg; break; case 269: msgPublic = name + ' tipped 269 tokens for 1 month of SnapChat pics! Thank you!!!'; msgPrivate = sendAppMsg; break; */ case 250: msgPublic = name + ' tipped for sex machine doggie for 5 min! Thank you!'; msgPrivate = sendEmailMsg; break; case 222: msgPublic = name + ' tipped for Snapchat for life! Thank you! Send SC name in 1tk tip if you forgot!'; msgPrivate = sendEmailMsg; break; case 200: msgPublic = name + ' tipped for riding Joey or Fred for 5 min! Thank you!!!'; msgPrivate = 'Tell Melly which one you want...\n'; break; case 181: if (modelMuted) { mutedEpoch = 0; msgPublic = name + ' tipped for unmute Melly instantly and now she\'s able to chat again. Thank you!'; } else { msgPublic = name + ' tipped for unmute Melly instantly but she wasn\'t muted in the first place. Thank you!'; } break; case 180: if (!modelMuted) { msgPublic = name + ' tipped for mute Melly 5 min! ' + getNextGraphic() + ' Thank you!\n'; msgPublic += 'Melly is kindly invited to stay quiet for a while (you can tip 181 to unmute her).'; mutedEpoch = (new Date).getTime() + (5 * 60000); } else { mutedEpoch += (5 * 60000); var tmpTime = timeRemaining(mutedEpoch); msgPublic = name + ' tipped to increase Melly\'s muted time 5 additional minutes. Thank you!\n'; msgPublic += 'Melly\'s remaining muted time is now ' + tmpTime.getUTCMinutes() + ' mins ' + tmpTime.getUTCSeconds() + ' secs.'; } break; case 170: msgPublic = name + ' tipped for drink a glass with water! Thank you!'; break; case 165: msgPublic = name + ' tipped for sing a song! Thank you!'; break; case 155: msgPublic = name + ' tipped for use hitachi for 5min! Thank you!'; break; case 150: msgPublic = name + ' tipped for smoke request! Thank you!'; break; case 145: msgPublic = name + ' tipped for POV BJ with ejack dildo! Thank you!'; break; case 140: msgPublic = name + ' tipped for squats in your face! Thank you!'; break; case 130: msgPublic = name + ' tipped DP with buttplug/dildo for 5 min! Thank you!'; break; case 125: msgPublic = name + ' tipped for lotion or oil on naked body! Thank you!'; break; case 120: msgPublic = name + ' tipped set of 10 custom pics (nude/non-nude)!'; msgPrivate = 'Send 1tk with your email address in tipnote if you forgot...'; break; case 115: msgPublic = name + ' tipped for buttplug play! Thank you!'; break; case 110: msgPublic = name + ' tipped for dildo pussy play for 5 min! Thank you!'; break; case 105: msgPublic = name + ' tipped for stockings/highheels or both for 10 min! Thank you!!'; break; case 100: msgPublic = name + ' tipped for strip tease! Thank you!'; break; case 95: msgPublic = name + ' tipped for their name on body and pic!'; msgPrivate = 'Send 1tk with your email address in tipnote if you forgot...'; break; case 90: msgPublic = name + ' tipped for DP with fingers for 5 min!'; break; case 85: msgPublic = name + ' tipped for POV blowjob with toy!'; break; case 80: msgPublic = name + ' tipped to watch their cam and tease for 5 min!'; msgPrivate = 'If you have a PW on your cam send 1tk with PW in tipnote...\n'; break; case 75: msgPublic = name + ' tipped for ass fingering! Thank you!'; break; case 70: msgPublic = name + ' tipped for pussy fingering! Thank you!'; break; case 60: msgPublic = name + ' tipped for footjob or sensual foot tease! Thank you!'; break; case 55: msgPublic = name + ' tipped for 30 spanks on each ass cheek with hand or paddle! Thank you!'; msgPrivate = 'Tell Melly if you want hand or paddle...\n'; break; case 50: msgPublic = name + ' tipped for pussy flash! Thank you!'; break; case 45: msgPublic = name + ' tipped for bounce, shake, wiggle, twerk, lotion, or oil ass! Thank you!'; break; case 40: msgPublic = name + ' tipped for ass flash! Thank you!'; break; case 35: msgPublic = name + ' tipped for lick, bounce, lotion, or oil boobs! Thank you!'; break; case 30: msgPublic = name + ' tipped to see boobies! Thank you!'; break; case 27: msgPublic = name + ' got 1 raffle ticket!!! Tip does not count towards goal...'; msgPrivate = 'Tell melly what color ticket you want!'; break; case 25: msgPublic = name + ' tipped for feet rubbing, wiggles, lotion, or oil! Thank you!'; break; case 20: msgPublic = name + ' tipped to see feet! Thank you!'; break; case 15: msgPublic = name + ' tipped for Song request! Thank you!'; break; case 10: msgPublic = name + ' tipped for PM! Thank you!'; break; default: msgPublic = 'Thank you ' + name + ' for your tip of ' + tipAmount; if (tipAmount == 1) { msgPublic += ' token!'; } else { msgPublic += ' tokens!'; if (tipAmount > 30000) { msgPublic += '\n\n RECORD BROKEN!! NEW HIGHEST TIP EVER!!!\n\n\n'; } } break; } // Output any notices or command results to user if (msgPrivate.length > 0) { cb.sendNotice(msgPrivate, name, botMsgBg,'','bold'); msgPrivate = ""; } // Output any public notices or command results if (msgPublic.length > 0) { cb.sendNotice(msgPublic, '', botMsgBg,'','bold'); msgPublic = ""; } // Output any messages to the model if (msgModel.length > 0) { cb.sendNotice(msgModel, modelName, botMsgBg,'','bold'); msgModel = ""; } }); /* * handle user entrance messages */ cb.onEnter(function(user) { var lenOfSpecialLines = 0; var lenOfSpecialNames = 0; var lenOfSpamPatterns = 0; var nameFound = false; var greeting = ''; var modelName = cb.room_slug; var name = user['user']; var isMod = user['is_mod']; var isFan = user['in_fanclub']; var isCreator = (name == 'tablesalt90' || name == 'noiett'); var isReal = (cb.room_slug == 'missy_mell'); var isModel = (name == cb.room_slug); var hasTokens = user['has_tokens']; var hasTipped = (user['tipped_recently'] || user['tipped_alot_recently'] || user['tipped_tons_recently']); var isGrey = !(hasTokens || isMod || isModel || isFan); lenOfSpecialLines = specialLines.length; lenOfSpecialNames = specialNames.length; lenOfSpamPatterns = spamPatternArray.length; for(i=0; i < lenOfSpecialLines; i++) { if (specialLines[i][0] == name) { greeting = specialLines[i][1]; nameFound = true; break; } } if (!nameFound) { for(i=0; i < lenOfSpecialNames; i++) { if (specialNames[i][0] == name) { greeting = specialNames[i][1]; nameFound = true; break; } } } if (userGreets) { if ( useValentines && userInArray (valentineUsersArray, name)) { cb.sendNotice('Welcome Valentine\'s Babe ' + name + ' to the room!\n' + '\u2665 You made my heart beat so hard for you, my valentine! \u2665' ,'',valentineColor,'#f30000','bold'); } else if (nameFound) { cb.sendNotice(greeting,'','#FFFFFF','#0e3a77','bold'); } else if ( userInArray (familyUsersArray, name)) { cb.sendNotice('Welcome Family Member ' + name + ' to the room!','',familyColor,'','bold'); } else { if ( userInArray (friendUsersArray, name)) { cb.sendNotice('Welcome Friend ' + name + ' to the room!','',friendColor,'','bold'); } else { if (userInArray(loverUsersArray, name)) { cb.sendNotice('Welcome Lover ' + name + ' to the room!','',loverColor,'','bold'); } else { if (userInArray(fianceUsersArray, name)) { cb.sendNotice('Welcome Fiance ' + name + ' to the room!','',fianceColor,'','bold'); } else { if (userInArray(husbandUsersArray, name)) { cb.sendNotice('Welcome Husband ' + name + ' to the room!','',husbandColor,'','bold'); } else { if (userInArray(customUsersArray, name)) { cb.sendNotice('Welcome ' + customName + ' Member ' + name + ' to the room!','',customColor,'','bold'); } } } } } } // show notice if user is in timeout if ( userInArray(timeoutUsersArray, name) ) { cb.sendNotice(name + ' is back, but still in timeout!','',botMsgBg,'','bold'); } } if (isMod) { cb.sendNotice(modWelcome(),name,botAlertBg,'','bold'); } else { cb.sendNotice('\nWelcome! Loyal Family Bot is running - Tip 500 to join the Family, 1000 to be my Lover, 1500 to be my Fiance, or 2000 to be my Husband!\n\n',name,botMsgBg,'','bold'); if (genderEmotes) { cb.sendNotice('Gender Emotes are enabled: :avatar_gen_male = Male User :avatar_gen_female = Female User\n :avatar_gen_couple = Couple User :avatar_gen_trans = Transgender User\n :avatar_gen_unknown = Gender Unknown\n\n',name,'#ffffff','','bold'); } if (modelName != 'missy_mell') { cb.sendNotice('This is NOT Missy_Mell\'s room!\nThis bot was created for Missy_Mell chaturbate.com/missy_mell\nFollow her on twitter @_melly_boo and visit her room on CB!\n\n',name,botAlertBg,'','bold'); } if (!allowGreyEmotes && isGrey) { cb.sendNotice('You don\'t have any tokens. Use of emoticons for users without tokens and not part of the loyal family is not allowed at this time.\n\n',name,botAlertBg,'','bold'); } cb.sendNotice('To see the tip menu type !tipmenu or /tipmenu in the chat!\n',name,botMsgBg,'','bold'); // Raffle notice cb.sendNotice('To see the raffle ticket prices type !raffle or /raffle in the chat!\n\n',name,botMsgBg,'','bold'); // Birthday Notice //bdaynotice(name); } if (userInArray(spamUsersArray, name)) { // user is in spam user list, welcome them back! msgPublic = 'Spammer ' + name + ' is back!'; cb.sendNotice(msgPublic, '', botMsgBg,'','bold'); msgPublic =""; } else { if (!isCreator && !hasTipped && isGrey) { // check username to see if it matches a pattern in the spam filter for(i=0; i < lenOfSpamPatterns; i++) { if (isWordInString(spamPatternArray[i],name)) { result = addUser(spamUsersArray, name); msgPublic = 'Spammer ' + name + ' has entered and auto-muted by MelBot!'; cb.sendNotice(msgPublic, '', botMsgBg,'','bold'); msgPublic = ""; break; } } } } }); /* * handle messages from users */ cb.onMessage(function(message) { var msg = message['m']; var groupTag = ''; var name = message['user']; var commandProcessed = false; var gender = message['gender']; var modelName = cb.room_slug; var modelMuted = (mutedEpoch > 0); var isMod = message['is_mod']; var isFan = message['in_fanclub']; var isCreator = (name == 'tablesalt90' || name == 'noiett'); var isReal = (cb.room_slug == 'missy_mell'); var isModel = (name == cb.room_slug); var hasTokens = message['has_tokens']; var hasTipped = (message['tipped_recently'] || message['tipped_alot_recently'] || message['tipped_tons_recently']); var isGrey = !(hasTokens || isMod || isModel || isFan); var divStr = ""; var tempAllowMsg = "Only " + modelName; var userArray = new Array(); var userList = ""; var showOutput = true; var genderStr = ""; var iconStr = ""; var isInGroup = false; var lenOfSpamPatterns = 0; var regPattern = ''; var regPattern2 = ''; lenOfSpamPatterns = spamPatternArray.length; if (modCommands) { tempAllowMsg = modelName + " and mods"; } // if user is in a group, add the group tag to their message // and change the background color // Start with Valentine's, as it should remove other group memberships if ( useValentines && userInArray (valentineUsersArray, name) ) { message['background'] = valentineColor; groupTag = valentineTag; groupColor = valentineColor; iconStr = ":melbotbabe "; isInGroup = true; } else if ( useEasterBunz && userInArray (easterBunzUsersArray, name) ) { message['background'] = easterBunzColor; groupTag = easterBunzTag; groupColor = easterBunzColor; iconStr = ":melbotbunz "; isInGroup = true; } else if ( userInArray (familyUsersArray, name) ) { message['background'] = familyColor; groupTag = familyTag; groupColor = familyColor; if (userBalls) iconStr = ":melbotballs13 "; isInGroup = true; } else { if ( userInArray (friendUsersArray, name) ) { message['background'] = friendColor; groupTag = friendTag; groupColor = friendColor; isInGroup = true; } else { if (userInArray(loverUsersArray, name)) { message['background'] = loverColor; groupTag = loverTag; groupColor = loverColor; if (userBalls) iconStr = ":melbotballs16 "; isInGroup = true; } else { if (userInArray(fianceUsersArray, name)) { message['background'] = fianceColor; groupTag = fianceTag; groupColor = fianceColor; if (userBalls) iconStr = ":melbotballs19 "; isInGroup = true; } else { if (userInArray(husbandUsersArray, name)) { message['background'] = husbandColor; groupTag = husbandTag; groupColor = husbandColor; if (userBalls) iconStr = ":melbotballs22 "; isInGroup = true; } else { if ( userInArray (customUsersArray, name) ) { message['background'] = customColor; groupTag = customTag; groupColor = customColor; isInGroup = true; } } } } } } // handle commands // all user commands switch (msg) { case "!tipmenu": case "/tipmenu": message['X-Spam'] = true; divStr = makeDiv('_',50,50); msgPrivate = tipMenu + '\n' + divStr; break; case "!raffle": case "/raffle": message['X-Spam'] = true; divStr = makeDiv('_',50,50); msgPrivate = raffleMenu + '\n' + divStr; break; } // Output any notices or command results to user if (msgPrivate.length > 0) { cb.sendNotice(msgPrivate, name, botMsgBg,'','bold'); msgPrivate = ""; } // family, mod, fan, model commands if ( isModel || (isFan && (fanCommands === true)) || (isMod && (modCommands === true)) || isCreator || isInGroup) { var activeBotTrigger = botTrigger; if (msg.indexOf(botTrigger2) > -1) { activeBotTrigger = botTrigger2; } if ((msg.indexOf(botTrigger) > -1) || (msg.indexOf(botTrigger2) > -1)) { msgParam1 = getParam(msg,' ',1); msgParam2 = getParam(msg,' ',2); msgParam3 = getParam(msg,' ',3); msgParam4 = getParam(msg,' ',4); var regexCommandSplit = '^' + activeBotTrigger + ' (\\S+)(?:\\b\\s*)(.*)?'; var regexListSplit = /[,\s]+/; var reCmdSplit = new RegExp(regexCommandSplit); var cmdSplit = msg.match(reCmdSplit); var cmd; var cmdval; var cmdval2; switch(msgParam1) { case 'help': message['X-Spam'] = true; divStr = makeDiv('_',50,50); msgPrivate = divStr + '\nLOYAL FAMILY Bot ver ' + botVersion + '\n Created by tablesalt90 & upgraded by noiett\n' + divStr + '\n'; msgPrivate += tempAllowMsg + helpMsg + '\n' + divStr; break; case 'helpspam': case 'spamhelp': message['X-Spam'] = true; divStr = makeDiv('_',50,50); msgPrivate += tempAllowMsg + spamMsg + '\n' + divStr; break; case 'menu': case 'tipmenu': message['X-Spam'] = true; divStr = makeDiv('_',50,50); msgPrivate = tipMenu + '\n' + divStr; break; case 'hiray': message['X-Spam'] = true; msgPublic =""; for (x = 0; x < 3; x++) { msgPublic += ':blank \n'; } msgPublic += ':hiray \n'; for (x = 0; x < 3; x++) { msgPublic += ':blank \n'; } break; case 'clear': case 'clearchat': message['X-Spam'] = true; msgPublic =""; for (x = 0; x < 10; x++) { msgPublic += ':blank \n'; } msgPublic += ':blank CHAT CLEARED\n'; for (x = 0; x < 2; x++) { msgPublic += ':blank \n'; } msgPublic += '*** ' + name + ' Cleared The Chat! ***'; break; /* case 'tips': message['X-Spam'] = true; if (!msgParam2) { msgParam2 = 0; } msgPublic = getTippers(msgParam2); break; */ case 'tips': message['X-Spam'] = true; if (!msgParam2) { msgParam2 = 0; } msgPrivate = getTippers(msgParam2); break; case 'notice': case 'note': case 'modnote': case 'modnotice': case 'melnote': case 'melnotice': case 'n': case 'tag': case 'name': case 'rank': case 'settag': case 'setname': case 'setrank': message['X-Spam'] = true; if ( cmdSplit ) { cmdval = cmdSplit[2]; if ( cmdval != null ) { cmdval = cmdval.replace(/^\s+|\s+$/g,''); } // contains message. who do we send it to? switch(msgParam1) { case 'notice': case 'note': case 'n': msgPublic = '*** ' + name + ' says: ' + cmdval + ' ***'; break; case 'melnote': case 'melnotice': msgModel = '*** Private notice from ' + name + ': ' + cmdval + ' ***'; msgPrivate = 'Your message was sent to ' + modelName + '...'; break; case 'modnote': case 'modnotice': msgMod = '*** Moderator notice from ' + name + ': ' + cmdval + ' ***'; msgPrivate = 'Your message was sent to the moderators...'; break; case 'tag': case 'rank': case 'name': if (!userColors[name]) { //nope add them userColors[name] = {username: name, tag: 'Nobody' }; } if (!userColors[name].tag) { userColors[name].tag = 'Nobody'; } if (msgParam3 == 'reset' || msgParam3 == 'default') { delete userColors[name]; } else { userColors[name].tag = cmdval; } msgPrivate = "Your tag has been changed!"; break; case 'settag': case 'setrank': case 'setname': if (isCreator || isModel || isMod || isFan) { message['X-Spam'] = true; cmdval = cmdSplit[2]; // remove username from string cmdval = cmdval.split(' ').slice(1).join(' '); if ( cmdval != null ) { cmdval = cmdval.replace(/^\s+|\s+$/g,''); } // is user color array if (!userColors[msgParam2]) { //nope add them userColors[msgParam2] = {username: msgParam2, tag: 'Nobody' }; } if (!userColors[msgParam2].tag) { userColors[msgParam2].tag = 'Nobody'; } if (msgParam3 == 'reset' || msgParam3 == 'default') { delete userColors[msgParam2]; } else { userColors[msgParam2].tag = cmdval; } msgPrivate = "Changed tag for user " + msgParam2 + "!"; cb.sendNotice(name + ' changed your chat tag!',msgParam2,botAlertBg,'','bold'); } else { msgPrivate = 'Only broadcaster, mods, and creator can change user tags!'; } break; } } break; case 'checktimeouts': releaseTimeouts(); break; case 'paint': if (isCreator || isModel || isMod || isFan) { message['X-Spam'] = true; // is user color array if (!userColors[msgParam2]) { //nope add them userColors[msgParam2] = {username: msgParam2, fbColor: '#333333', bgColor: '#ffffff' }; } if (!userColors[msgParam2].fgColor) { userColors[msgParam2].fgColor = '#333333'; } if (!userColors[msgParam2].bgColor) { userColors[msgParam2].bgColor = '#ffffff'; } if (msgParam3 == 'reset' || msgParam3 == 'default') { delete userColors[msgParam2]; } else { userColors[msgParam2].fgColor = msgParam3; if (msgParam4) { userColors[msgParam2].bgColor = msgParam4; } } msgPrivate = "Changed color for user " + msgParam2 + "!"; cb.sendNotice(name + ' changed your colors!',msgParam2,botAlertBg,'','bold'); } else { msgPrivate = 'Only broadcaster, mods, and creator can paint other users!'; } break; case 'colors': message['X-Spam'] = true; // is user color array if (!userColors[name]) { //nope add them userColors[name] = {username: name, fbColor: '#333333', bgColor: '#ffffff' }; } if (!userColors[name].fgColor) { userColors[name].fgColor = '#333333'; } if (!userColors[name].bgColor) { userColors[name].bgColor = '#ffffff'; } if (msgParam2 == 'reset' || msgParam2 == 'default') { delete userColors[name]; } else { userColors[name].fgColor = msgParam2; if (msgParam3) { userColors[name].bgColor = msgParam3; } } msgPrivate = "Your Colors have been changed!"; break; case 'color': case 'text': case 'fgcolor': case 'fg': message['X-Spam'] = true; // is user color array if (!userColors[name]) { //nope add them userColors[name] = {username: name, fbColor: '#333333', bgColor: '#ffffff' }; } if (!userColors[name].fgColor) { userColors[name].fgColor = '#333333'; } if (!userColors[name].bgColor) { userColors[name].bgColor = '#ffffff'; } if (msgParam2 == 'reset' || msgParam2 == 'default') { delete userColors[name]; } else { userColors[name].fgColor = msgParam2; } msgPrivate = "Your text color has been changed!"; break; case 'background': case 'bg': case 'bgcolor': message['X-Spam'] = true; // is user color array if (!userColors[name]) { //nope add them userColors[name] = {username: name, fbColor: '#333333', bgColor: '#ffffff' }; } if (!userColors[name].fgColor) { userColors[name].fgColor = '#333333'; } if (!userColors[name].bgColor) { userColors[name].bgColor = '#ffffff'; } if (msgParam2 == 'reset' || msgParam2 == 'default') { delete userColors[name]; } else { userColors[name].bgColor = msgParam2; } msgPrivate = "Your background color has been changed!"; break; case 'view': case 'show': case 'list': // which user array do we need to display? var showOutput = true; message['X-Spam'] = true; switch(msgParam2) { case "ghost": userArray = ghostUsersArray; break; case "timeout": userArray = timeoutUsersArray; break; case "family": userArray = familyUsersArray; break; case "friends": case "friend": userArray = friendUsersArray; break; case "lovers": case "lover": userArray = loverUsersArray; break; case "fiance": case "fiances": userArray = fianceUsersArray; break; case "husband": case "husbands": userArray = husbandUsersArray; break; case customName.toLowerCase(): userArray = customUsersArray; break; default: showOutput = false; msgPrivate = "You must provide a group name to list: family friends lovers fiances husbands"; if (customGroup) { msgPrivate += ' ' + customName.toLowerCase() } break; } if (showOutput === true) { userList = getUsers(userArray); arrayProperName = msgParam2.charAt(0).toUpperCase() + msgParam2.substring(1); if (userList.length > 1) { divStr = makeDiv('_',userList.length,50); msgPrivate = divStr + '\n' + arrayProperName + ' Users\n'; msgPrivate += userList; msgPrivate += '\n' + divStr; } else { msgPrivate = 'No ' + arrayProperName + ' users found!'; } if (!isModel) { msgModel = name + ' viewed the list ' + arrayProperName + ' Users.'; } } break; case 'useradd': case 'adduser': case 'add': case 'a': if (isCreator || isModel || isMod || isFan) { var validSyntax = true; // check that we got 3 parameters if (msgParam3) { // which user array are we updating? switch(msgParam2) { case "timeout": case "t": case "to": result = addUser(timeoutUsersArray, msgParam3); if (result instanceof Array) { timeoutUsersArray = result; msgPublic = name + ' put ' + msgParam3 + ' in timeout!!! They will not be able to type until released!'; if (msgParam4 ) { // command has number of minutes result2 = addReleaseTime(timeoutReleaseArray, msgParam3, msgParam4); if (result2 instanceof Array) { timeoutReleaseArray = result2; minutes = 'minutes'; if (msgParam4 == '1') minutes = 'minute'; msgPublic = name + ' put ' + msgParam3 + ' in timeout for ' + msgParam4 + ' ' + minutes + '!!! They will not be able to type until released!'; } else { if (result == 'duplicate') { msgPrivate = 'Failed to put user ' + msgParam3 + ' in timeout they are already scheduled for release!'; } else { msgPrivate = 'Failed to add user ' + msgParam3 + ' to release schedule. Something went wrong!'; } } } } else { if (result == 'duplicate') { msgPrivate = 'Failed to put user ' + msgParam3 + ' in timeout they are already in timeout!'; } else { msgPrivate = 'Failed to add user ' + msgParam3 + ' to timeout. Something went wrong!'; } } break; case "ghost": result = addUser(ghostUsersArray, msgParam3); if (result instanceof Array) { ghostUsersArray = result; msgPublic = name + ' added ' + msgParam3 + ' of Ghosts!'; } else { if (result == 'duplicate') { msgPrivate = 'Failed to add user ' + msgParam3 + ' because they are already in Ghosts!'; } else { msgPrivate = 'Failed to add user ' + msgParam3 + ' to Ghosts. Something went wrong!'; } } break; case "family": result = addUser(familyUsersArray, msgParam3); if (result instanceof Array) { familyUsersArray = result; msgPublic = name + ' added ' + msgParam3 + ' to the list of Family!'; // if model didn't issue command remind model to update the bot if (!isModel) { msgModel = modelName + ', don\'t forget to add ' + msgParam3 + ' to the Family list in the bot config!'; } } else { if (result == 'duplicate') { msgPrivate = 'Failed to add user ' + msgParam3 + ' because they are already in Family!'; } else { msgPrivate = 'Failed to add user ' + msgParam3 + ' to Family. Something went wrong!'; } } break; case "friends": case "friend": result = addUser(friendUsersArray, msgParam3); if (result instanceof Array) { friendUsersArray = result; msgPublic = name + ' added ' + msgParam3 + ' to the list of Friends!'; // if model didn't issue command remind model to update the bot if (!isModel) { msgModel = modelName + ', don\'t forget to add ' + msgParam3 + ' to Friends in the bot config!'; } } else { if (result == 'duplicate') { msgPrivate = 'Failed to add user ' + msgParam3 + ' because they are already in Friends!'; } else { msgPrivate = 'Failed to add user ' + msgParam3 + ' to Friends. Something went wrong!'; } } break; case "lovers": case "lover": result = addUser(loverUsersArray, msgParam3); if (result instanceof Array) { loverUsersArray = result; msgPublic = name + ' added ' + msgParam3 + ' to the list of Lovers!'; // if model didn't issue command remind model to update the bot if (!isModel) { msgModel = modelName + ', don\'t forget to add ' + msgParam3 + ' to Lovers in the bot config!'; } } else { if (result == 'duplicate') { msgPrivate = 'Failed to add user ' + msgParam3 + ' because they are already in Lovers!'; } else { msgPrivate = 'Failed to add user ' + msgParam3 + ' to Lovers. Something went wrong!'; } } break; case "fiance": case "fiances": result = addUser(fianceUsersArray, msgParam3); if (result instanceof Array) { fianceUsersArray = result; msgPublic = name + ' added ' + msgParam3 + ' to the list of Fiances!'; // if model didn't issue command remind model to update the bot if (!isModel) { msgModel = modelName + ', don\'t forget to add ' + msgParam3 + ' to Fiances in the bot config!'; } } else { if (result == 'duplicate') { msgPrivate = 'Failed to add user ' + msgParam3 + ' because they are already in Fiances!'; } else { msgPrivate = 'Failed to add user ' + msgParam3 + ' to Fiances. Something went wrong!'; } } break; case "husband": case "husbands": result = addUser(husbandUsersArray, msgParam3); if (result instanceof Array) { husbandUsersArray = result; msgPublic = name + ' added ' + msgParam3 + ' to the list of Husbands!'; // if model didn't issue command remind model to update the bot if (!isModel) { msgModel = modelName + ', don\'t forget to add ' + msgParam3 + ' to Husbands in the bot config!'; } } else { if (result == 'duplicate') { msgPrivate = 'Failed to add user ' + msgParam3 + ' because they are already in Husbands!'; } else { msgPrivate = 'Failed to add user ' + msgParam3 + ' to Husbands. Something went wrong!'; } } break; case customName.toLowerCase(): result = addUser(customUsersArray, msgParam3); if (result instanceof Array) { customUsersArray = result; msgPublic = name + ' added ' + msgParam3 + ' to the list of ' + customName + '!'; // if model didn't issue command remind model to update the bot if (!isModel) { msgModel = modelName + ', don\'t forget to add ' + msgParam3 + ' to the ' + customName + ' list in the bot config!'; } } else { if (result == 'duplicate') { msgPrivate = 'Failed to add user ' + msgParam3 + ' because they are already in ' + customName + '!'; } else { msgPrivate = 'Failed to add user ' + msgParam3 + ' to ' + customName + '. Something went wrong!'; } } break; case "pattern": case "p": result = addUser(spamPatternArray, msgParam3); if (result instanceof Array) { spamPatternArray = result; msgPublic = name + ' added ' + msgParam3 + ' to the spam filter!'; } else { if (result == 'duplicate') { msgPrivate = 'Failed to add ' + msgParam3 + ' to the spam filter. Already in the list.'; } else { msgPrivate = 'Failed to add ' + msgParam3 + ' to spam filter. Something went wrong!'; } } break; case "spam": case "spammer": case "spammers": case "s": result = addUser(spamUsersArray, msgParam3); if (result instanceof Array) { spamUsersArray = result; msgPublic = name + ' added ' + msgParam3 + ' to the Spammer list!'; } else { if (result == 'duplicate') { msgPrivate = 'Failed to add ' + msgParam3 + ' to the Spammer list. Already in the list.'; } else { msgPrivate = 'Failed to add ' + msgParam3 + ' to Spammer list. Something went wrong!'; } } break; default: validSyntax = false; msgPrivate = 'You didn\'t supply a valid group to add the user to. Valid groups are:\n'; msgPrivate += 'family friend lover fiance husband'; if (customGroup) { msgPrivate += ' ' + customName.toLowerCase(); } msgPrivate += ' ... choose only one.'; break; } } else { validSyntax = false; msgPrivate = 'You must provide the group and the username you wish to add. For example,\n' + botTrigger + ' adduser family someusername\n'; msgPrivate += 'or ' + botTrigger + ' adduser husband someuser'; } } else { msgPrivate = 'Only brodcaster, mods, and creator can add users to groups!'; } if (validSyntax === true) { message['X-Spam'] = true; } break; case 'userdel': case 'deluser': case 'delete': case 'remove': case 'd': case 'del': if (isCreator || isModel || isMod || isFan) { var validSyntax = true; // check that we got 3 parameters if (msgParam3) { // which user array are we updating? switch(msgParam2) { case "timeout": case "t": case "to": result = delUser(timeoutUsersArray, msgParam3); if (result instanceof Array) { timeoutUsersArray = result; msgPublic = name + ' released ' + msgParam3 + ' from timeout!!'; // delete any release time result2 = delReleaseTime(timeoutReleaseArray, msgParam3); } else { if (result == 'notfound') { msgPrivate = 'Failed to remove user ' + msgParam3 + ' from timeout because they are not in timeout!'; } else { msgPrivate = 'Failed to remove user ' + msgParam3 + ' from timeout. Something went wrong!'; } } break; case "family": case "fam": result = delUser(familyUsersArray, msgParam3); if (result instanceof Array) { familyUsersArray = result; msgPublic = name + ' removed ' + msgParam3 + ' from the Family list!'; // if model didn't issue command remind model to update the bot if (!isModel) { msgModel = modelName + ', don\'t forget to remove ' + msgParam3 + ' from the Family list in the bot config!'; } } else { if (result == 'notfound') { msgPrivate = 'Failed to remove user ' + msgParam3 + ' because they are not in Family!'; } else { msgPrivate = 'Failed to remove user ' + msgParam3 + ' from Family. Something went wrong!'; } } break; case "ghost": case "ghosts": result = delUser(ghostUsersArray, msgParam3); if (result instanceof Array) { ghostUsersArray = result; msgPublic = name + ' removed ' + msgParam3 + ' from the Ghost list!'; } else { if (result == 'notfound') { msgPrivate = 'Failed to remove user ' + msgParam3 + ' because they are not in Ghosts!'; } else { msgPrivate = 'Failed to remove user ' + msgParam3 + ' from Ghosts. Something went wrong!'; } } break; case "friends": case "friend": result = delUser(friendUsersArray, msgParam3); if (result instanceof Array) { friendUsersArray = result; msgPublic = name + ' removed ' + msgParam3 + ' from the list of Friends!'; // if model didn't issue command remind model to update the bot if (!isModel) { msgModel = modelName + ', don\'t forget to remove ' + msgParam3 + ' from Friends in the bot config!'; } } else { if (result == 'notfound') { msgPrivate = 'Failed to remove user ' + msgParam3 + ' because they are not in Friends!'; } else { msgPrivate = 'Failed to remove user ' + msgParam3 + ' from Friends. Something went wrong!'; } } break; case "lovers": case "lover": result = delUser(loverUsersArray, msgParam3); if (result instanceof Array) { loverUsersArray = result; msgPublic = name + ' removed ' + msgParam3 + ' from the list of Lovers!'; // if model didn't issue command remind model to update the bot if (!isModel) { msgModel = modelName + ', don\'t forget to remove ' + msgParam3 + ' from Lovers in the bot config!'; } } else { if (result == 'notfound') { msgPrivate = 'Failed to remove user ' + msgParam3 + ' because they are not in Lovers!'; } else { msgPrivate = 'Failed to remove user ' + msgParam3 + ' from Lovers. Something went wrong!'; } } break; case "fiance": case "fiances": result = delUser(fianceUsersArray, msgParam3); if (result instanceof Array) { fianceUsersArray = result; msgPublic = name + ' removed ' + msgParam3 + ' from the list of Fiances!'; // if model didn't issue command remind model to update the bot if (!isModel) { msgModel = modelName + ', don\'t forget to remove ' + msgParam3 + ' from Fiances in the bot config!'; } } else { if (result == 'notfound') { msgPrivate = 'Failed to remove user ' + msgParam3 + ' because they are not in Fiances!'; } else { msgPrivate = 'Failed to remove user ' + msgParam3 + ' from Fiances. Something went wrong!'; } } break; case "husband": case "husbands": result = delUser(husbandUsersArray, msgParam3); if (result instanceof Array) { husbandUsersArray = result; msgPublic = name + ' removed ' + msgParam3 + ' from the list of Husbands!'; // if model didn't issue command remind model to update the bot if (!isModel) { msgModel = modelName + ', don\'t forget to remove ' + msgParam3 + ' from Husbands in the bot config!'; } } else { if (result == 'notfound') { msgPrivate = 'Failed to remove user ' + msgParam3 + ' because they are not in Husbands!'; } else { msgPrivate = 'Failed to remove user ' + msgParam3 + ' from Husbands. Something went wrong!'; } } break; case customName.toLowerCase(): result = delUser(customUsersArray, msgParam3); if (result instanceof Array) { customUsersArray = result; msgPublic = name + ' removed ' + msgParam3 + ' from the ' + customName + ' list!'; // if model didn't issue command remind model to update the bot if (!isModel) { msgModel = modelName + ', don\'t forget to remove ' + msgParam3 + ' from the ' + customName + ' list in the bot config!'; } } else { if (result == 'notfound') { msgPrivate = 'Failed to remove user ' + msgParam3 + ' because they are not in ' + customName + '!'; } else { msgPrivate = 'Failed to remove user ' + msgParam3 + ' from ' + customName + '. Something went wrong!'; } } break; case "pattern": case "p": result = delUser(spamPatternArray, msgParam3); if (result instanceof Array) { spamPatternArray = result; msgPublic = name + ' removed ' + msgParam3 + ' from the spam filter!'; } else { if (result == 'notfound') { msgPrivate = 'Failed to remove ' + msgParam3 + ' because it is not in the filter list!'; } else { msgPrivate = 'Failed to remove ' + msgParam3 + ' from spam filter. Something went wrong!'; } } break; case "spam": case "spammers": case "spammer": case "s": result = delUser(spamUsersArray, msgParam3); if (result instanceof Array) { spamUsersArray = result; msgPublic = name + ' removed ' + msgParam3 + ' from Spammer list!'; } else { if (result == 'notfound') { msgPrivate = 'Failed to remove ' + msgParam3 + ' because they are not in the Spammer list!'; } else { msgPrivate = 'Failed to remove ' + msgParam3 + ' from Spammer list. Something went wrong!'; } } break; default: validSyntax = false; msgPrivate = 'You didn\'t supply a valid group to remove the user from. Valid groups are:\n'; msgPrivate += 'family friend lover fiance husband ... choose only one.'; break; } } else { validSyntax = false; msgPrivate = 'You must provide the group and the username you wish to remove. For example,\n' + botTrigger + ' deluser family someusername\n'; msgPrivate += 'or ' + botTrigger + ' deluser husband someuser'; } } else { msgPrivate = 'Only broadcaster, mods, and creator can remove users from groups!'; } if (validSyntax === true) { message['X-Spam'] = true; } break; case 'check': if (msgParam2) { message['X-Spam'] = true; groupList = checkUser(msgParam2); msgPrivate = 'User ' + msgParam2 + ' found in: ' + groupList; } break; case 'melzoo': case 'mellzoo': case 'mellyzoo': message['X-Spam'] = true; msgPublic = '********** MELLY ZOO **********\n :melldog :mellyelephant :mellychicken :melsid85 :mellylickpaw :melmonkeyfast :melparrot '; break; case 'greychat': if (msgParam2) { message['X-Spam'] = true; switch(msgParam2) { case "on": noGreyChat = false; msgPublic = name + ' has enabled Grey chat!'; break; case "off": noGreyChat = true; msgPublic = name + ' has disabled Grey chat!'; break; default: // invalid option msgPrivate = 'Invalid option, you must use on or off. Example: ' + botTrigger + ' greychat off'; break; } } else { // missing on/off value msgPrivate = 'Missing option, you must use on or off. Example: ' + botTrigger + ' greychat on'; } break; case 'fancommands': case 'fans': if(isModel || isCreator) { if (msgParam2) { message['X-Spam'] = true; switch(msgParam2) { case "on": fanCommands = true; msgPublic = name + ' has granted mod commands to green users!'; break; case "off": fanCommands = false; msgPublic = name + ' has revoked mod commands for green users!'; break; default: // invalid option msgPrivate = 'Invalid option, you must use on or off. Example: ' + botTrigger + ' fancommands off'; break; } } else { // missing on/off value msgPrivate = 'Missing option, you must use on or off. Example: ' + botTrigger + ' fancommands on'; } } else { msgPrivate = 'Only broadcaster and creator can enable or disable mod commands for green users!'; } break; case 'modcommands': case 'mods': if(isModel || isCreator) { if (msgParam2) { message['X-Spam'] = true; switch(msgParam2) { case "on": modCommands = true; msgPublic = name + ' has enabled Moderator commands!'; break; case "off": modCommands = false; msgPublic = name + ' has disabled Moderator commands!'; break; default: // invalid option msgPrivate = 'Invalid option, you must use on or off. Example: ' + botTrigger + ' modcommands off'; break; } } else { // missing on/off value msgPrivate = 'Missing option, you must use on or off. Example: ' + botTrigger + ' modcommands on'; } } else { msgPrivate = 'Only broadcaster and creator can enable or disable mod commands!'; } break; case 'unmask': case 'unmasktimeout': if(isCreator) { if (msgParam2) { message['X-Spam'] = true; switch(msgParam2) { case "on": unmaskTimeout = true; msgPrivate = 'Timeout messages will be sent to you for debugging...'; break; case "off": unmaskTimeout = false; msgPrivate = 'Timeout unmasking disabled...'; break; default: // invalid option msgPrivate = 'Invalid option, you must use on or off. Example: ' + botTrigger + ' unmask off'; break; } } else { // missing on/off value msgPrivate = 'Missing option, you must use on or off. Example: ' + botTrigger + ' unmask on'; } } else { msgPrivate = 'Only Creator can use the unmask command!'; } break; case 'greyemote': case 'greyemotes': case 'grayemote': case 'grayemotes': case 'emotes': case 'emote': if (isCreator || isModel || isMod || isFan) { if (msgParam2) { message['X-Spam'] = true; switch(msgParam2) { case "on": allowGreyEmotes = true; msgPublic = name + ' has enabled grey emotes!'; break; case "off": allowGreyEmotes = false; msgPublic = name + ' has disabled grey emotes!'; break; default: // invalid option msgPrivate = 'Invalid option, you must use on or off. Example: ' + botTrigger + ' greyemotes off'; break; } } else { // missing on/off value msgPrivate = 'Missing option, you must use on or off. Example: ' + botTrigger + ' greyemotes on'; } } else { msgPrivate = 'Only broadcaster, mods and creator can disable or enable grey emotes!'; } break; case 'greets': case 'greetings': if(isModel || isCreator) { if (msgParam2) { message['X-Spam'] = true; switch(msgParam2) { case "on": userGreets = true; msgPublic = name + ' has enabled User Greetings!'; break; case "off": userGreets = false; msgPublic = name + ' has disabled User Greetings!'; break; default: // invalid option msgPrivate = 'Invalid option, you must use on or off. Example: ' + botTrigger + ' greets off'; break; } } else { // missing on/off value msgPrivate = 'Missing option, you must use on or off. Example: ' + botTrigger + ' greets on'; } } else { msgPrivate = 'Only broadcaster and creator can enable or disable user greetings!'; } break; case "status": case "announce": message['X-Spam'] = true; msgPrivate = announceBot(); break; default: message['X-Spam'] = true; msgPrivate = 'You must provide a command. Type ' + botTrigger + ' help\n ...to get a list of options.'; break; } // Output any notices or command results to user if (msgPrivate.length > 0) { cb.sendNotice(msgPrivate, name, botMsgBg,'','bold'); msgPrivate = ""; } // Output any public notices or command results if (msgPublic.length > 0) { cb.sendNotice(msgPublic, '', botMsgBg,'','bold'); msgPublic = ""; } // Output any messages to the mods if (msgMod.length > 0) { cb.sendNotice(msgMod,'', botMsgBg,'','bold','red'); msgMod = ""; } // Output any messages to the model if (msgModel.length > 0) { cb.sendNotice(msgModel, modelName, botMsgBg,'','bold'); msgModel = ""; } } } // see if user envoked emotes that should be removed (no grey emotes) if (!isInGroup && !isCreator && !isModel && !allowGreyEmotes && isGrey) { //user is grey, is not in a group, not TS, not model and grey emotes are not allowed if (msg.indexOf(':') > -1) { //colon found, replace all with _ msg = msg.replace(/:([^\s]+)/g,"[blocked emote]"); } } // apply group tags if (name == 'kaylawynn') { msg = '[Girl Friend]' + ' ' + msg; } else { if (userColors[name]) { if (userColors[name].tag) { msg = '[ ' + userColors[name].tag + ' ] ' + msg; } } else { if (groupTag) { msg = groupTag + ' ' + msg; } } } genderStr = ''; // if gender emotes are enabled, prefix message with correct gender if (genderEmotes) { switch (gender) { case 'm': genderStr = ':avatar_gen_male'; break; case 'f': genderStr = ':avatar_gen_female'; break; case 's': genderStr = ':avatar_gen_trans'; break; case 'c': genderStr = ':avatar_gen_couple'; break; default: genderStr = ':avatar_gen_unknown'; break; } // special user icons if (name == 'tablesalt90') { genderStr= ':tsalien'; // message['background'] = tsBackground; // message['c'] = tsColor; } if (name == 'noiett') { genderStr= ':giconn20'; message['c'] = '#3877ff'; } if (isModel) { genderStr = ':melbot_crown_queen'; } if (name == 'likketysplit1' || name == 'joesdoe_6') { genderStr = ':melbot_crown_king'; } if (name == 'thegr8saiyaman45') { genderStr = ':gjester1'; } if (name == 'wicked_wicked_wicked') { genderStr = ':desiel_icon'; } if (name == '_kor_') { genderStr = ':korcap'; } if (name == 'runlikeachicken') { genderStr = ':runpenis'; } if (name == 'doublexl100' || name == 'double4mel') { genderStr = ':jesshat'; } if (name == 'megha1191') { genderStr = ':melsid139sm'; } if (name == 'ryantheviper200') { genderStr = ':ryanpotatoo'; } } // block and change msg if user is model and is muted if ( isModel && modelMuted ) { selectedMutedMessage = Math.floor(Math.random() * 24); msg = mutedMessages[selectedMutedMessage]; } else { // show notice if user is in timeout if ( userInArray(timeoutUsersArray, name) ) { thisMessageTime = (new Date).getTime(); // simple trottle timeout message output to keep users from flooding room if ( (lastMessageName == name && (thisMessageTime > (lastMessgeTime + 4000))) || lastMessageName != name ) { selectedTimeoutMessage = Math.floor(Math.random() * 50) + 1; msg = timeoutMessages[selectedTimeoutMessage]; lastMessgeTime = (new Date).getTime(); lastMessageName = name; } else { message['X-Spam'] = true; msg = ""; cb.sendNotice("Timeout Flood Protector Enabled! Message Blocked! Stop trying to flood the room! [only you are seeing this]", name, botMsgBg,'','bold'); } } else { if ( userInArray(ghostUsersArray, name) ) { // user is ghost message['X-Spam'] = true; msg = '[Ghost] ' + name + ' says: ' + message['m']; cb.sendNotice(msg,'', botGhostBg,'','bold'); } else { if ( userInArray(spamUsersArray, name) ) { // user is in spammer list message['X-Spam'] = true; msg = ""; } else { if (!isCreator && !hasTipped && isGrey) { /* TODO move message pattern check to top add check for usernames ending in 4 digits and messages starting with 3 digits then check for messages that start and end with 3 digits if those fail then do the check for username pattern */ // check if username matches a pattern and add to spammer array if matched // a match should only be found if the spammer enters the room on a mobile device // that doesn't trigger the onEnter event. otherwise the onEnter event should // catch them when they enter for(i=0; i < lenOfSpamPatterns; i++) { if (isWordInString(spamPatternArray[i],name)) { result = addUser(spamUsersArray, name); msgPublic = 'Spammer ' + name + ' has been spotted and auto-muted by Loyal Family Bot!'; cb.sendNotice(msgPublic, '', botMsgBg,'','bold'); msgPublic = ""; message['X-Spam'] = true; msg = ""; break; } } // Do pattern match for known spammer messages regPattern = /^\d{3}.*?\d{3}$/; // ### [message] ### if (msg.match(regPattern)) { result = addUser(spamUsersArray, name); msgPublic = 'Spammer ' + name + ' has been spotted and auto-muted by Loyal Family Bot!'; cb.sendNotice(msgPublic, '', botMsgBg,'','bold'); msgPublic = ""; message['X-Spam'] = true; msg = ""; } else { regPattern = /^\d{2}.*?$/; regPattern2 = /^.*?\d{4}$/; regPattern3 = /^.*?\d{2}$/; if ((name.match(regPattern2) && msg.match(regPattern)) || (name.match(regPattern2) && msg.match(regPattern3))) { result = addUser(spamUsersArray, name); msgPublic = 'Spammer ' + name + ' has been spotted and auto-muted by Loyal Family Bot!'; cb.sendNotice(msgPublic, '', botMsgBg,'','bold'); msgPublic = ""; message['X-Spam'] = true; msg = ""; } else { regPattern = /^.*?pornmeds.*?$/; if (msg.match(regPattern)) { result = addUser(spamUsersArray, name); msgPublic = 'Spammer ' + name + ' has been spotted and auto-muted by Loyal Family Bot!'; cb.sendNotice(msgPublic, '', botMsgBg,'','bold'); msgPublic = ""; message['X-Spam'] = true; msg = ""; } } } } } } } } // check if grey chat is disabled if (!isInGroup && !isCreator && !isModel && isGrey && noGreyChat) { message['X-Spam'] = true; msg = ""; } // does user have modified colors if (!userColors[name]) { // do nothing } else { // apply colors to message if in color array if (userColors[name].fgColor) { message['c'] = userColors[name].fgColor; } if (userColors[name].bgColor) { message['background'] = userColors[name].bgColor; } } // add gender or special icon prefix if (msg != '') { msg = genderStr + ' ' + iconStr + msg; } // return final altered message message['m'] = msg; return message; }); //end onMessage /* * bot functions */ /* * return string of tippers to display * can limit number of tippers returned to show only top 10, top 5 ect. */ function getTippers(topNumber) { var topTippers = new Array(); var tempTippers = objectToArray(tippers); var output = ''; tempTippers.sort(dynamicSort('-tips')); if (topNumber > 0) { topTippers = tempTippers.slice(0,topNumber); if (topTippers.length == 1) { output = '\nTop Tipper'; } else { output = '\nTop ' + topTippers.length + ' Tippers'; } } else { topTippers = tempTippers; output = '\nAll Tippers'; } if (topTippers.length > 0) { for (i = 0; i < topTippers.length; i++) { output += '\n' + topTippers[i].username + ': ' + topTippers[i].tips; } } else { output = '\nThere have been no tippers since the bot started!\n'; } return output + '\n'; } /* * check if a word or phrase is in a string */ function isWordInString(word,str) { var re = new RegExp(word,"i"); var n = str.search(re); if (n > -1) { return true; } else { return false; } } /* * add a user to the release array */ function addReleaseTime(userArray, username, timeoutMinutes) { var userArrayLength = userArray.length; username = username.toLowerCase(); // check if username is in userarray usernameExists = userInReleaseArray(userArray, username); if (usernameExists === true) { return "duplicate"; // username found in array, return duplicate } else { // add username to array currentEpoch = (new Date).getTime(); userArray[userArrayLength] = new Array(username,currentEpoch + (timeoutMinutes * 60000)); //userArray[userArrayLength][0] = username; //userArray[userArrayLength][1] = currentEpoch + timeoutMinutes * 60000; // check to see that addition of user worked usernameExists = userInReleaseArray(userArray, username); if (usernameExists === true) { return userArray; // it worked, return the array } else { return "failed"; // failed, return failed } } } function delReleaseTime(userArray, username) { var releaseArrayLength = userArray.length; var userElement = -1; username = username.toLowerCase(); if (userInReleaseArray(userArray, username)) { userElement = getReleaseArrayElement(userArray, username); if (userElement > -1) { tempArray = removeArrayElement(userArray, userElement); if (!userInReleaseArray(userArray, username)) { // user was removed return tempArray; } else { // user was not removed, failed return "failed"; } } else { //user element was not in array for some reason return "failed"; } } else { return 'notfound'; } } /* * remove users and model from timeout if their time has expired */ function releaseTimeouts() { // set current epoch time currentEpoch = (new Date).getTime(); //loop through all elements in timeout release array for (i = 0; i < timeoutReleaseArray.length; i++) { if (timeoutReleaseArray[i][1] < currentEpoch) { username = timeoutReleaseArray[i][0]; delUser(timeoutUsersArray, username); msgPublic += "User " + username + " has been released from timeout!\n"; delReleaseTime(timeoutReleaseArray, username); } } // check model's time in case she is muted if (mutedEpoch > 0) { if (mutedEpoch < currentEpoch) { mutedEpoch = 0; msgPublic += "Melly\'s muted time is over and now she\'s able to chat again!"; } else { var tmpTime = timeRemaining(mutedEpoch); if (tmpTime.getUTCMinutes() == 0) { msgPublic += "Melly will be released from muted time shortly " + "(tip 180 to keep her muted 5 additional mins)."; } } } // setup next check call cb.setTimeout(releaseTimeouts, timeoutReleaseInterval * 60000); if (msgPublic) { cb.sendNotice(msgPublic, '', botMsgBg,'','bold'); msgPublic = ""; } } /* * display notification message and start interval timer */ function displayNotification1() { cb.sendNotice(autoNotice1Text,'',botNoteBg,'','bold'); cb.setTimeout(displayNotification1, cb.settings.autoNotice1Interval * 60000); } function displayNotification2() { cb.sendNotice(autoNotice2Text,'',botNoteBg,'','bold'); cb.setTimeout(displayNotification2, cb.settings.autoNotice2Interval * 60000); } function displayBdayNotification() { cb.sendNotice(bdayNoticeText,'',botAlert2Bg,'','bold'); cb.setTimeout(displayBdayNotification, 6 * 60000); } /* * return parameter value from a message string * Req: msgString = full message as string * Req: splitChr = character to split on (usually space) * Req: paramNumber = number of the parameter to return (first is 0) * Return: paramValue = value of the requested parameter */ function getParam(msgString,splitChr,paramNumber) { var tempArray = new Array(); tempArray = msgString.split(splitChr); paramValue = tempArray[paramNumber]; return paramValue; } /* * return random timer name (CB graphic) * names are initially defined at clockGraphics * and moved afterwards to lastClocks to keep the last 3 ones in order */ function getNextGraphic() { var nextIndex = 0; var nextClock = ''; if (clockGraphics.length > 0) { // Pick a random graphic as next one and remove it from clockGraphics nextIndex = Math.floor(Math.random() * clockGraphics.length); nextClock = clockGraphics[nextIndex]; removeArrayElement(clockGraphics, nextIndex) } else { // Pick the initial (0) graphic as next one and remove it from lastClocks nextClock = lastClocks[nextIndex]; removeArrayElement(lastClocks, nextIndex) } // Push the selected graphic at the end in lastclocks lastClocks.push(nextClock); return nextClock; } /* * build a variable length divider from a character * Req: divChr = the character to use for the divier, ie: _ - * * Req: strLen = length of the data to be divided (lenth of a string, or fixed) * Req: maxDivLen = the max number of characters the div can grow to * Return: divStr = string of repeated character that make the divider */ function makeDiv(divChr, strLen, maxDivLen) { var divLen = 0; var divStr = ""; if (strLen > maxDivLen) { divLen = maxDivLen; } else { divLen = strLen; } while (divStr.length < divLen) { divStr = divChr + divStr; } return divStr; } /* * Returns a Date object with time remaining to reach epoch * passed as parameter * */ function timeRemaining(timeEpoch) { var timeObj = new Date(0); currentEpoch = (new Date).getTime(); timeObj.setUTCMilliseconds(timeEpoch - currentEpoch); return timeObj; } /* * return array of users with the new user added, duplicate, * or error string. * Req: userArray = array of users to add the new user to * Req: username = username of new user * Return: array of users with new users added * On error: return "duplicate" if username in user array already * On error: return "failed" if user no duplicate and wasn't added */ function addUser(userArray, username) { var userArrayLength = userArray.length; username = username.toLowerCase(); // check if username is in userarray usernameExists = userInArray(userArray, username); if (usernameExists === true) { return "duplicate"; // username found in array, return duplicate } else { // remove user from all user arrays delUserFromAll(username); // add username to array userArray[userArrayLength] = username; // check to see that addition of user worked usernameExists = userInArray(userArray, username); if (usernameExists === true) { return userArray; // it worked, return the array } else { return "failed"; // failed, return failed } } } /* * return array of users with the new user removed, duplicate, * or error string. * Req: userArray = array of users to add the new user to * Req: username = username of new user * Return: array of users with user removed * On error: return "notfound" if username not in user array * On error: return "failed" if user no duplicate and wasn't added */ function delUser(userArray, username) { var userArrayLength = userArray.length; var userElement = -1; username = username.toLowerCase(); if (userInArray(userArray, username)) { userElement = getArrayElement(userArray, username); if (userElement > -1) { tempArray = removeArrayElement(userArray, userElement); if (!userInArray(userArray, username)) { // user was removed return tempArray; } else { // user was not removed, failed return "failed"; } } else { //user element was not in array for some reason return "failed"; } } else { return 'notfound'; } } /* * remove a user from all groups * Req: username = name over user to remove * Return: none */ function delUserFromAll(username) { if ( userInArray(friendUsersArray, username) ) { result = delUser(friendUsersArray, username); if (result instanceof Array) { friendUsersArray = result; } } if ( userInArray(familyUsersArray, username) ) { result = delUser(familyUsersArray, username); if (result instanceof Array) { familyUsersArray = result; } } if ( userInArray(loverUsersArray, username) ) { result = delUser(loverUsersArray, username); if (result instanceof Array) { loverUsersArray = result; } } if ( userInArray(fianceUsersArray, username) ) { result = delUser(fianceUsersArray, username); if (result instanceof Array) { fianceUsersArray = result; } } if ( userInArray(husbandUsersArray, username) ) { result = delUser(husbandUsersArray, username); if (result instanceof Array) { husbandUsersArray = result; } } } /* retun group bg color */ function getGroupBgColor(username) { var bgc = "#ffffff"; if ( userInArray (familyUsersArray, username) ) { bgc = familyColor; } else { if ( userInArray (friendUsersArray, username) ) { bgc = friendColor; } else { if (userInArray(loverUsersArray, username)) { bgc = loverColor; } else { if (userInArray(fianceUsersArray, username)) { bgc = fianceColor; } else { if (userInArray(husbandUsersArray, username)) { bgc = husbandColor; } } } } } return bgc; } /* * return the element or index number of an array value * Req: sourceArray = array to parse * Req: value = value to find * Return: index of the element */ function getArrayElement(sourceArray, value) { var index = 0; for (i = 0; i < sourceArray.length; i++) { if (sourceArray[i] == value) { index = i; } } return index; } /* * same as getArrayElement but for timeout release array */ function getReleaseArrayElement(sourceArray, value) { var index = 0; for (i = 0; i < sourceArray.length; i++) { if (sourceArray[i][0] == value) { index = i; } } return index; } /* * dynamic sort function to sort array by a property * Borrowed from Asdfghjkl28 */ function dynamicSort(property) { var sortOrder = 1; if (property[0] === "-") { sortOrder = -1; property = property.substr(1, property.length - 1); } var sortfunc = function (a, b) { if (typeof a[property] === "undefined") { if (typeof b[property] === "undefined") { // both undef return 0; } else { // b ok, a undef return -1; } } if (typeof b[property] === "undefined") { if (typeof a[property] === "undefined") { // both undef return 0; } else { // a ok, b undef return 1; } } var result = (a[property] < b[property]) ? -1 : (a[property] > b[property]) ? 1 : 0; return result * sortOrder; }; return sortfunc; } /* * convert object to an array * Borrowed from Asdfghjkl28 */ function objectToArray(myObj) { var arr = []; for (var i in myObj) { if (myObj.hasOwnProperty(i)) { arr.push(myObj[i]); } } return arr; } /* * return an array with the indicated element removed * Req: sourceArray = array to be modified * Req: element = element to be removed * Return: the modified array */ function removeArrayElement(sourceArray,element) { sourceArray.splice(element, 1); return sourceArray; } /* * return boolean if user is in user array * Req: userArray = array of users to parse * Req: userName = name of user to parse fr * Returns: userFound = true or false */ function userInArray(userArray, username) { var userFound = false; username = username.toLowerCase(); if (userArray.length > 0) { for(i=0; i < userArray.length; i++) { if (userArray[i] == username) userFound = true; } } return userFound; } /* * return boolean if user is in user release array * Req: timeoutReleaseArray = array of users to parse * Req: username = name of user to parse fr * Returns: userFound = true or false */ function userInReleaseArray(userArray, username) { var userFound = false; username = username.toLowerCase(); if (userArray.length > 0) { for(i=0; i < userArray.length; i++) { if (userArray[i][0] == username) userFound = true; } } return userFound; } /* * return a string of usernames from an array of users * Req: userArray = array of users * Return: string of of usersnames */ function getUsers(userArray) { var userList = ""; for (i = 0; i < userArray.length; i++) { userList += userArray[i] + ' '; } return userList; } /* * return list of groups that a user is a member of * Req: username = username to find * Return: string with list of groups the user was found in */ function checkUser(username) { var groupList = ""; username = username.toLowerCase(); if (userInArray(familyUsersArray, username)) groupList += "Family "; if (userInArray(friendUsersArray, username)) groupList += "Friends "; if (userInArray(loverUsersArray, username)) groupList += "Lovers "; if (userInArray(fianceUsersArray, username)) groupList += "Fiances "; if (userInArray(husbandUsersArray, username)) groupList += "Husbands "; if (userInArray(customUsersArray, username)) groupList += customName; return groupList; } function daysUntilNext(month, day){ var tday= new Date(), y = tday.getFullYear(), next = new Date(y, month - 1, day); tday.setHours(0, 0, 0, 0); if(tday > next) next.setFullYear(y + 1); return Math.round((next - tday)/8.64e7); } function notModel() { var output = '\n\n' + modelName + '! This bot was created for '; output += 'Missy_Mell, you are not her! Please consider having your own '; output += 'bot created. Contact tablesalt90 on here or twitter @tablesalt90\n\n'; return output; } function newStuff() { var output = '\nHi ' + modelName + '! '; output += 'Here are the newest features in version '+ botVersion +' of your bot!\n'; output += '** NEW ** New custom user list named by the model.\n'; output += '** NEW ** Added mute/unmute model feature to tipmenu.\n'; return output; } function modWelcome() { var output = '\nGreetings Moderator...'; output += 'Loyal Family Bot version ' + botVersion + ' is running! Below are the latest changes and features that you as a moderator may use...\n'; output += '** NEW ** New custom user list named by the model.\n'; output += '** NEW ** Added mute/unmute model feature to tipmenu.\n'; return output; } /* * Builds user arrays and strings based on data provided by bot * config settings */ function loadSettings() { // grey graphics if (cb.settings.allowGreyEmotes == 'Yes') { allowGreyEmotes = true; } else { allowGreyEmotes = false; } // mod commands if (cb.settings.modCommands == 'Yes') { modCommands = true; } else { modCommands = false; } // greetings if (cb.settings.userGreets == 'Yes') { userGreets = true; } else { userGreets = false; } // balls if (cb.settings.userBalls == 'Yes') { userBalls = true; } else { userBalls = false; } // gender emotes if (cb.settings.genderEmotes == 'Yes') { genderEmotes = true; } else { genderEmotes = false; } // load friends into array and other variables if (cb.settings.friendList) { tempStr = cb.settings.friendList.toLowerCase(); //make names all lowercase cb.settings.friendList = tempStr.trim(); // remove extra spaces friendUsersArray = cb.settings.friendList.split(' '); } if (cb.settings.friendTag) { friendTag = cb.settings.friendTag.trim(); } if (cb.settings.friendColor) { tempArray = cb.settings.friendColor.split(' '); friendColor = '#' + tempArray[1]; } // load family into array and other variables if (cb.settings.familyList) { tempStr = cb.settings.familyList.toLowerCase(); //make names all lowercase cb.settings.familyList = tempStr.trim(); // remove extra spaces familyUsersArray = cb.settings.familyList.split(' '); } if (cb.settings.familyTag) { familyTag = cb.settings.familyTag.trim(); } if (cb.settings.familyColor) { tempArray = cb.settings.familyColor.split(' '); familyColor = '#' + tempArray[1]; } // load lover into array and other variables if (cb.settings.loverList) { tempStr = cb.settings.loverList.toLowerCase(); //make names all lowercase cb.settings.loverList = tempStr.trim(); // remove extra spaces loverUsersArray = cb.settings.loverList.split(' '); } if (cb.settings.loverTag) { loverTag = cb.settings.loverTag.trim(); } if (cb.settings.loverColor) { tempArray = cb.settings.loverColor.split(' '); loverColor = '#' + tempArray[1]; } // load fiance into array and other variables if (cb.settings.fianceList) { tempStr = cb.settings.fianceList.toLowerCase(); //make names all lowercase cb.settings.fianceList = tempStr.trim(); // remove extra spaces fianceUsersArray = cb.settings.fianceList.split(' '); } if (cb.settings.fianceTag) { fianceTag = cb.settings.fianceTag.trim(); } if (cb.settings.fianceColor) { tempArray = cb.settings.fianceColor.split(' '); fianceColor = '#' + tempArray[1]; } // load husband into array and other variables if (cb.settings.husbandList) { tempStr = cb.settings.husbandList.toLowerCase(); //make names all lowercase cb.settings.husbandList = tempStr.trim(); // remove extra spaces husbandUsersArray = cb.settings.husbandList.split(' '); } if (cb.settings.husbandTag) { husbandTag = cb.settings.husbandTag.trim(); } if (cb.settings.husbandColor) { tempArray = cb.settings.husbandColor.split(' '); husbandColor = '#' + tempArray[1]; } // load valentine's into array and other variables if (cb.settings.useValentines == 'Yes') { useValentines = true; } else { useValentines = false; } if (cb.settings.valentineList) { tempStr = cb.settings.valentineList.toLowerCase(); //make names all lowercase cb.settings.valentineList = tempStr.trim(); // remove extra spaces valentineUsersArray = cb.settings.valentineList.split(' '); } if (cb.settings.valentineTag) { valentineTag = cb.settings.valentineTag.trim(); } if (cb.settings.valentineColor) { tempArray = cb.settings.valentineColor.split(' '); valentineColor = '#' + tempArray[1]; } // load easter bunz into array and other variables if (cb.settings.useEasterBunz == 'Yes') { useEasterBunz = true; } else { useEasterBunz = false; } if (cb.settings.easterBunzList) { tempStr = cb.settings.easterBunzList.toLowerCase(); //make names all lowercase cb.settings.easterBunzList = tempStr.trim(); // remove extra spaces easterBunzUsersArray = cb.settings.easterBunzList.split(' '); } if (cb.settings.easterBunzTag) { easterBunzTag = cb.settings.easterBunzTag.trim(); } if (cb.settings.easterBunzColor) { tempArray = cb.settings.easterBunzColor.split(' '); easterBunzColor = '#' + tempArray[1]; } // set custom group state customGroup = (cb.settings.customName != 0); // load custom group users into array and other variables if (customGroup) { customName = cb.settings.customName; if (cb.settings.customList) { tempStr = cb.settings.customList.toLowerCase(); //make names all lowercase cb.settings.customList = tempStr.trim(); // remove extra spaces customUsersArray = cb.settings.customList.split(' '); } if (cb.settings.customTag) { customTag = cb.settings.customTag.trim(); } if (cb.settings.customColor) { tempArray = cb.settings.customColor.split(' '); customColor = '#' + tempArray[1]; } } // load spam pattern list into array if (cb.settings.spamPatternList) { tempStr = cb.settings.spamPatternList.toLowerCase(); //make patterns all lowercase cb.settings.spamPatternList = tempStr.trim(); // remove extra spaces spamPatternArray = cb.settings.spamPatternList.split(' '); } // load notifications if (cb.settings.autoNotice1) { autoNotice1Text = cb.settings.autoNotice1.trim(); } if (cb.settings.autoNotice2) { autoNotice2Text = cb.settings.autoNotice2.trim(); } } function announceBot() { var divStr=""; var statusMsg = ""; divStr = makeDiv('*', 45, 45); statusMsg = divStr + '\nLOYAL FAMILY Bot ver ' + botVersion + ' last updated ' + botDate + '\nCreated by tablesalt90 & upgraded by noiett\n' + divStr + '\n'; statusMsg += 'Gender Emotes: '; if (genderEmotes) { statusMsg += 'On'; } else { statusMsg += 'Off'; } statusMsg += '\n'; statusMsg += 'Grey Emotes: '; if (allowGreyEmotes) { statusMsg += 'On'; } else { statusMsg += 'Off'; } statusMsg += '\n'; statusMsg += 'Mod Commands: '; if (modCommands) { statusMsg += 'On'; } else { statusMsg += 'Off'; } statusMsg += '\n'; statusMsg += 'User Greetings: '; if (userGreets) { statusMsg += 'On'; } else { statusMsg += 'Off'; } statusMsg += '\n'; statusMsg += 'Number of Friends: ' + friendUsersArray.length + '\n'; statusMsg += 'Number in Family: ' + familyUsersArray.length + ' (tip 500)\n'; statusMsg += 'Number of Lovers: ' + loverUsersArray.length + ' (tip 1000)\n'; statusMsg += 'Number of Fiances: ' + fianceUsersArray.length + ' (tip 1500)\n'; statusMsg += 'Number of Husbands: ' + husbandUsersArray.length + ' (tip 2000)\n'; if (customGroup) { statusMsg += 'Number in ' + customName + ': ' + customUsersArray.length + '\n'; } statusMsg += 'Type - ' + botTrigger + ' help - for list commands\n'; statusMsg += divStr; statusMsg += '\nType /tipmenu for the Tip Menu\n'; statusMsg += divStr; return statusMsg; } function bdaynotice(name) { if (name == 'all') { name = ''; } if (daystobday === 0) { cb.sendNotice('Wish Melly A Happy Birthday!',name, botAlertBg,'','bold'); } else { if (daystobday > 0) { cb.sendNotice('Only ' + daystobday + ' day' + (daystobday > 1 ? 's' : '') + ' until Melly\'s birthday!',name,botAlertBg,'','bold'); } } } function balloon(tipamount,name) { msgPublic =""; balloonEmote = ""; switch(tipamount) { case 426: balloonEmote = ":mbballoon2015_426"; break; case 326: balloonEmote = ":mbballoon2015_326b"; break; case 226: balloonEmote = ":mbballoon2015_226"; break; case 126: balloonEmote = ":mbballoon2015_126"; break; case 25: balloonEmote = ":mbballoon2015_25"; break; default: balloonEmote = ""; break; } if (balloonEmote) { msgPublic += ':mbribbondivider \n'; msgPublic += ':mbribbondivider \n'; msgPublic += '🎈🎈🎈 ' + name + ' tipped to pop a ' + balloonEmote + ' 🎈🎈🎈 \n'; msgPublic += ':mbribbondivider \n'; msgPublic += ':mbribbondivider \n'; } } loadSettings(); cb.sendNotice(announceBot(),'', botMsgBg,'','bold'); // Birthday notice if (daystobday < 50) { bdaynotice("all"); if (daystobday === 0) { cb.setTimeout(displayBdayNotification, 6 * 60000); } } if (modelName !='missy_mell') cb.sendNotice(notModel(),modelName,botAlertBg,'','bold'); if (modelName == 'missy_mell') cb.sendNotice(newStuff(),modelName,'#000000','#FFFF00','bold'); if (autoNotice1Text) cb.setTimeout(displayNotification1, cb.settings.autoNotice1Interval * 60000); if (autoNotice2Text) cb.setTimeout(displayNotification2, cb.settings.autoNotice2Interval * 60000); // start timeout release event cb.setTimeout(releaseTimeouts, timeoutReleaseInterval * 60000);
© Copyright Chaturbate 2011- 2024. All Rights Reserved.