Bots Home
|
Create an App
KimberleyFun
Author:
bartboer
Description
Source Code
Launch Bot
Current Users
Created by:
Bartboer
/************************************************************* ** ** Title: KimberleyFun's Bot ** Author: author bartboer - @BBoer77 ** Version: 1.0.0 Apr 19, 2017 Bot Specially for KimberleyFun ** First Version: Apr 19, 2017 ** Description: KimberleyFun's Bot for use by KimberleyFun - chaturbate.com/KimberleyFun ** *************************************************************/ // Setup vars var botVersion = "1.0.0"; var botDate = "Apr 19, 2017"; var lastMessgeTime = 0; var lastMessageName = ""; var tippers = new Array(); var timeoutMessages = new Array(); var timeoutUsersArray = new Array(); var timeoutReleaseArray = new Array(); var ghostUsersArray = new Array(); var spamPatternArray = new Array(); var spamUsersArray = new Array(); var spamModelArray = new Array(); // KF var GroupAUsersArray = new Array(); var GroupBUsersArray = new Array(); var GroupCUsersArray = new Array(); var GroupDUsersArray = new Array(); // KF var userColors = new Array(); var specialNames = new Array(); var tempString = ""; var tempNum = 0; var tempArray = new Array(); var modelName = cb.room_slug; var msgNotify = ""; var msgPublic = ""; var msgPrivate = ""; var msgPrivate2 = ""; var msgModel = ""; var msgMod = ""; var tsColorD = "#007020"; var tsColor = tsColorD; var tsBackgroundD = "#eeffcc"; var tsBackground = tsBackgroundD; var groupColor = "#FFFFFF"; var autoNotice1Text = ""; var autoNotice1Text = ""; var autoNotice2Text = ""; var autoNotice3Text = ""; var autoNotice4aText = "Flash Tip Menu: Ass(25) // Boobs(27) // Pussy(53) // All Naked(101)"; var autoNotice4bText = "Play Tip Menu: Tongue(7) // Dance(14) // Dildo Tease(20) // Tits(33) // Pussy(123) // Dildo(169)"; var autoNotice4cText = "Others Tip Menu: Spank(5) // Stand up(6) // Pushups(8) // PM(10) // Smoke(22) // Change outfit (36)"; var autoNotice4dText = ""; var autoNotice4eText = "Tip Menu: PM(10)"; var autoNotice4fText = "Tip me if u love me :heart2"; var autoNotice4gText = ""; var autoNotice5Text = ""; var autoNotice6Text = ""; var botTrigger = "/kimbot"; var botTrigger2 = "/kf"; var timeoutReleaseInterval = 1; var daystounlock = daysUntilNext(3, 24); var modCommands = true; var userGreets = true; var genderEmotes = true; var allowGreyEmotes = true; var daystobday = daysUntilNext(5, 1); var unmaskTimeout = true; var locked = false; var botMsgBg = '#BDDEDC'; var botMsgBg2 = '#99CCFF'; var botAlertBg = '#fa5413'; var botNoteBg = '#99FF66'; var botAlert2Bg = '#CCFF00'; var botGhostBg = '#EDEDED'; var botSpecialBg= '#fa13f2'; var botTipaBg= '#fa13f2'; var botTipbBg= '#fb42f4'; var botTipcBg= '#fc71f7'; var botspecialBg= '#669933'; //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 roomrulesText = " Please read the room rules type /roomrules in the chat. When you read them you will get less chance of being silenced or automatic be silence by the KimberleyFun\'s bot!!!"; //var raffleMsg ='Thank you for tipping for the Video Raffle ticket(s), the raffle drawing will be done when all the tickets are sold. The winner will be announced during one of my shows!!!'; // Added for TipMenu on off var StdTipMenuNotice = 0; var AllTipMenuNotice = 0; var NakedTipMenuNotice = 0; var DuoTipMenuNotice = 0; // Added for Tip History var tip_history = []; var tip_user = []; var tip_time = []; var tip_msg = []; var number_tip = 0; var counter = 0; var hist // KingTipper - Leaderboard var tipperArray = new Array; var numTippers = 0; var colorking = "#C287C2";//original color: #B369B3 var colorlb = "#FFF0F5"; var currentKing = ''; var kingTip = 0; var kingTimer = parseInt(cb.settings.kingTimer); var leaderArray = [['',0],['',0],['',0]]; var leaderTimer = parseInt(cb.settings.leaderTimer); var initialize = 0; var kingTipperSpam = 0; var leaderboardSpam = 0; // Spammer/blocked users/ blocked models var spamPatternList = '__c2c __cheating__slut ___cheating___wife __c__2__c _busty_milf ____real____milf _sweet_milf ____c____2____c ____chat____girl ____cheating____slut ____exhib____girl ____c2____c ____flashing____girl ____on____cam ____loves____boys ____cheating____wife katie_mom_ hot_kimy_ _25_wet_girl ____cheating___xwife ____flashing___xgirl wet_xpinkx_'; var spamUserList= 'hades2500 animall14 girl20xcum_41x3 girl20xcum_416 '; var spamModelList = ''; // groups var specialList = ''; // Tip menu var tipMenu = "KimberleyFun's Tip Menu!\n\n" + "Flash Menu\n" /* + "40...... Ass Flash\n" */ + "50...... Flash\n" /* + "60...... Pussy Flash\n" */ + "115..... Fully naked Flash\n" + "Play Menu\n" + "100...... Finger Pussy\n" /* + "105...... Finger Pussy Close Up\n" + "110...... Vibrator play\n" */ + "120...... Dildo play\n" /* + "130...... Vib + dildo play\n" */ + "More me\n" + "22....... PM\n" + "40....... Watch Cam\n" + "Spank me\n" + "20....... 1 spank\n" + "90....... 5 spanks\n" + "Oil me Up\n" + "60....... Oil Boobs or Ass\n" + "30....... Oil Boobs or Ass when allready naked\n" + "** If i\'m doing a show I can not always do my tip menu. Please respect it!!!!\n" + "More options you will find in my bio.\n" + "*** please put your Request in a Tipnote***\n"; /* // raffle menu var raffleMenu = "Video Raffle\n" + "The video Raffle is from 16 june to 14 july. For only 66 tokens a ticket you can win nice video's from me.\n" + "First price: My new extra long video! Pussy play, squirting, anal play, using 8 toys including 5 buttplugs!!\n" + "Second price: You win all my videos (1-17)\n" + "Third price: You win my new videos (11-17)\n" + "Wanna buy a ticket? Tip 66 tokens during a show ;)\n" + "(1 price per person)\n"; */ // room rules var roomRules = "****Room Rules!\n\n" + "**** Begging demanding or directing is not allowed in the chat if you don\'t tip. Have a request put it in your tip note.\n" + "**** Don\'t use the emoticons in the chat if you don\'t have tokens they will be blocked. Emoticons with erotic content in it will lead to a silence.\n" + "**** Don\'t use the rude words like bitch, whore or anyting that is rude. You only get a free silence in all the rooms that use this bot forever.\n" + "**** In my room you need to turn off your cam. If we see that you are online broadcasting, you will get a ban.\n" + "**** Broadcasters if you promote yourself in my room you will get a silence forever and a report to cb.\n" + "**** Tippers be on the lookout for other models who pm you to come to their room ;). Its against all rules of CB to promote themself in other models there rooms. Please contact a moderator if one of the models contact you in your pm. Thank you\n" + "**** Please be nice to the users, moderators and me. Respect the rules of the room and we can have lots of fun when I\'m online.\n"; // bot triggers commandos var helpMsg = " may use the following commands:\n" + botTrigger + " spamhelp = show spam filter help\n" + botTrigger + " view [group] = list of level users (only special at the moment)\n" + botTrigger + " useradd [group] [username] = add username to a group (only special at the moment)\n" + botTrigger + " userdel [group] [username] = delete username from a group (only special at the moment)\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 + " kimnote [message] = send a private message to Kimberley\n" + botTrigger + " modnote [message] = send a private message to mods\n" + botTrigger + " kimmod [message] = send a private message to Kimberley and 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 + " hist = show history of all tippers (private), model also see tipnotes\n" + botTrigger + " hist # = show history of latest # tippers (private), model also see tipnotes\n" + botTrigger + " histh = show history of all tippers (private) above 25tks, model also see tipnotes\n" + botTrigger + " histh # = show history of latest # tippers (private), model also see tipnotes\n" + botTrigger + " histh # # = show history of latest #(1st) tippers (private) and with min of # tks, model also see tipnotes\n" + botTrigger + " kingspam [on/off] = turns on/off spams \"tip x to be king\"\n" + botTrigger + " lb = shows the leaderboard (if it turned on)\n" + botTrigger + " lbspam [on/off] = turns on/off spams \"tip x to be king\"\n" + botTrigger + " stdtipmenu [on/off] = turns on/off standard tip menu\n" + botTrigger + " alltipmenu [on/off] = turns on/off all tip menu\n" + botTrigger + " nakedtipmenu [on/off] = turns on/off the naked tip menu\n" + botTrigger + " duotipmenu [on/off] = turns on/off the naked tip menu\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."; // spam filter commands var spamMsg = " Spam Filter and blocked users and models Help\n" + "You may add usernames, partial username, or patterns found in username 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(dont use only use by bartboer)\n" + botTrigger + " del pattern [pattern/name] = delete a pattern/name from filter(dont use only use by bartboer)\n" + botTrigger + " add spammer [username] = add user to the blocked user list\n" + botTrigger + " del spammer [username] = delete user from the blocked user list\n" + botTrigger + " add spammodel [username] = add model to the blocked model list\n" + botTrigger + " del spammodel [username] = delete user from the blocked model list\n" + botTrigger + " list spam spammer/pattern [username] = Spammer/pattern list\n" + botTrigger + " list spamuser blocked userlist [username] = blocked user list\n" + botTrigger + " list spammodel blocked userlist [username] = blocked model list\n"; // special users //specialNames[0] = new Array('bartboer',':It\'s Bart in the room!!!!!'); //specialNames[1] = new Array('KimberleyFun','Kimberley is back. Guys lets tip this beautiful girl!!!!'); // timeout messages not in use at the momment 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 Model options */ cb.settings_choices = [ { name: 'allowGreyEmotes', type: 'choice', label: 'Allow Grey User to use Emoticons?', choice1: 'Yes', choice2: 'No', defaultValue: 'No' }, /* { name: 'genderEmotes', type: 'choice', label: 'Show the gender of the user in chat', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes' }, */ { name: 'autoNotice1', label: 'Vote for me notice, use text and emotes', type: 'str', minLength: 0, maxLength: 512, required: false, defaultValue: ':follow here and on :twitterlogo @KimberleyFun1' }, { name: 'autoNotice1Interval', label: 'Show above notification x minutes', type: 'choice', choice1: 2, choice2: 6, choice3: 8, choice4: 10, choice5: 12, choice6: 15, choice7: 20, choice8: 25, choice9: 30, choice10: 45, choice11: 60, defaultValue: 6 }, { name: 'autoNotice2', label: 'Promote follow ', type: 'str', minLength: 0, maxLength: 512, required: false, defaultValue: '' }, { name: 'autoNotice2Interval', label: 'Show above notification x minutes', type: 'choice', choice1: 2, choice2: 5, choice3: 7, choice4: 11, choice5: 12, choice6: 15, choice7: 20, choice8: 25, choice9: 30, choice10: 45, choice11: 60, defaultValue: 7 }, /* Raffle { name: 'autoNotice3', label: 'Promote Raffle ', type: 'str', minLength: 0, maxLength: 512, required: false, defaultValue: 'Buy your tickets for my Video Raffle only 66 tokens to win great video\'s. For more information type /raffle in the chat' }, { name: 'autoNotice3Interval', label: 'Show above notification x minutes', type: 'choice', choice1: 2, choice2: 5, choice3: 7, choice4: 10, choice5: 12, choice6: 15, choice7: 20, choice8: 25, choice9: 30, choice10: 45, choice11: 60, defaultValue: 10 },*/ /* { name: 'autoNotice4a', label: 'Tip Flash Menu Notice', type: 'str', minLength: 0, maxLength: 512, required: false, defaultValue: 'Flash Tip Menu: Flash ass(40) :heart2 Flash boobs(50) :heart2 Flash pussy(60) :heart2 Flash fully naked(115) :heart2' }, { name: 'autoNotice4b', label: 'Tip Play Menu Notice', type: 'str', minLength: 0, maxLength: 512, required: false, defaultValue: 'Play Tip Menu: Finger pussy(100) :heart2 Finger Pussy Close Up(105) :heart2 Vib play(110) :heart2 Vib + Dildo play(130) :heart2' }, { name: 'autoNotice4c', label: 'Tip Spank Menu Notice', type: 'str', minLength: 0, maxLength: 512, required: false, defaultValue: 'Spank Tip Menu: 1 Spank (25) :spankasss 5 Spanks (99)' }, { name: 'autoNotice4d', label: 'Tip Oil Menu Notice', type: 'str', minLength: 0, maxLength: 512, required: false, defaultValue: 'Oil Tip Menu: Oil Boobs or Ass(66) :heart2 Oil Boobs or Ass when Naked (33)' }, */ { name: 'autoNotice4Interval', label: 'Show TipMenu notification x minutes', type: 'choice', choice1: 1, choice2: 2, choice3: 3, choice4: 4, choice5: 5, choice6: 6, choice7: 7, choice8: 8, choice9: 9, choice10: 10, choice11: 15, defaultValue: 4 }, /* { name: 'autoNotice5', label: 'Tip Menu Notice When Standard Tipmenu is off', type: 'str', minLength: 0, maxLength: 512, required: false, defaultValue: 'Tip Menu: PM(20) :heart2 Watch cam(55) :heart2' }, { name: 'autoNotice5Interval', label: 'Show above notification x minutes', type: 'choice', choice1: 2, choice2: 5, choice3: 7, choice4: 10, choice5: 12, choice6: 15, choice7: 20, choice8: 25, choice9: 30, choice10: 45, choice11: 60, defaultValue: 5 }, */ /* { name: 'autoNotice6', label: 'KimberleyFun\'s FanClub Notice.', type: 'str', minLength: 0, maxLength: 512, required: false, defaultValue: 'Join my FanClub. See bio for more info about it.' }, { name: 'autoNotice6Interval', label: 'Show above notification x minutes', type: 'choice', choice1: 2, choice2: 5, choice3: 7, 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 commandos?', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes' }, { name: 'userGreets', type: 'choice', label: 'Show Welcome greetings to user when they enter the chat?', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes' }, // Added for StdTipMenu On Off { name: 'StdTipMenuNotice', type: 'choice', label: 'Standard TipMenu on or off?', choice1: 'On', choice2: 'Off', defaultValue: 'On' }, // Added for AllTipMenu On Off { name: 'AllTipMenuNotice', type: 'choice', label: 'All TipMenu On or Off?', choice1: 'On', choice2: 'Off', defaultValue: 'On' }, // Added for NakedTipMenu On Off { name: 'NakedTipMenuNotice', type: 'choice', label: 'Only Naked TipMenu On or Off?', choice1: 'On', choice2: 'Off', defaultValue: 'Off' }, // Added for DuoTipMenu On Off { name: 'DuoTipMenuNotice', type: 'choice', label: 'Duo TipMenu On or Off?', choice1: 'On', choice2: 'Off', defaultValue: 'Off' }, // KingTipper - Leaderboard { name: 'kingTipper', type: 'choice', label: 'Do you want to use the "King Tipper" feature?', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes' }, { name: 'kingTipperSpam', type: 'choice', label: 'Do you want to periodically announce the tip required to become King?', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes' }, { name: 'kingMin', type: 'int', label: 'Enter the minimum tip level for a user to become King:', minValue: 1, maxValue: 1000000, defaultValue: 25 }, { name: 'kingTimer', type: 'int', label: 'Change this value if you would like the King announcement to happen at a different interval:', minValue: 1, maxValue: 60, defaultValue: 8 }, { name: 'leaderBoard', type: 'choice', label: 'Would you like to use the Leader Board feature?', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes' }, { name: 'leaderBoardSpam', type: 'choice', label: 'Do you want to periodically announce the top three tippers?', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes' }, { name: 'leaderTimer', type: 'int', label: 'Change this value if you would like the Leaderboard announcement to happen at a different interval:', minValue: 1, maxValue: 60, defaultValue: 7 }, { name: 'tipTitles', label: 'Do you want to display users\' tip totals as titles?', type: 'choice', 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: 'GroupATag', label: '*** GroupA *** *** *** Tag for GroupA users', type: 'str', minLength: 0, maxLength: 25, required: true, defaultValue: '[GroupA]' }, { name: 'GroupAList', label: 'List of GroupA users, separated by space (their CB usernames exactly)', type: 'str', minLength: 0, maxLength: 10240, required: false, defaultValue: '' }, { name: 'GroupAColor', label: 'Highlight color to use for GroupA 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: 'GroupBTag', label: '*** GroupB *** *** *** Tag for GroupB users', type: 'str', minLength: 0, maxLength: 25, required: true, defaultValue: '[GroupB]' }, { name: 'GroupBList', label: 'List of GroupB users, separated by space (their CB usernames exactly)', type: 'str', minLength: 0, maxLength: 10240, required: false, defaultValue: '' }, { name: 'GroupBColor', label: 'Highlight color to use for GroupB 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: 'GroupCTag', label: '*** GroupC *** *** *** Tag for GroupC users', type: 'str', minLength: 0, maxLength: 25, required: true, defaultValue: '[GroupC]' }, { name: 'GroupCList', label: 'List of GroupC users, separated by space (their CB usernames exactly)', type: 'str', minLength: 0, maxLength: 10240, required: false, defaultValue: '' }, { name: 'GroupCColor', label: 'Highlight color to use for GroupC 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: 'GroupDTag', label: '*** GroupD *** *** *** Tag for GroupD users', type: 'str', minLength: 0, maxLength: 25, required: true, defaultValue: '[GroupD]' }, { name: 'GroupDList', label: 'List of GroupD users, separated by space (their CB usernames exactly)', type: 'str', minLength: 0, maxLength: 10240, required: false, defaultValue: '' }, { name: 'GroupDColor', label: 'Highlight color to use for GroupD 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' }, // End ]; /* * handle tips from users */ var totalTipped = 0; cb.onTip(function (tip) { if (!locked) { var divStr = ""; var msgText = ""; var msgNotify = ""; var tipAmount = parseInt(tip['amount']); var name = tip['from_user']; var modelName = cb.room_slug; // 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; // Added for Tip History tip_user[number_tip] = tip['from_user']; tip_history[number_tip] = tip['amount']; tip_msg[number_tip] = tip['message']; tip_time[number_tip] = new Date(); number_tip += 1; // End // KingTipper - Leaderboard tipperArray[findTipper(name)][1] += parseInt(tip['amount']); if(cb.settings.kingTipper == 'Yes') { if(name != currentKing && parseInt(tipperArray[findTipper(name)][1]) > kingTip && parseInt(tipperArray[findTipper(name)][1]) >= parseInt(cb.settings.kingMin)) { if(currentKing != '') { cb.sendNotice('You have been dethroned by ' + name + ', but revenge is sweet...', currentKing, colorking); } cb.sendNotice('We have a new King!\nAll hail :smallCrown ' + name + '!','',colorking); currentKing = name; kingTip = parseInt(tipperArray[findTipper(name)][1]); } else if(name == currentKing) { kingTip = parseInt(tipperArray[findTipper(name)][1]); } } if(cb.settings.leaderBoard == 'Yes') { //create an array of the names var nameArray = new Array; for(var i = 0; i < leaderArray.length; i++) { nameArray[i] = leaderArray[i][0]; } //the user is not currently in the top 3 if(!cbjs.arrayContains(nameArray,name)) { if(tipperArray[findTipper(name)][1] > leaderArray[0][1]) { leaderArray[2][0] = leaderArray[1][0]; leaderArray[2][1] = leaderArray[1][1]; leaderArray[1][0] = leaderArray[0][0]; leaderArray[1][1] = leaderArray[0][1]; leaderArray[0][0] = name; leaderArray[0][1] = tipperArray[findTipper(name)][1]; } else if(tipperArray[findTipper(name)][1] < leaderArray[0][1] && tipperArray[findTipper(name)][1] > leaderArray[1][1] || tipperArray[findTipper(name)][1] == leaderArray[0][1]) { leaderArray[2][0] = leaderArray[1][0]; leaderArray[2][1] = leaderArray[1][1]; leaderArray[1][0] = name; leaderArray[1][1] = tipperArray[findTipper(name)][1]; } else if(tipperArray[findTipper(name)][1] < leaderArray[1][1] && tipperArray[findTipper(name)][1] > leaderArray[2][1] || tipperArray[findTipper(name)][1] == leaderArray[1][1]) { leaderArray[2][0] = name; leaderArray[2][1] = tipperArray[findTipper(name)][1]; } } //the user is currently in the top 3 else { //the user is already #1 if(leaderArray[0][0] == name) { leaderArray[0][1] = tipperArray[findTipper(name)][1]; } //the user is #2 and is moving to #1 if(leaderArray[1][0] == name && tipperArray[findTipper(name)][1] > parseInt(leaderArray[0][1])) { leaderArray[1][0] = leaderArray[0][0]; leaderArray[1][1] = leaderArray[0][1]; leaderArray[0][0] =name; leaderArray[0][1] = parseInt(tipperArray[findTipper(name)][1]); } //the user is #2 and is not moving to #1 else if(leaderArray[1][0] == name && tipperArray[findTipper(name)][1] <= parseInt(leaderArray[0][1])) { leaderArray[1][1] = parseInt(tipperArray[findTipper(name)][1]); } //the user is #3 and is moving to #2 else if(leaderArray[2][0] == name && tipperArray[findTipper(name)][1] > parseInt(leaderArray[1][1])) { leaderArray[2][0] = leaderArray[1][0]; leaderArray[2][1] = leaderArray[1][1]; leaderArray[1][0] = name; leaderArray[1][1] = parseInt(tipperArray[findTipper(name)][1]); } //the user is #3 and is moving to #1 else if(leaderArray[2][0] == name && tipperArray[findTipper(name)][1] > parseInt(leaderArray[0][1])) { leaderArray[2][0] = leaderArray[1][0]; leaderArray[2][1] = leaderArray[1][1]; leaderArray[1][0] = leaderArray[0][0]; leaderArray[1][1] = leaderArray[0][1]; leaderArray[0][0] = name; leaderArray[0][1] = parseInt(tipperArray[findTipper(name)][1]); } //the user is #3 and is not moving else if(leaderArray[2][0] == name && tipperArray[findTipper(name)][1] <= parseInt(leaderArray[1][1])) { leaderArray[2][1] = tipperArray[findTipper(name)][1]; } if(leaderArray[2][0] == leaderArray[1][0] || leaderArray[2][0] == leaderArray[0][0]) { leaderArray[2][0] = ''; leaderArray[2][1] = 0; } if(leaderArray[1][0] == leaderArray[0][0]) { leaderArray[1][0] = ''; leaderArray[1][1] = 0; } } } // End HighTipper - Leaderboard switch(tipAmount) { case 2000: result = addUser(GroupDUsersArray, name); if (result instanceof Array) { GroupDUsersArray = result; msgPublic = name + ' is now ' + modelName + '\'s GroupD!!! Thank you for your tip!'; msgModel = modelName + ', don\'t forget to add ' + name + ' to GroupD in the bot config!'; } else { if (result == 'duplicate') { msgPublic = name + ' is already ' + modelName + '\'s GroupD!!! Thank you for your tip!';; } else { msgPublic = 'Failed to add user ' + name + ' to GroupD. Something went wrong!'; } } break; case 1500: result = addUser(GroupCUsersArray, name); if (result instanceof Array) { GroupCUsersArray = result; msgPublic = name + ' is now ' + modelName + '\'s GroupC!!! Thank you for your tip!'; msgModel = modelName + ', don\'t forget to add ' + name + ' to GroupC in the bot config!'; } else { if (result == 'duplicate') { msgPublic = name + ' is already ' + modelName + '\'s GroupC!!! Thank you for your tip!';; } else { msgPublic = 'Failed to add user ' + name + ' to GroupC. Something went wrong!'; } } break; case 1000: result = addUser(GroupBUsersArray, name); if (result instanceof Array) { GroupBUsersArray = result; msgPublic = name + ' is now ' + modelName + '\'s GroupB!!! Thank you for your tip!'; msgModel = modelName + ', don\'t forget to add ' + name + ' to GroupB in the bot config!'; } else { if (result == 'duplicate') { msgPublic = name + ' is already ' + modelName + '\'s GroupB!!! Thank you for your tip!';; } else { msgPublic = 'Failed to add user ' + name + ' to GroupB. Something went wrong!'; } } break; case 750: result = addUser(GroupAUsersArray, name); if (result instanceof Array) { GroupAUsersArray = result; msgPublic = name + ' is now ' + modelName + '\'s GroupA!!! Thank you for your tip!'; msgModel = modelName + ', don\'t forget to add ' + name + ' to GroupA in the bot config!'; } else { if (result == 'duplicate') { msgPublic = name + ' is already ' + modelName + '\'s GroupA!!! Thank you for your tip!';; } else { msgPublic = 'Failed to add user ' + name + ' to GroupA. Something went wrong!'; } } break; case 130: if (AllTipMenuNotice == 1) { if (StdTipMenuNotice == 1) { if (NakedTipMenuNotice == 0) { if (DuoTipMenuNotice == 0) { msgPublic = name + ' Tipped for a fully naked flash, thank you for tipping!!'; msgPrivate = 'Thank you for tipping for fully naked flash. Enjoy it and thank you so match for tipping.'; msgModel = modelName + ', lieverd ' + name + ' Wil je graag helemaal naakt zien? Trek jij je kleertjes even uit voor hem?'; }}}} break; case 120: if (AllTipMenuNotice == 1) { if (StdTipMenuNotice == 1) { if (DuoTipMenuNotice == 0) { msgPublic = name + ' Tipped for my Dildo play show, thank you for tipping!!'; msgPrivate = 'Thank you for tipping for my dildo show. Enjoy the show and thank you so match for tipping.'; msgModel = modelName + ', lieverd er is voor je dildo show getipt door ' + name + ' Heb je zin om hem een leuke show te geven?'; }}} break; case 100: if (AllTipMenuNotice == 1) { if (StdTipMenuNotice == 1) { if (DuoTipMenuNotice == 0) { msgPublic = name + ' Tipped for finger Pussy mmmm i like it!!!'; msgModel = modelName + ', lieverd er is voor Finger Pussy getipt door ' + name + ' Heb je zin om hem een leuke show te geven?. '; }}} break; case 90: if (AllTipMenuNotice == 1) { if (StdTipMenuNotice == 1) { if (DuoTipMenuNotice == 0) { msgPublic = name + ' Tipped for 5 Spanks! Thank you for tipping !!!'; msgModel = modelName + ', lieverd er is getipt voor een 5 Spanks door ' + name + ' sla jij even lekker vijf keer op je kontje.'; }}} break; /* Raffle case 66: msgPublic = name + ' Tipped for Video Raffle ticket!!! :wow you may win one of the prices!!!!'; msgModel = modelName + ', Kimberley er is getipt een Video Raffle Ticket door ' + name + ' Wil jij het noteren en of een ticket uitschrijven'; break; */ case 60: if (DuoTipMenuNotice == 1) { msgPublic = name + ' Tipped for Flash!!!! Please tell us what u like to see !!!'; msgPrivate = 'Thank you for tipping for a flash!!!! Please tell us what u like to see.'; msgModel = modelName + ', lieverd er is getipt voor een Flash door ' + name + ' even afwachten wat jullie van jullie mooie lichamen moet laten zien.'; } else if (AllTipMenuNotice == 1) { if (StdTipMenuNotice == 1) { if (DuoTipMenuNotice == 0) { msgPublic = name + ' Tipped for Oil on Boobs or Ass! Thank you for tipping !!!'; msgPrivate = 'Thank you for tipping for oil. Pls say where u want Princess Kimberley to use her Oil.'; msgModel = modelName + ', lieverd er is getipt voor olie door ' + name + ' hij laat als het goed is weten wat lekker in gesmeerd moet worden'; }}} break; case 50: if (DuoTipMenuNotice == 1) { msgPublic = name + ' Tipped for a Kiss! Thank you for tipping !!!'; msgPrivate = 'Thank you for tipping for a kiss.'; msgModel = modelName + ', lieverd er is getipt voor een Kiss door ' + name + ' dus even tong worstelen.'; } else if (AllTipMenuNotice == 1) { if (StdTipMenuNotice == 1) { if (NakedTipMenuNotice == 0) { if (DuoTipMenuNotice == 0) { msgPublic = name + ' Tipped for Flash!!!! Please tell us what u like to see'; msgModel = modelName + ', lieverd er is getipt voor Flash door ' + name + ' even afwachten wat je van je mooie lichaam moet laten zien.!!!!!'; }}}} break; case 40: if (DuoTipMenuNotice == 1) { msgPublic = name + ' Tipped for a Spanks! Thank you for tipping !!!'; msgPrivate = 'Thank you for tipping for spanks.'; msgModel = modelName + ', lieverd er is getipt voor een Spanks door ' + name + ' sla elkaar maar even lekker op jullie kontjes.'; } else if (AllTipMenuNotice == 1) { if (DuoTipMenuNotice == 0) { msgPublic = name + ' Tipped for Watch Cam!!!!'; msgModel = modelName + ', lieverd er is getipt voor Watch Cam door ' + name + ' Als je het aan tijd hebt wil je dan zijn cam openen '; }} break; case 22: if (AllTipMenuNotice == 1) { if (DuoTipMenuNotice == 0) { msgPublic = name + ' Tipped for pm. Thank you Kimberley will pm you as soon as possible!!!'; msgModel = modelName + ', lieverd ' + name + ' wil graag wat meer prive met je praten en heeft er voor getipt. Neem jij contact met hem of haar op via de pm!'; }} break; case 20: if (AllTipMenuNotice == 1) { if (StdTipMenuNotice == 1) { if (DuoTipMenuNotice == 0) { msgPublic = name + ' Tipped for a Spank! Thank you for tipping !!!'; msgPrivate = 'Thank you for tipping for a Spank.'; msgModel = modelName + ', lieverd er is getipt voor een Spank door ' + name + ' sla jij even lekker 1 keer op je kontje.'; }}} break; default: if (StdTipMenuNotice == 1) { if (tipAmount > 19) { msgPublic = 'Thank you ' + name + ' for your tip of ' + tipAmount +' tokens!'; } } 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, botNoteBg,'','bold'); msgModel = ""; } } }); /* * handle user entrance messages */ cb.onEnter(function(user) { if (!locked) { 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 isTS = (name == 'bartboer'); var isReal = (cb.room_slug == 'kimberleyfun'); var isModel = (name == cb.room_slug); var hasTokens = user['has_tokens']; var hasTipped = user['tipped_recently']; var isGrey = !(hasTipped || isMod || isModel || isFan); lenOfSpecialNames = specialNames.length; lenOfSpamPatterns = spamPatternArray.length; for(i=0; i < lenOfSpecialNames; i++) { if (specialNames[i][0] == name) { greeting = specialNames[i][1]; nameFound = true; break; } } if (nameFound && userGreets) { cb.sendNotice(greeting,'','#FFFFFF'); } else { if (userGreets) { // 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! to KimberleyFun her room. \n\n',name,botMsgBg,'','bold'); if (modelName != 'KimberleyFun_') { cb.sendNotice('This is NOT KimberleyFun\'s room!\nThis bot was created for KimberleyFun chaturbate.com/KimberleyFun\nFollower her on twitter @KimberleyFun1 and visit her room on CB!\n\n',name,botAlertBg,'','bold'); } if (!allowGreyEmotes && isGrey) { cb.sendNotice('The use of emoticons for non tipping users in not allowed in this room.\n\n',name,botAlertBg,'','bold'); } // Tip Menu notice 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'); */ // Room rules notice cb.sendNotice('To see the room rules type !roomrules or /roomrules in the chat!\n',name,botMsgBg,'','bold'); } if (userInArray(spamUsersArray, name)) { // user is in spam user list, welcome them back! msgPublic = 'Blocked user ' + name + ' is back!'; cb.sendNotice(msgPublic, '', botAlertBg,'','bold', 'red'); msgPublic =""; } else { if (userInArray(spamModelArray, name)) { // user is in spam user list, welcome them back! msgPublic = '***** Model ' + name + ' is terug. Ga AUB naar de gebruikers lijst om een extra silence te geven!!! *****'; cb.sendNotice(msgPublic, '', botAlertBg,'','bold', 'red'); cb.sendNotice(msgPublic, 'KimberleyFun', botAlertBg,'','bold'); msgPublic =""; } else { // 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 the room and auto-silenced by KimberleyFun\'s Bot!'; cb.sendNotice(msgPublic, '', botAlertBg,'','bold', 'red'); 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 isMod = message['is_mod']; var isFan = message['in_fanclub']; var isTS = (name == 'bartboer'); var isReal = (cb.room_slug == 'KimberleyFun'); var isModel = (name == cb.room_slug); var hasTokens = message['has_tokens']; var hasTipped = message['tipped_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 isInGroup = false; var lenOfSpamPatterns = 0; lenOfSpamPatterns = spamPatternArray.length; // Added for Tip History var i = 1; var number = 0; switch (msg) { case "/lock": if (isTS) { message['X-Spam'] = true; cb.sendNotice("Bot is locked. KimberleyFun\'s Bot will return when bartboer says so...",'',botNoteBg,'','bold'); locked = true; } break; case "/unlock": if (isTS) { message['X-Spam'] = true; cb.sendNotice("Bot is unlocked. KimberleyFun\'s Bot is back...",'',botNoteBg,'','bold'); locked = false; } break; } if (!locked) { if (modCommands) { tempAllowMsg = modelName + " and mods"; } // if user is in a group, add the group tag to their message // and change the background color /* if ( userInArray (specialUsersArray, name) ) { message['background'] = specialColor; groupTag = specialTag; groupColor = specialColor; isInGroup = true; } */ // handle commands // all user commands switch (msg) { case "!tipmenu": case "/tipmenu": if (AllTipMenuNotice == 1) { 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; */ case "!roomrules": case "/roomrules": message['X-Spam'] = true; divStr = makeDiv('_',50,50); msgPrivate = roomRules + '\n' + divStr; break; } // Output any notices or command results to user if (msgPrivate.length > 0) { cb.sendNotice(msgPrivate, name, botMsgBg,'','bold'); msgPrivate = ""; } // model & model commands if ( isModel || (isMod && (modCommands === true)) || isTS ) { 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 + '\nKimberleyFun\'s Bot ver ' + botVersion + '\nCreated by bartboer\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': if (AllTipMenuNotice == 1) { message['X-Spam'] = true; divStr = makeDiv('_',50,50); msgPrivate = tipMenu + '\n' + divStr; } break; case 'rules': case 'roomrules': message['X-Spam'] = true; divStr = makeDiv('_',50,50); msgPrivate = roomRules + '\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; } msgPrivate = getTippers(msgParam2); break; /* Added for Tip History */ case 'hist': message['X-Spam'] = true; if (number_tip > 0) { counter = number_tip; if (msgParam2 > 0) { var number_wanted = (msgParam2); if (number_wanted > number_tip) { number_wanted = number_tip; } number = counter - number_wanted; } cb.sendNotice("Number of tips received: " + number_tip,name, '', '', 'bold', ''); while (counter > number) { if (isModel) { cb.sendNotice((i) + ". " + tip_user[counter-1] + " tipped " + tip_history[counter-1] + " tks - " + tip_msg[counter-1] + ' - ' + Math.floor(((new Date()).getTime() - tip_time[counter-1]) / 60000) + " minute(s) ago",name,'', '', 'bold', ''); counter = counter - 1; i = i + 1; } if (!isModel) { cb.sendNotice((i) + ". " + tip_user[counter-1] + " tipped " + tip_history[counter-1] + " tks - " + Math.floor(((new Date()).getTime() - tip_time[counter-1]) / 60000) + " minute(s) ago",name,'', '', 'bold', ''); counter = counter - 1; i = i + 1; } } } else { cb.sendNotice("No tip received until now !",name, '', '', 'bold',''); } break; // Show only the High Tippers case 'histh': message['X-Spam'] = true; if (number_tip > 0) { counter = number_tip; if (msgParam2 > 0) { var number_wanted = (msgParam2); if (number_wanted > number_tip) { number_wanted = number_tip; } number = counter - number_wanted; } cb.sendNotice("Number of tips received: " + number_tip,name, '', '', 'bold', ''); while (counter > number) { if (msgParam3 > 0) { var abovetks = (msgParam3);} else var abovetks = '25' if (tip_history[counter-1] > abovetks) { if (isModel) { cb.sendNotice((i) + ". " + tip_user[counter-1] + " tipped " + tip_history[counter-1] + " tks - " + tip_msg[counter-1] + ' - ' + Math.floor(((new Date()).getTime() - tip_time[counter-1]) / 60000) + " minute(s) ago",name,'', '', 'bold', ''); counter = counter - 1; i = i + 1; } if (!isModel) { cb.sendNotice((i) + ". " + tip_user[counter-1] + " tipped " + tip_history[counter-1] + " tks - " + Math.floor(((new Date()).getTime() - tip_time[counter-1]) / 60000) + " minute(s) ago",name,'', '', 'bold', ''); counter = counter - 1; i = i + 1; } } else { counter = counter - 1; i = i + 1; }; } } else { cb.sendNotice("No tip received until now !",name, '', '', 'bold',''); } break; // End // Standard TipMenu On - Off case 'std': case 'stdtipmenu': message['X-Spam'] = true; StdTipMenuToggle(msgParam2,msg['user']) break; case 'all': case 'alltipmenu': message['X-Spam'] = true; AllTipMenuToggle(msgParam2,msg['user']) break; case 'naked': case 'nakedtipmenu': message['X-Spam'] = true; NakedTipMenuToggle(msgParam2,msg['user']) break; case 'duo': case 'duotipmenu': message['X-Spam'] = true; DuoTipMenuToggle(msgParam2,msg['user']) break; // KingTipper - Leaderboard case 'lb': case 'leaderboard': message['X-Spam'] = true; showLeaderBoard(msg['user']); break; case 'kingspam': message['X-Spam'] = true; kingSpamToggle(msgParam2,msg['user']) break; case 'lbspam': case 'leaderboardspam': message['X-Spam'] = true; leaderboardSpamToggle(msgParam2,msg['user']) break; // End KingTipper - Leaderboard case 'notice': case 'note': case 'modnote': case 'modnotice': case 'casnote': case 'casnotice': case 'casmod': case 'cm': 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 = '*** ' + cmdval + ' ***'; break; case 'casnote': case 'casnotice': 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 'casmod': case 'cm': msgMod = '*** Moderator notice from ' + name + ': ' + cmdval + ' ***'; msgModel = '*** Moderator notice from ' + name + ': ' + cmdval + ' ***'; msgPrivate = 'Your message was sent to the mods and ' + modelName + '...'; 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 (isTS || isModel || isMod) { 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': message['X-Spam'] = true; releaseTimeouts(); break; case 'paint': if (isTS || isModel || isMod) { 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 "spam": userArray = spamPatternArray; break; case "spamuser": userArray = spamUsersArray; break; case "spammodel": userArray = spamModelArray; break; default: showOutput = false; msgPrivate = "You must provide a group name to list: Kimberley's soldiers sergeants captains generals"; 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 (isTS || isModel || isMod) { 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; msgMod = 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'; msgMod = 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 + ' to the list 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 "n": case "nomod": result = addUser(timeoutUsersArray, msgParam3); if (result instanceof Array) { timeoutUsersArray = result; msgPrivate2 = name + ' put you in timeout for moderating!!! U will not be able to type until released!'; msgMod = name + ' put ' + msgParam3 + ' in timeout for moderating!!! 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'; msgMod = name + ' put ' + msgParam3 + ' in timeout for ' + msgParam4 + ' ' + minutes + ' for moderating!!! 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 Non Moderators!'; } else { msgPrivate = 'Failed to add user ' + msgParam3 + ' to timeout. 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; msgMod = name + ' added ' + msgParam3 + ' to the Spammer or blocked user 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; case "spammodel": result = addUser(spamModelArray, msgParam3); if (result instanceof Array) { spamModelArray = result; msgPrivate = name + ' added ' + msgParam3 + ' to the ban user list!'; } else { if (result == 'duplicate') { msgPrivate = 'Failed to add ' + msgParam3 + ' to the block model list. Already in the list.'; } else { msgPrivate = 'Failed to add ' + msgParam3 + ' to block model list. Something went wrong!'; } } break; case "spamuser": result = addUser(spamUsersArray, msgParam3); if (result instanceof Array) { spamusersArray = result; msgPrivate = name + ' added ' + msgParam3 + ' to the ban user list!'; } else { if (result == 'duplicate') { msgPrivate = 'Failed to add ' + msgParam3 + ' to the block model list. Already in the list.'; } else { msgPrivate = 'Failed to add ' + msgParam3 + ' to block model 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 += 'Kimberley\'s soldier sergeant captain general ... 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 army someusername\n'; msgPrivate += 'or ' + botTrigger + ' adduser general someuser'; } } else { msgPrivate = 'Only broadcaster, 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 (isTS || isModel || isMod) { 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 "n": case "nomod": result = delUser(timeoutUsersArray, msgParam3); if (result instanceof Array) { timeoutUsersArray = result; msgPrivate2 = name + ' released U from timeout!!'; msgMod = 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 "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 "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; msgMod = 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; case "spammodel": result = delUser(spamModelArray, msgParam3); if (result instanceof Array) { spamModelArray = result; msgMod = 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 += 'Kimberley\'s soldier sergeant captain general ... 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 special someusername\n'; msgPrivate += 'or ' + botTrigger + ' deluser special 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 'modcommands': case 'mods': if(isModel || isTS) { 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(isTS) { 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 (isTS || isModel || isMod) { 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 || isTS) { 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 = ""; } if (msgPrivate2.length > 0) { cb.sendNotice(msgPrivate2, msgParam3, botMsgBg,'','bold'); msgPrivate2 = ""; } // 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,'', botMsgBg2,'','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 && !isTS && !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]"); } } var inTimeout = userInArray(timeoutUsersArray, name); if (!isInGroup && !isTS && !isModel && isGrey && !inTimeout) { // check for specific known advertisements or models if (isWordInString("mium cheat",msg) || isWordInString("P r e m i u m C h e a t",msg) || isWordInString("tokens generator",msg) || isWordInString("token generator",msg) || isWordInString("I m a model",msg) || isWordInString("i m new on Chaturbate",msg) || isWordInString("i m newbie",msg) || isWordInString("i m new on chrb",msg) || isWordInString("i just signed",msg) || isWordInString("I m on cam",msg) || isWordInString("I m on line",msg) || isWordInString("i m new on chrb",msg) || isWordInString("new here",msg) || isWordInString("kikcams",msg) || isWordInString("look at my profile",msg) || isWordInString("myfreecambook",msg) || isWordInString("streamingnaked",msg) || isWordInString("swipegirls",msg) || isWordInString("swipegirls. Com",msg) || isWordInString("watch my cam",msg) || isWordInString("See my profile",msg) || isWordInString("pornmeds",msg) || isWordInString("pornmeds.",msg) || isWordInString("yespills",msg) || isWordInString("premiumcheat",msg)) { if (unmaskTimeout) { cb.sendNotice('*Time Out ' + name + ' said ' + msg,'',botAlertBg,'','bold','red'); } message['X-Spam'] = true; msg = '[blocked advertisement]'; result = addUser(timeoutUsersArray, name); /* msgMod = 'KimberleyFun Bot put ' + name + 'in timeout for Spamming!!!'; cb.sendNotice(msgMod, '', botMsgBg,'','bold')*/ msgPublic = ""; } else { if (isWordInString("kikfuck. com",msg) || isWordInString("Tokens Generator",msg) || isWordInString("free tokens",msg) || isWordInString("Free Tokens",msg) || isWordInString("See my bio",msg) || isWordInString("leak",msg) || isWordInString("leaked",msg) || isWordInString("See my bio!!",msg) || isWordInString("Link in my bio!",msg) || isWordInString("19 Petite lady",msg) || isWordInString("go to kikfuck",msg) || isWordInString("s k y p e me",msg) || isWordInString("i took some pix today",msg) || isWordInString("follow me on",msg) || isWordInString("Tokens Giveaway!! Check my bio while supplies last!!",msg) || isWordInString("Check my bio before",msg) || isWordInString("Tokens 4 Free!! Hurry while supplies last!!",msg) || isWordInString("Token Giveaway in my bio!! Hurry go fast",msg) || isWordInString("Tokens 4 All !! Go to my bio",msg) || isWordInString("Tokens Adder check my bio",msg) || isWordInString("Check my bio",msg) || isWordInString("500k Tokens",msg) || isWordInString("Hurry while supplies",msg) || isWordInString("Tokens Giveaway!! Check my bio while supplies last!!",msg) || isWordInString("erotimo",msg)) { if (unmaskTimeout) { cb.sendNotice('*Time Out ' + name + ' said ' + msg,'',botAlertBg,'','bold', 'red'); } message['X-Spam'] = true; msg = '[blocked advertisement]'; result = addUser(timeoutUsersArray, name); /* msgMod = 'KimberleyFun bot put ' + name + 'in timeout for Spamming!!!'; cb.sendNotice(msgMod, '', botMsgBg,'','bold'); */ msgPublic = ""; } else { if (isWordInString("freelive",msg) || isWordInString("freewebcam",msg) || isWordInString("net.au",msg) || isWordInString("xtoy24",msg) || isWordInString("EllaGoCam",msg) || isWordInString("webcam23",msg) || isWordInString("ellago Cam",msg) || isWordInString("EllaGo Cam (dot) com",msg) || isWordInString("erotimoamecam",msg) || isWordInString("www.sex-chats.ru",msg) || isWordInString("yespills,com",msg) || isWordInString("pornmeds. com",msg) || isWordInString("pornmeds.COM",msg) || isWordInString("getdrugsfast,com",msg) || isWordInString("pornmeds.COM",msg) || isWordInString("getdrugsfast,com",msg) || isWordInString("getdrugsfast. com",msg) || isWordInString("getdrugsfast",msg) || isWordInString("livecams",msg)) { if (unmaskTimeout) { cb.sendNotice('*Time Out ' + name + ' said ' + msg,'',botAlertBg,'','bold', 'red'); } message['X-Spam'] = true; msg = '[blocked advertisement]'; result = addUser(timeoutUsersArray, name); /* msgMod = 'KimberleyFun bot put ' + name + ' in timeout for advertising web sites!!! They will not be able to type until released!'; cb.sendNotice(msgMod, '', botMsgBg,'','bold'); */ msgPublic = ""; } } } // check for message that contain ".com " "dot com" " com " "skype" if (isWordInString(".com ",msg) || isWordInString("dot net",msg) || isWordInString(".net",msg) || isWordInString("skype",msg) || isWordInString(" skp ",msg) || isWordInString("sk1pe",msg) || isWordInString(" com ",msg) ) { if (unmaskTimeout) { cb.sendNotice('*Time Out ' + name + ' said ' + msg,'',botAlertBg,'','bold', 'red'); } message['X-Spam'] = true; msg = '[blocked website/skype]'; result = addUser(timeoutUsersArray, name); /* msgMod = 'KimberleyFun bot put ' + name + ' in timeout for posting a web address! Don\'t put web sites in chat!'; cb.sendNotice(msgMod, '', botMsgBg,'','bold'); */ msgPublic = ""; } else { // check for demands or begging if (isWordInString("show tits",msg) || isWordInString("anal bb",msg) || isWordInString("anal please",msg) || isWordInString("anal pls",msg) || isWordInString("anal plz",msg) || isWordInString("anal zoom",msg) || isWordInString("ass first pls",msg) || isWordInString("ass show",msg) || isWordInString("ass tease",msg) || isWordInString("bb please",msg) || isWordInString("bend over",msg) || isWordInString("blow her",msg) || isWordInString("blow him",msg) || isWordInString("borst zien",msg) || isWordInString("borsten zien",msg) || isWordInString("boobs pls",msg) || isWordInString("cam closer",msg) || isWordInString("cam zoom",msg) || isWordInString("close cam",msg) || isWordInString("close up",msg) || isWordInString("closeup?",msg) || isWordInString("come closer",msg) || isWordInString("come on",msg) || isWordInString("come ride me",msg) || isWordInString("cum bb",msg) || isWordInString("cum hard",msg) || isWordInString("deeper",msg) || isWordInString("doggy please",msg) || isWordInString("doggy pls",msg) || isWordInString("doggy stellung",msg) || isWordInString("doggy sweety",msg) || isWordInString("double anal pls",msg) || isWordInString("faster",msg) || isWordInString("feet please",msg) || isWordInString("feet plz",msg) || isWordInString("feet show",msg) || isWordInString("feet bb",msg) || isWordInString("finger your pussy",msg) || isWordInString("Finger your selfs",msg) || isWordInString("finger ass",msg) || isWordInString("fist das ass",msg) || isWordInString("fist urself",msg) || isWordInString("footjob?",msg) || isWordInString("Fuck ass",msg) || isWordInString("Fuck hard",msg) || isWordInString("fuck her ass",msg) || isWordInString("fuck pussy",msg) || isWordInString("fuck ur",msg) || isWordInString("fuck your",msg) || isWordInString("fur legs bb",msg) || isWordInString("gape ass",msg) || isWordInString("give me a kiss",msg) || isWordInString("Go naked",msg) || isWordInString("Go squat please",msg) || isWordInString("I wanna see",msg) || isWordInString("in ass",msg) || isWordInString("in je hol",msg) || isWordInString("in pussy",msg) || isWordInString("in ur pussy",msg) || isWordInString("in your ass",msg) || isWordInString("kiss her",msg) || isWordInString("kiss me",msg) || isWordInString("kiss your",msg) || isWordInString("lesbian kissing",msg) || isWordInString("lezbian show",msg) || isWordInString("Louder",msg) || isWordInString("lower the cam",msg) || isWordInString("make her cum",msg) || isWordInString("make ssissor",msg) || isWordInString("more feet",msg) || isWordInString("more please",msg) || isWordInString("more pls",msg) || isWordInString("my name please",msg) || isWordInString("on his cock",msg) || isWordInString("open ass",msg) || isWordInString("open bobs",msg) || isWordInString("open bust",msg) || isWordInString("open it",msg) || isWordInString("open moreee",msg) || isWordInString("open pusy",msg) || isWordInString("open pussy",msg) || isWordInString("open tits",msg) || isWordInString("open ur",msg) || isWordInString("open you ",msg) || isWordInString("open your ",msg) || isWordInString("play harder",msg) || isWordInString("play with your",msg) || isWordInString("please say",msg) || isWordInString("pls show",msg) || isWordInString("Plz see tits",msg) || isWordInString("poesje zien",msg) || isWordInString("push it out",msg) || isWordInString("pussy baby",msg) || isWordInString("pussy open",msg) || isWordInString("pussy please",msg) || isWordInString("pussy pls",msg) || isWordInString("pussyshow",msg) || isWordInString("put in ass",msg) || isWordInString("ride me",msg) || isWordInString("say hello",msg) || isWordInString("say my name",msg) || isWordInString("see your",msg) || isWordInString("shoot for me",msg) || isWordInString("show a$$",msg) || isWordInString("show ass",msg) || isWordInString("show asses",msg) || isWordInString("show boobs",msg) || isWordInString("show doggy",msg) || isWordInString("show feet",msg) || isWordInString("show hot",msg) || isWordInString("show me",msg) || isWordInString("show more",msg) || isWordInString("show plz",msg) || isWordInString("show pussy",msg) || isWordInString("show Sisi",msg) || isWordInString("show some moves",msg) || isWordInString("show the toes",msg) || isWordInString("Show those asses",msg) || isWordInString("show u",msg) || isWordInString("show ur",msg) || isWordInString("show you",msg) || isWordInString("show your",msg) || isWordInString("smoke please",msg) || isWordInString("smoke pls",msg) || isWordInString("smoke plz",msg) || isWordInString("spank ass",msg) || isWordInString("spank it",msg) || isWordInString("spread ass",msg) || isWordInString("Spread pussy",msg) || isWordInString("spread you ass",msg) || isWordInString("Spread your",msg) || isWordInString("squats pls",msg) || isWordInString("squirt babe",msg) || isWordInString("Squirt it in her face",msg) || isWordInString("Squirt please",msg) || isWordInString("streamingnaked",msg) || isWordInString("suck cock",msg) || isWordInString("suck feet",msg) || isWordInString("suck himm",msg) || isWordInString("suckcock",msg) || isWordInString("take bady off",msg) || isWordInString("take of",msg) || isWordInString("take off",msg) || isWordInString("take it off",msg) || isWordInString("tip please",msg) || isWordInString("tips please",msg) || isWordInString("titts please",msg) || isWordInString("Touch your tits",msg) || isWordInString("twerk for us",msg) || isWordInString("twerk please",msg) || isWordInString("twerk pls",msg) || isWordInString("Twerk that ass",msg) || isWordInString("want see",msg) || isWordInString("your feet",msg) || isWordInString("zoom cam",msg) || isWordInString("zoom in",msg) || isWordInString("zoom please",msg) || isWordInString("open boobs",msg)) { if (unmaskTimeout) { cb.sendNotice('*Time Out ' + name + ' said ' + msg,'',botAlertBg,'','bold', 'red'); } message['X-Spam'] = true; msg = '[blocked message]'; result = addUser(timeoutUsersArray, name); result2 = addReleaseTime(timeoutReleaseArray, name, 1); msgMod = 'KimberleyFun Auto Moderator Bot put ' + name + ' in timeout for 1 minute for demanding or begging! Please don\'t ask Kimberley to do things for free! '; cb.sendNotice(msgMod, '', botMsgBg,'','bold'); msgPublic = ""; } else { // check for PM requests if (isWordInString("pm me",msg) || isWordInString("open pm",msg) || isWordInString("to pm",msg) || isWordInString("send pm",msg)) { if (unmaskTimeout) { cb.sendNotice('*Time Out ' + name + ' said ' + msg,'',botAlertBg,'','bold', 'red'); } message['X-Spam'] = true; msg = '[blocked message]'; result = addUser(timeoutUsersArray, name); result2 = addReleaseTime(timeoutReleaseArray, name, 0); msgMod = 'KimberleyFun Auto Moderator Bot Auto Message ' + name + ' Asking for a pm if you can not tip is against the room rules! your message will not show up'; cb.sendNotice(msgMod, '', botMsgBg,'','bold'); msgPublic = ""; } else { // check for view cam requests if (isWordInString("view my cam",msg) || isWordInString("come to my cam",msg) || isWordInString("see my cam",msg) || isWordInString("open my cam",msg) || isWordInString("look my cam",msg) || isWordInString("watch me c",msg) || isWordInString("my cam",msg) || isWordInString("wanna see me",msg) || isWordInString("Want to c me cum",msg) || isWordInString("Want to c me cum",msg) || isWordInString("my cam",msg) || isWordInString("my cam",msg) || isWordInString("see me cum",msg) || isWordInString("open cam",msg)) { if (unmaskTimeout) { cb.sendNotice('*Time Out ' + name + ' said ' + msg,'',botAlertBg,'','bold', 'red'); } message['X-Spam'] = true; msg = '[blocked message]'; result = addUser(timeoutUsersArray, name); result2 = addReleaseTime(timeoutReleaseArray, name, 1); msgMod = 'KimberleyFun Auto Moderator silenced for 1 minute user ' + name + ' For asking to see your cam or promoting yourself for users without tokens is not allowed.'; cb.sendNotice(msgMod, '', botMsgBg,'','bold'); msgPublic = ""; } else { // check for specific known advertisements or models if (isWordInString("b i t c h",msg) || isWordInString("bitch",msg) || isWordInString("Conchita",msg) || isWordInString("cono",msg) || isWordInString("daddy girl",msg) || isWordInString("fokken h0ere",msg) || isWordInString("hoer",msg) || isWordInString("hoeren",msg) || isWordInString("hoertje",msg) || isWordInString("slet",msg) || isWordInString("sletje",msg) || isWordInString("koocker",msg) || isWordInString("mother fucker",msg) || isWordInString("shithole",msg) || isWordInString("slut",msg) || isWordInString("slutty girl",msg) || isWordInString("ugly bitch",msg) || isWordInString("whore",msg) || isWordInString("hooker",msg) || isWordInString("sluts",msg) || isWordInString("bordeel",msg) || isWordInString("bordell",msg) || isWordInString("redlight district",msg) || isWordInString("escort",msg) || isWordInString("biggasshole",msg) || isWordInString("biches",msg) || isWordInString("slut",msg) || isWordInString("Stoeipoes",msg) || isWordInString("nazi",msg) || isWordInString("h0er",msg)) { if (unmaskTimeout) { cb.sendNotice('*Time Out ' + name + ' said ' + msg,'',botAlertBg,'','bold', 'red'); } message['X-Spam'] = true; msg = '[blocked message]'; result = addUser(timeoutUsersArray, name); msgMod = 'KimberleyFun Bot automatic Silence ' + name + ' for Rudnes!!! '; cb.sendNotice(msgMod, '', botMsgBg,'','bold'); msgPublic = ""; } } } } } } } else { if (inTimeout) { message['X-Spam'] = true; msg = '[blocked message]'; msgPublic = ""; } } // apply group tags Tag list if (name == 'friendly45n') { msg = '[Monkey]' + ' ' + msg; } else if (name == 'mboemel') { msg = '[Queen]' + ' ' + msg; } else { if (userColors[name]) { if (userColors[name].tag) { msg = '[ ' + userColors[name].tag + ' ] ' + msg; } } else { if (groupTag) { msg = groupTag + ' ' + msg; } } } // special user icons /* if (isTS) { msg = '[TS]' + ' ' + msg; message['background'] = tsBackground; message['c'] = tsColor; } */ if (isMod) { message['background'] = tsBackground; message['c'] = tsColor; } if (isModel) { message['background'] = tsBackground; message['c'] = tsColor; } // show notice if user is in timeout if ( userInArray(timeoutUsersArray, name) ) { message['X-Spam'] = true; msg = ""; cb.sendNotice("You are in a silence or temp silence your Message is Blocked! [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 ( userInArray(spamModelArray, name) ) { // user is in spammer list message['X-Spam'] = true; msg = ""; } else { // 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); msgMod = 'Spammer ' + name + ' has been spotted and is silenced by KimberleyFun bot!'; cb.sendNotice(msgPublic, '', botMsgBg,'','bold'); msgPublic = ""; message['X-Spam'] = true; msg = ""; break; } } } } } } // 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; } } //tip titles, if turned on, as well as king's crown if(cb.settings.tipTitles == 'Yes'){ if(parseInt(tipperArray[findTipper(name)][1]) > 0 ) { // if(cb.settings.kingTipper == 'Yes'){ if (name == currentKing) {msg = ':smallCrown |' + tipperArray[findTipper(name)][1] + '| ' + msg;} if (name != currentKing) {msg = '|' + tipperArray[findTipper(name)][1] + '| ' + msg;} } else {msg;} } if(cb.settings.tipTitles == 'No') { 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 = getRelaseArrayElement(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 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); msgMod += "User " + username + " has been released from timeout!\n"; delReleaseTime(timeoutReleaseArray, username); } } // 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 displayNotification3() { cb.sendNotice(autoNotice3Text,'',botNoteBg,'','bold'); cb.setTimeout(displayNotification3, cb.settings.autoNotice3Interval * 60000); } function displayNotification4() { if(DuoTipMenuNotice == 1) { cb.sendNotice(autoNotice4gText,'',botTipaBg,'','bold'); } else if(AllTipMenuNotice == 1) { if(StdTipMenuNotice == 1) { if (NakedTipMenuNotice == 1) { cb.sendNotice(autoNotice4bText,'',botTipaBg,'','bold'); cb.sendNotice(autoNotice4cText,'',botTipaBg,'','bold'); cb.sendNotice(autoNotice4dText,'',botTipaBg,'','bold'); } else { cb.sendNotice(autoNotice4aText,'',botTipaBg,'','bold'); cb.sendNotice(autoNotice4bText,'',botTipaBg,'','bold'); cb.sendNotice(autoNotice4cText,'',botTipaBg,'','bold'); cb.sendNotice(autoNotice4dText,'',botTipaBg,'','bold'); } } else { cb.sendNotice(autoNotice4eText,'',botSpecialBg,'','bold'); } } else { cb.sendNotice(autoNotice4fText,'',botSpecialBg,'','bold'); } cb.setTimeout(displayNotification4, cb.settings.autoNotice4Interval * 60000); } function displayNotification5() { cb.sendNotice(autoNotice5Text,'',botNoteBg,'','bold'); cb.setTimeout(displayNotification5, cb.settings.autoNotice5Interval * 60000); } function displayNotification6() { cb.sendNotice(autoNotice6Text,'',botNoteBg,'','bold'); cb.setTimeout(displayNotification6, cb.settings.autoNotice6Interval * 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; } /* * 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; } /* * 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(specialUsersArray, username) ) { result = delUser(specialUsersArray, username); if (result instanceof Array) { specialUsersArray = result; } } */ } /* retun group bg color */ function getGroupBgColor(username) { var bgc = "#ffffff"; // if ( userInArray (specialUsersArray, username) ) { bgc = specialColor; } 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 getRelaseArrayElement(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(specialUsersArray, username)) groupList += "special "; 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 += 'KimberleyFun, you are not her! Please consider having your own bot created.'; output += 'Contact bartboer on here or twitter @BBoer77\n\n'; return output; } function newStuff() { var output = '\nHoi Lieverd ' + modelName + ' We hebben je weer gemist! We zijn blij dat je er weer bent!!! \n'; output += 'Hier zijn de nieuwste aanpassingen in versie '+ botVersion +' van je bot!\n'; output += 'Je kunt nu via /pc casmod [bericht] naar de moderators sturen en via /pc hist # kun je de laatste X tips op halen.\n'; output += 'wil je alleen de hoge tippers (standaard boven 25 tks) kun je dit doen via /pc histh.\n'; output += 'er zijn verschillende tipmenu\'s uit/aan te zetten \n'; output += 'met /pc std off kun je het standaard tip menu uitzetten voor tijdens de Nora\n'; output += 'met /pc all off kun je alle tip menu uitzetten\n'; output += 'met /pc naked on kun je de flash tipmenu uitzetten\n'; return output; } function modWelcome() { var output = '\nGreetings Moderator...'; output += 'KimberleyFun\'s Bot version ' + botVersion + ' is running! Below are the latest changes and features that you as a moderator may use...\n'; output += 'Geachte Moderators, Wanneer iemand moet toegevoegd worden aan KimberleyFun\'s Bot willen jullie dit dan door geven aan bartboer. Alvast bedankt.\n'; output += 'Je kunt nu via /pc casmod [bericht] naar de moderators sturen en via /pc hist # kun je de laatste X tips op halen.\n'; output += 'wil je alleen de hoge tippers (standaard boven 25 tks) kun je dit doen via /pc histh.\n'; output += 'er zijn verschillende tipmenu\'s uit/aan te zetten \n'; output += 'met /pc std off kun je het standaard tip menu uitzetten voor tijdens de Nora\n'; output += 'met /pc all off kun je alle tip menu uitzetten\n'; output += 'met /pc naked on kun je de flash tipmenu uitzetten\n';; return output; } // All Tip Menu On-Off function AllTipMenuToggle(option,mod) { if(option == 'on') { if(AllTipMenuNotice == 1) { cb.sendNotice('All Tip Menu are already turned on.',mod,colorlb); } else { AllTipMenuNotice = 1; cb.sendNotice('All Tip Menu are turned on.',mod,colorlb); } } else if(option == 'off') { if(AllTipMenuNotice == 0) { cb.sendNotice('All Tip Menu are already turned off.',mod,colorlb); } else { AllTipMenuNotice = 0; cb.sendNotice('All Tip Menu is turned off .',mod,colorlb); } } else if(option != null) { cb.sendNotice(option + ' is not a valid option for alltipmenu. Options are ON and OFF.',mod,colorlb); } else if(option == null) { cb.sendNotice('You did not enter a valid option for alltipmenu . Options are ON and OFF.',mod,colorlb); } } // Standard Tip Menu On-Off function StdTipMenuToggle(option,mod) { if(option == 'on') { if(StdTipMenuNotice == 1) { cb.sendNotice('The Standard Tip Menu is already turned on.',mod,colorlb); } else { StdTipMenuNotice = 1; cb.sendNotice('The Standard Tip Menu is turned on.',mod,colorlb); } } else if(option == 'off') { if(StdTipMenuNotice == 0) { cb.sendNotice('The Standard Tip Menu spam is already turned off.',mod,colorlb); } else { StdTipMenuNotice = 0; cb.sendNotice('The Standard Tip Menu is turned off .',mod,colorlb); } } else if(option != null) { cb.sendNotice(option + ' is not a valid option for stdtipmenu. Options are ON and OFF.',mod,colorlb); } else if(option == null) { cb.sendNotice('You did not enter a valid option for stdtipmenu . Options are ON and OFF.',mod,colorlb); } } // Naked Tip Menu On-Off function NakedTipMenuToggle(option,mod) { if(option == 'on') { if(NakedTipMenuNotice == 1) { cb.sendNotice('The Naked Tip Menu is already turned on.',mod,colorlb); } else { NakedTipMenuNotice = 1; cb.sendNotice('The Naked Tip Menu is turned on.',mod,colorlb); } } else if(option == 'off') { if(NakedTipMenuNotice == 0) { cb.sendNotice('The Naked Tip Menu is already turned off.',mod,colorlb); } else { NakedTipMenuNotice = 0; cb.sendNotice('The Naked Tip Menu is turned off .',mod,colorlb); } } else if(option != null) { cb.sendNotice(option + ' is not a valid option for nakedtipmenu. Options are ON and OFF.',mod,colorlb); } else if(option == null) { cb.sendNotice('You did not enter a valid option for nakedtipmenu . Options are ON and OFF.',mod,colorlb); } } // Duo Tip Menu On-Off function DuoTipMenuToggle(option,mod) { if(option == 'on') { if(DuoTipMenuNotice == 1) { cb.sendNotice('The Duo Tip Menu is already turned on.',mod,colorlb); } else { DuoTipMenuNotice = 1; cb.sendNotice('The Duo Tip Menu is turned on.',mod,colorlb); } } else if(option == 'off') { if(DuoTipMenuNotice == 0) { cb.sendNotice('The Duo Tip Menu is already turned off.',mod,colorlb); } else { DuoTipMenuNotice = 0; cb.sendNotice('The Duo Tip Menu is turned off .',mod,colorlb); } } else if(option != null) { cb.sendNotice(option + ' is not a valid option for duotipmenu. Options are ON and OFF.',mod,colorlb); } else if(option == null) { cb.sendNotice('You did not enter a valid option for duotipmenu . Options are ON and OFF.',mod,colorlb); } } // King Tipper - Leaderboard function tipperArrayPopulate(user) { tipperArray[numTippers] = new Array; tipperArray[numTippers][0] = user; tipperArray[numTippers][1] = 0; numTippers++; } function findTipper(user) { //find the index of the user for(var i = 0; i < tipperArray.length; i++) { if(tipperArray[i][0] == user) { break; } } //the user is not in the array. add him and call findTipper if(i == tipperArray.length) { tipperArrayPopulate(user); findTipper(user); } return i; } function kingSpam() { cb.setTimeout(kingSpamTimer,cb.settings.kingTimer*60000);} function kingSpamTimer() { if(kingTip < parseInt(cb.settings.kingMin)) { var supplant = cb.settings.kingMin;} else {var supplant = kingTip + 1;} if(kingTipperSpam == 1){ cb.sendNotice('Tip ' + supplant + ' to become the new King!','',colorking); kingSpam(); } } function leaderSpam() { cb.setTimeout(leaderSpamTimer,cb.settings.leaderTimer*60000); } function leaderSpamTimer() { if(leaderboardSpam == 1) { cb.sendNotice('Leaderboard!','',colorlb); cb.sendNotice ( leaderArray[0][0] + ' : ' + leaderArray[0][1] + '\n' + leaderArray[1][0] + ' : ' + leaderArray[1][1] + '\n' + leaderArray[2][0] + ' : ' + leaderArray[2][1] ); cb.sendNotice ( '' ,'',colorlb); leaderSpam(); } } function showLeaderBoard(from) { if(cb.settings.leaderBoard == 'Yes') { cb.sendNotice ( 'Leaderboard!' ,from,colorlb ); cb.sendNotice ( leaderArray[0][0] + ' : ' + leaderArray[0][1] + '\n' + leaderArray[1][0] + ' : ' + leaderArray[1][1] + '\n' + leaderArray[2][0] + ' : ' + leaderArray[2][1] ,from); cb.sendNotice ( '' ,from,colorlb); } else { cb.sendNotice('The room host has decided not to use the Leaderboard feature.',from,colorlb); } } function kingSpamToggle(option, mod) { if(option == 'on') { if(kingTipperSpam == 1) { cb.sendNotice('The King Tipper spam is already turned on.',mod,colorking); } else { kingTipperSpam = 1; cb.sendNotice('You have turned on King Tipper spam.',mod,colorking); } } else if(option == 'off') { if(kingTipperSpam == 0) { cb.sendNotice('The King Tipper spam is already turned off.',mod,colorking); } else { kingTipperSpam = 0; cb.sendNotice('You have turned off the King Tipper spam.',mod,colorking); } } else if(option != null) { cb.sendNotice(option + ' is not a valid option for kingspam. Options are ON and OFF.',mod,colorking); } else if(option == null) { cb.sendNotice('You did not enter a valid option for kingspam. Options are ON and OFF.',mod,colorking); } } function leaderboardSpamToggle(option, mod) { if(option == 'on') { if(leaderboardSpam == 1) { cb.sendNotice('The Leaderboard spam is already turned on.',mod,colorlb); } else { leaderboardSpam = 1; cb.sendNotice('You have turned on the Leaderboard spam.',mod,colorlb); } } else if(option == 'off') { if(leaderboardSpam == 0) { cb.sendNotice('The Leaderboard spam is already turned off.',mod,colorlb); } else { leaderboardSpam = 0; cb.sendNotice('You have turned off the Leaderboard spam.',mod,colorlb); } } else if(option != null) { cb.sendNotice(option + ' is not a valid option for leaderboardspam. Options are ON and OFF.',mod,colorlb); } else if(option == null) { cb.sendNotice('You did not enter a valid option for leaderboardspam. Options are ON and OFF.',mod,colorlb); } } /* * 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; } /* // gender emotes if (cb.settings.genderEmotes == 'Yes') { genderEmotes = true; } else { genderEmotes = false; } */ // load special into array and other variables /* if (specialList) { tempStr = specialList.toLowerCase(); //make names all lowercase specialList = tempStr.trim(); // remove extra spaces specialUsersArray = specialList.split(' '); } */ if (cb.settings.specialTag) { specialTag = cb.settings.specialTag.trim(); } if (cb.settings.specialColor) { tempArray = cb.settings.specialColor.split(' '); specialColor = '#' + tempArray[1]; } // load spam pattern list into array if (spamPatternList) { tempStr = spamPatternList.toLowerCase(); //make patterns all lowercase spamPatternList = tempStr.trim(); // remove extra spaces spamPatternArray = spamPatternList.split(' '); } // load Users list into array if (spamUserList) { tempStr = spamUserList.toLowerCase(); //make patterns all lowercase spamUserList = tempStr.trim(); // remove extra spaces spamUsersArray = spamUserList.split(' '); } // load Spam Model list into array if (spamModelList) { tempStr = spamModelList.toLowerCase(); //make patterns all lowercase spamModelList = tempStr.trim(); // remove extra spaces spamModelArray = spamModelList.split(' '); } // load notifications if (cb.settings.autoNotice1) { autoNotice1Text = cb.settings.autoNotice1.trim(); } if (cb.settings.autoNotice2) { autoNotice2Text = cb.settings.autoNotice2.trim(); } if (cb.settings.autoNotice3) { autoNotice3Text = cb.settings.autoNotice3.trim(); } /* if (cb.settings.autoNotice4a) { autoNotice4aText = cb.settings.autoNotice4a.trim(); autoNotice4bText = cb.settings.autoNotice4b.trim(); autoNotice4cText = cb.settings.autoNotice4c.trim(); autoNotice4dText = cb.settings.autoNotice4d.trim(); } */ if (cb.settings.autoNotice5) { autoNotice5Text = cb.settings.autoNotice5.trim(); } if (cb.settings.autoNotice6) { autoNotice6Text = cb.settings.autoNotice6.trim(); } } function announceBot() { var divStr=""; var statusMsg = ""; divStr = makeDiv('*', 45, 45); statusMsg = divStr + '\nKimberleyFun\'s Bot ver ' + botVersion + ' last updated ' + botDate + '\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 += '\nType /tipmenu for the Tip Menu\n'; // statusMsg += '\nType /raffle for the Raffle Video Menu\n'; statusMsg += '\nType /roomrules to see my room rules. Please do so!!!!\n'; statusMsg += divStr; statusMsg += '\nDo not ask to be a moderator or you will be silenced\n'; statusMsg += '\nDo not moderate the room if you are not a moderator\n'; statusMsg += 'If you do, you will be silenced for x time\n'; // statusMsg += '\nType /raffle for the Raffle Video Menu\n'; // statusMsg += '\nType /roomrules to see my room rules. Please do so!!!!\n'; statusMsg += divStr; return statusMsg; } function bdaynotice(name) { if (name == 'all') { name = ''; } if (daystobday === 0) { cb.sendNotice('Wish Kimberley A Happy Birthday!',name, botAlertBg,'','bold'); } else { if (daystobday > 0) { cb.sendNotice('Only ' + daystobday + ' day' + (daystobday > 1 ? 's' : '') + ' until Kimberley\'s birthday!',name,botAlertBg,'','bold'); } } } if (daystounlock == 1) { cb.sendNotice("Bot is locked. Kimberley\'s bot will return when bartboer is no longer silenced...bahahahhahahaha",'',botNoteBg,'','bold'); locked = true; } if (!locked) { loadSettings(); cb.sendNotice(announceBot(),'', botMsgBg,'','bold'); // Birthday notice if (daystobday < 50) { bdaynotice("all"); if (daystobday === 0) { cb.setTimeout(displayBdayNotification, 6 * 60000); } } if (modelName !='KimberleyFun') cb.sendNotice(notModel(),modelName,botAlertBg,'','bold'); if (modelName == 'KimberleyFun') 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); if (autoNotice3Text) cb.setTimeout(displayNotification3, cb.settings.autoNotice3Interval * 60000); if (autoNotice4aText) cb.setTimeout(displayNotification4, cb.settings.autoNotice4Interval * 60000); if (autoNotice5Text) cb.setTimeout(displayNotification5, cb.settings.autoNotice5Interval * 60000); if (autoNotice6Text) cb.setTimeout(displayNotification6, cb.settings.autoNotice6Interval * 60000); // start timeout release event cb.setTimeout(releaseTimeouts, timeoutReleaseInterval * 60000); } //init KingTipper - Leaderboard - Standard Tip Menu { if(initialize == 0) { if(cb.settings.kingTipperSpam == 'Yes') { kingTipperSpam = 1; kingSpam(); } if(cb.settings.leaderBoardSpam == 'Yes') { leaderboardSpam = 1; leaderSpam(); } if(cb.settings.StdTipMenuNotice == 'On') { StdTipMenuNotice = 1; } if(cb.settings.AllTipMenuNotice == 'On') { AllTipMenuNotice = 1; } if(cb.settings.NakedTipMenuNotice == 'On') { NakedTipMenuNotice = 1; } if(cb.settings.DuoTipMenuNotice == 'On') { DuoTipMenuNotice = 1; } initialize = 1; } }
© Copyright Chaturbate 2011- 2024. All Rights Reserved.