Bots Home
|
Create an App
KloeHazeBot
Author:
erickkerns
Description
Source Code
Launch Bot
Current Users
Created by:
Erickkerns
// Auto-Moderator Bot var PonyBotDate = "May 2015"; cb.settings_choices = [{ name: 'AutoSilenceKnownAbusers', type: 'choice', label: 'autoSilence known Abusers (evil spirited)', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes' }, { name: 'AutoSilenceKnownAbusersList', label: 'add Your list of Abusers (separated by commas)', type: 'str', minLength: 0, maxLength: 10240, required: false }, { name: 'AutoSilenceKnownRude', type: 'choice', label: 'autoSilence known Rude users (retards)', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes' }, { name: 'AutoSilenceKnownRudeList', label: 'add Your list of Rude users (separated by commas)', type: 'str', minLength: 0, maxLength: 10240, required: false }, { name: 'AutoSilenceKnownSpammers', type: 'choice', label: 'autoSilence known Spammers (advertisers)', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes' }, { name: 'AutoSilenceKnownSpammersList', label: 'Your list of Spammers (separated by commas)', type: 'str', minLength: 0, maxLength: 10240, required: false }, { name: 'DisableRedundantMessages', type: 'choice', label: 'Reject dublicate messages from users', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes' }, { name: 'HideGreyTipBegging', type: 'choice', label: 'Hide messages begging other for tips (moderators excluded)', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes' }, { name: 'HideGreyBeggingBroadcaster', type: 'choice', label: 'Hide Grey/Light Blue messages about show/open stuff', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes' }, { name: 'HideGreyStickyKeys', type: 'choice', label: 'Hide Grey/Light Blue sticky keys (eg. mmmmmmmmmmmmm)', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes' }, { name: 'DisableGreyCaps', type: 'choice', label: 'Disable Grey/Light Blue CAPS (Citizens excluded)', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes' }, { name: 'DisableGreyGraphics', type: 'choice', label: 'Disable Grey Graphics (Citizens excluded)', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes' }, { name: 'DisableLBlueGraphics', type: 'choice', label: 'Disable Light Blue Graphics (Citizens and tippers excluded)', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes' }, { name: 'KloevilleNotifyEntry', type: 'choice', label: 'Kloeville: Announce entering citizens', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes' }, { name: 'KloevilleAddTag', type: 'choice', label: 'Kloeville: Add Tag to all citizen messages', choice1: 'No', choice2: '[Citizen]', choice3: '[Senator]', defaultValue: '[Senator]' }, { name: 'KloevilleBgColor', type: 'choice', label: 'Kloeville: Set background color on citizen messages', choice1: 'No', choice2: 'Light Yellow', choice3: 'Light Green', choice4: 'Light Blue', defaultValue: 'Light Yellow' }, { name: 'KloevilleCelebrateNew', type: 'choice', label: 'Kloeville: Celebrate new citizens', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes' }, { name: 'KloevillePricePatrician', type: 'int', minValue: 1, maxValue: 99999, defaultValue: 599, label: 'Citizen price [Patrician]' }, { name: 'KloevillePriceEquestrian', type: 'int', minValue: 1, maxValue: 99999, defaultValue: 999, label: 'Citizen price [Equestrian]' }, { name: 'KloevillePriceSenator', type: 'int', minValue: 1, maxValue: 99999, defaultValue: 1599, label: 'Citizen price [Senator]' }, { name: 'KloevillePriceImperial', type: 'int', minValue: 1, maxValue: 99999, defaultValue: 5999, label: 'Citizen price [Imperial]' }, { name: 'KloevillePriceGodlike', type: 'int', minValue: 1, maxValue: 99999, defaultValue: 9999, label: 'Citizen price [Godlike]' }, { name: 'KloevilleCitizensPatrician', label: 'Citizens [Patrician] (separated by commas)', type: 'str', minLength: 0, maxLength: 10240, required: false }, { name: 'KloevilleCitizensEquestrian', label: 'Citizens [Equestrian] (separated by commas)', type: 'str', minLength: 0, maxLength: 10240, required: false }, { name: 'KloevilleCitizensSenator', label: 'Citizens [Senator] (separated by commas)', type: 'str', minLength: 0, maxLength: 10240, required: false }, { name: 'KloevilleCitizensImperial', label: 'Citizens [Imperial] (separated by commas)', type: 'str', minLength: 0, maxLength: 10240, required: false }, { name: 'KloevilleCitizensGodlike', label: 'Citizens [Godlike] (separated by commas)', type: 'str', minLength: 0, maxLength: 10240, required: false }, { name: 'AutoSilenceGreysOnTip', label: 'Silence Greys (& Light Blue) if someone tips (tokens amount, 0=disabled)', type: 'int', defaultValue: 101, minValue: 0, maxValue: 600, required: true }, { name: 'AutoSilenceGreysOnTip_Minutes', label: 'Silence Greys for how long (minutes)', type: 'int', defaultValue: 10, minValue: 1, maxValue: 60, required: true }, { name: 'Husbands', label: 'Husbands (user|yyyymmdd,user|yyyymmdd,.....)', type: 'str', minLength: 0, maxLength: 10240, required: false }, { name: 'HusbandDivorce', label: 'Divorce after (days)', type: 'int', minValue: 1, maxValue: 365, defaultValue: 35 }, { name: 'ModeratorTipNotes', type: 'choice', label: 'Make tipnotes from low-tippers, available for Moderators', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes' }]; function sorryannouncement() { cb.chatNotice('Sorry, the Kloeville Bot is made for Kloe\'s room, it is very room specific, please make your own Bot', '', '', '#ff0000', 'bold'); cb.setTimeout(sorryannouncement, 20000) } if ((cb.room_slug != "kloehaze") && (cb.room_slug != "erickkerns")) { sorryannouncement() } var KnownHugeTippers = ['koolaidkid', 'mikedr667', 'roscoe112', 'medjai', 'husk3r', 'jingalo', 'getberzeker', 'palmio', 'fearlessguy654', 'lunaticone', 'penguinmane', 'schubkarre', 'ilovetobekilled', 'derekj2', 'smash26', 'dcokin', 'dex4eve', 'swiftee1', 'mark33sport_again', 'furtrapper69', 'peter_warne', 'fredothebest', 'randomme22', 'xxpokerfacexx', 'hannibalking88', 'daveross', 'thebest7777', 'eyes4you', 'walking_on_by', 'tufty', 'johny_the_donkey', 'patrick_', 'itip', 'penguinmane', 'raiderballer', 'hardup1student']; var KnownHighTippers = ['grandcrusader', 'mdstud20', 'Fredothebest', 'Peter_Warne', 'Blitz907', 'Hvol24', 'Badboyaqua', 'buffalodave', 'dkimchi', 'tolender', 'xzite', 'craigw67217', 'Hardrider69', 'derekj2', 'kingsandman7', 'roborock', 'special_pumpkin', 'madmires', 'rayman71', 'kerny', 'mars1515', 'arc76', 'ghettygreen', 'zapiixo', 'robo2929', 'litlepanda82', 'twill84', 'cielidor', 'rsg85', 'mikeoxfat', 'bl4z3dr4gon', 'walkingbird', 'smurfo9r', 'bror100', 'bernie', 'jurandor', 'geoos', 'razzeldazzel', 'hardrider69', 'lovetoride135', 'miracle_man', 'tembel', 'steve9182', 'steve9183', 'sounthern777', 'aileron93', 'englishggent', 'dean9862', 'bingobob87', 'goghan', 'lubbo452', 'hawtie', 'greywolf', 'amisol', 'bilco', 'davidoff', 'eddytorrezz', 'sorehands', 'skyboy114', 'benschopper', 'washdc808', 'corsola', 'adiond', 'traxis', 'velk', 'drmandyhatten', 'penguinslots', 'mistaahj', 'biggdogg069', 'ypsilon1975', 'crazyejco', 'shortasiandude93', 'marine0621', 'jaymbom', 'dkimchi', 'tolender', 'laylafoxx', 'jackel420', 'italianstud224', 'badboyaqua', 'lysandus', 'grimlv', 'div905', 'benupnorth', 'randyuk', 'misterprig', 'jmoore007', 'bmw5678', 'flyingdutchman1990', 'stonerip', 'pathesus', 'keithvlad2002', 'kujo1', 'navyboy25', 'quietlywatchin', 'mmlengendz', 'seiadoon', 'solocup', 'patrick4you', 'texasborn85', 'beavis13077', 'sean6380', 'kwayne', 'nico888', 'kryptos', 'matty_v_', 'justsumguy89', 'destin71', 'bigc609mk2', 'wonder_of_bern', 'sound_sleeper', 'tomohead', 'bulldoglover', 'samm09', 'eatinpeaches', 'looper', 'minkpussycat', 'maxus_1234', 'hardrider69', 'brightsoull', 'panda1', 'carpentertroy', 'coolguy454545', 'boonie9195', 'lasim', 'danno_1994', 'joohan1', 'hugelybored', 'mistercc', 'deadfred', 'hectcgent', 'irahul', 'ulutojon', 'nordbaggen', 'potential27', 'blueshirts', 'that_guy223', 'skelter721', 'palmskies', 'salami10', 'nobeltobel', 'gehu', 'gregault', 'nearius', 'jt_1869', 'blitz907', 'boomshakalaka11279', 'buzzer1981', 'jaxx069', 'camelemac', 'ghettygreen', 'arc76', 'mars1515', 'kerny', 'madmires', 'marineromeo', 'gun4urbun', 'zapiixo', 'sexu_up', 'slingshot', 'infamouz1', 'le_french', 'blue_yannick', 'blu_sky', 'southafricanbeast', 'mashiku4eve', 'toninux', 'bdon92', 'drivinhome', 'lionwolf', 'psycho_60', 'bzeebee', 'promeval28', 'echo96', 'aron11b']; var KnownAbusers = ['lost_buoy', 'dbordo19', 'motherfuckerss', 'theone1926', 'ajgahrman', 'drpekpek', 'down4anythingjones', 'kasper67', 'simpsonsmith', 'badboyjack913', 'shhhmint', 'i_like_your_style', 'nottoronas', 'lionheart2833', 'jagya', 'taelon_85', 'ravener', 'kris_slick94', 'handybitch', 'abruzzi2', 'bitsnbits', 'yourcuntisnttightbitch', 'theareolaman', 'serjaimelannister', 'bihqm', 'chelseaman']; var KnownRude = ['dave107', 'dfdsfsgddsgdsgdsdgs', 'vapours', 'byronic1', 'syavasan', 'bloodshottear', 'wolds_biggest_asshole', 'morris9875423', 'watchmecum72', 'vapours', 'pussypussyy', 'fleshmarket', 'archstanton6', 'abruzzi2', 'jimmyfast', 'epicurean', 'paymebitches', 'tzrafaga99', 'hellsfun', 'kendrick96', 'powerfulginger', 'dsuyety', 'noor19842014', 'cockroach999666', 'apachehero', 'crash4eve', 'grazman76', 'geniusatwork', 'jjs97', 'aslan5928', 'chainsawx', 'durannt35', 'bouboubeast', 'dirtyhippo', 'hichamdkk', 'nickbateraprap', 'reecemilanx', 'bezpravil', '777gnr777', 'fucker12458', 'nickkk24', 'danman3683', 'boobs98889876567', 'bigdad00', 'macjizzy', 'danman3683', 'foryinath', 'pussy_destroyer0099']; var KnownSpammers = ['alexxagoddess', 'nicolleblow', 'nicollekitty', 'nicolleshow18', 'nicollealice', 'julyadirty', 'julyacum', 'julyass', 'starorgy18', 'rmw12', 'jbonex12', 'barbaranoi2', 'mistressalice', 'mistressstar_', 'steeve1000', 'ryu_saki', 'irishcharmer1987', 'jenx8c87', 'lokin2play', 'xselffacialx', 'rrbulldogs', 'freelcu', 'freelcu1', 'backbacon_0666', 'ohballs', 'maxfresh81', 'asamoa2841', 'hugeloadcumcum', 'dickdonger23', 'unvirtual', 'kduffybain2', 'slyfly69', 'fastcumm', 'tittybanger123654', 'pjcty2', 'marcs22', 'kmukundank', 'radrigezzz', 'aakjashbanerjee', 'bhavinalps', 'bilalddm', 'hungx10xinches', 'johncc83']; var PhrasesRude = ['fake', 'phake', 'whore', ' hoe ', 'bitch', 'slut', 'slutty', 'fuck', ':bigsip', ':plow', ':con_2', ':jack', ':assholeplz', ':blowj', ':pico', ':penisdance', ':flashy', ':bjbob', ':fucku', ':chakka', ':culo', ':jerk', ':wang', ':blow ', ':wanker', ':smilejerk2', ':wanky2', ':errect', ':flasher', ':thebird', ':handjobs', ':fruity2', ':itsarecording', ':rec', ':smilejerk', ':run', ':tittyfuck', ':teabag', ':swallow', ':smurf', ':sanchez', ':wank', ':golden', ':foot', ':eat', ':doggy', ':ass2ass', ':69', ':shadow', ':bj', ':running', ':sexsign', ':jumpingboobs', ':ejac1', ':btip', ':boner3', 'gold digger', 'must be proud', 'rape you', ':nnnnnnnnn', 'moderators suck', 'motherfucking', ':nnnnn', 'xstylex', 'b i t c h', 'w h o r e', 'f a k e', 'shut up', ':blowjob', 'suck my penis', ':mooning', 'bought tits', ':erection2', 'do a shit', ':TITAN', ':nuns', 'poop', ':terom', 'drink your piss', 'suck my cock', ':fucked', ':vagina', ':kiss3', ':cum', ':4444', ':hardcock', ':liqsdrawing4', 'shit on you', ':squirt5', ':mmmm', ':anal3', ':suck', 'shut the fuck up', 'stfu', 'prick', 'suck my dick', ':boob678', ':poiuy', 'my big hard dick', ':lickass80', 'slut for money', ':itsmepulse', ':TITAN', ':paff', ':sucknipple', ':suckdick', ':titsuck', ':smileycumshot', ':cumming', ':pafb', ':bigsip', ':liqsdrawing4', ':con_2', 'noname359', ':cum4', ':cumpussy']; var WordsRude = [':pis', ':blow', 'ugly']; var PhrasesTip = [':notips', ':moreme', ':wowtip', ':tokens', ':Tipb2', ':sendtip', ':tip', ':tipher', 'please tip', 'tip her', 'tip guys', 'tip the girl', ':tipher4', ':buy', ':showbest', ':qss', ':moresl', ':sf2', ':watchbest', ':tips2', 'tip tip tip', ':shtp', ':tipguyz', ':tipsbb', ':Tipb2', ':buytokens']; var PhrasesBegging = ['show boobs', 'show bobs', 'open boobs', 'boobs please', 'show breasts', 'show tit', 'open tit', 'tits please', 'shake your boobs', 'shake boobs', 'show me your tits', 'show me your boobs', 'show us your tits', 'show us your boobs', 'play with twins', 'show your boobs', 'flash tits', 'flash boobs', 'boobs show', 'bobs show', 'boobs open', 'please boobs', 'breasts show', 'tit show', 'tit open', 'please tits', 'boobs shake', 'lets see tits', 'shake your tits', 'shake tits', 'show your boobies', 'show boobies', 'boobies show', 'play with boobies', 'play with tits', 'shake them tits', 'show tits', 'rub nipple', 'pinch your tits', 'bounce your boobs', 'tits please', 'show your tits', 'me your boobs', 'show your boobs', 'remove your top', 'open your bra', 'take that bra off', 'take bra off', 'play whit your tits', 'play with your tits', 'shack them tits', 'shake them tits', 'take that top off', 'show your boob', 'wanna see your boobs', 'show feet', 'open feet', 'feet please', 'show me your feet', 'show your feet', 'feet feet feet', 'feets plis', 'feets pls', 'feet pls', 'feet please', 'feet plz', 'lets see feet', 'show sexy feet', 'show your sexy feet', 'feet show', 'feet bb', 'zoom cam', 'cam down', 'cam zoom', 'cum please', 'finger yourself', 'two fingers please', 'fist that pussy', 'show me yo pussy', 'start fingering', 'finger inside', 'show pussy', 'open pussy', 'pussy please', 'spread your pussy', 'spread pussy', 'finger pussy', 'show your pussy', 'open your pussy', 'wanna see pussy', 'pussy show', 'pussy open', 'please pussy', 'pussy spread', 'pussy finger', 'can i see your pussy', 'can we see your pussy', 'show your pussy', 'finger in your vagina', 'finger your vagina', 'finger in pussy', 'show the vagina', 'show vagina', 'play with pussy', 'touch your pussy', 'zoom pussy', 'finger your pussy', 'play panties', 'flash pussy', 'show your pussy', 'lets see pussy', 'show your wet pussy', 'finger urself', 'finger that pussy', 'show hair pussy', 'show that pussy', 'finger your pusse', 'show clit', 'rub your pussy', 'closeup pussy', 'see that pussy', 'show your pussy', 'flash pussy', 'vagina show', 'show me your pussy', 'show us your pussy', 'show me your hot pussy', 'open cunt', 'show some pussy', 'show pusi', 'play pussy', 'pussy zoom', 'show ass', 'open ass', 'ass please', 'put it in your ass', 'spank that ass', 'finger ass', 'ass plz', 'anal pls', 'smack dat ass', 'flash ass', 'show asshole', 'open asshole', 'asshole please', 'ass honey', 'asshole show', 'asshole open', 'please asshole', 'ass show', 'ass open', 'anal bb', 'play with ass', 'play with asshole', 'put it in your butt', 'dildo in ass', 'see your ass', 'show your ass', 'lets see ass', 'lets see asshole', 'finger in the ass', 'asshole please', 'ass please', 'show anal', 'show your ass', 'show off your ass', 'open your ass', 'spread your asshole', 'show your sexy asshole', 'smack your ass', 'shake your ass', 'shake that ass', 'move your ass', 'your ass bb', 'put it in your ass', 'show the ass', 'spank ass', 'finger yourself', 'stand up please', 'doggy please', 'please finger', 'finger your self', 'pound that pretty pussy', 'pound that pussy', 'play with that pussy', 'see your pussy', 'show u r pussy', 'open your cunt', 'open your pussy', 'show you pussy', 'lick your fingers', 'take em off', 'turn around', 'bend over', 'play with your self', 'suck on your finger', 'make cameltoe', 'dobby pls', 'remove your panties', 'remove panties', 'take panties off', 'zoom your face', 'could we see your', 'masturbate please', 'take off panties', 'keep going babe', 'fast as you can', 'take that off', 'slap your bum', 'slap bum', 'slap your ass', 'show me your sexy', 'rub yourself', 'show us the', 'show us some', 'get down on kness', 'strip pantie', 'squirting please', 'squirt please', 'spread it', 'show something', 'pull them down', 'show heels', 'heels show', 'put finger in', 'masturbate please', 'shake it please', 'show armpits', 'put the vibrator', 'take it off', 'masturbate please', 'can we see', 'put it deep in', 'doggy bb', 'go naked please', 'spread them cheeks', 'dildo please', 'show us more', 'suck your fingers', 'more zoom bb', 'feet bb']; var PhrasesSpam = ['uhack', 'freelivecams', 'freelivecams.us', 'watch me', 'see my room', 'see my cam', 'my cam is', 'my cam is open', 'come in my room', 'check my cam', 'cams4party', 'girlscamsessions', 'tokenschaturbate', 'yahcam', 'Female Cam', 'PerfectJena', 'ChaturbateToken', 'token adder', 'EllaGoCam', 'cam girls for free', 'cambabes', 'for live sex', 'check out my cam', 'join my room', 'can i show my cock', 'you wanna check me out', 'take a quick peek at my cam', 'look at my cam', 'come to my room', 'open my cam', 'come to my cam', ':marcsfollow', 'add me girls', 'chat in yahoo', 'check out my room', 'show you my dick', 'any girls interested', 'look my cam', 'any ladies in here', 'join my broadcast', 'i am on cam', 'go to my channel', 'visit my room', 'check me out', 'look me profile', 'look at my show', 'view my cam', 'watch my cam', 'see me cum', 'live webcams', 'hulk com', 'get free tokens', 'check out my channel', 'check my channel', 'peter ghin', 'i am on skp girls', 'come see my big', 'come see my cock', 'ashleygirl86', 'moevideo', 'come on my cam']; var PhrasesTranslate = { bb: "*Kloe", ty: "*thank you", yw: "*you're welcome", thx: "*thanks", np: "*no problem", ttlb_gold: "", ttlb_silver: "", hru: "*how are you", plz: "*please", yr: "*your", ur: "*your", hru: "*how are you", pls: "*please" }; var AutoRemoveGraphics = [':ttlb_gold', ':ttlb_silver', ':ktb_crown', ':kloehazecrowngold ', ':kloehazecrownsilver ', ':kloehazetophat ', ':kloehazesexygirl ', ':kloehazeticket ', ':kloehazecrowngold', ':kloehazecrownsilver', ':kloehazetophat', ':kloehazesexygirl', ':kloehazeticket']; var KnownCitizens_Godlike = []; var KnownCitizens_Imperial = []; var KnownCitizens_Senator = []; var KnownCitizens_Equestrian = []; var KnownCitizens_Patrician = []; var EntryTime = new Array(); var UserStatus = new Array(); var PonyStats = new Array(); var UserWarnings = new Array(); var LastMessage = new Array(); var LeaderBoardLastShown = 0; var GreySilenceLastAnnounced = 0; var TrackSilencedUsers = new Array(); var TrackUserTotalTips = {}; var TrackUserLastTip = {}; var NoGraphics = new Array(); var TipLeader = new Array(); TipLeader['gold'] = ""; TipLeader['silver'] = ""; var OnlineModerators = new Array(); var SystemMessagesOn = new Array(); var SystemNoticeOn = new Array(); var SystemNoticeHighOn = new Array(); var SystemPonybotOn = new Array(); var ModeratorTipNotesOn = new Array(); var snowballprice = 0; var TrackSnowBalls = new Array(); var GuardTracking = []; var GuardCounter = 0; var caysexyactive = 1; var TrackHusbands = new Array(); var TrackHusbandMarriage = {}; var HusbandPrice = 222; var SuperUser = 'erickkerns'; PonyStats['TotalMessages'] = 0; PonyStats['CitizenMessages'] = 0; PonyStats['AutoSilencedMessages'] = 0; PonyStats['EnteringCitizens'] = 0; PonyStats['EnteringDarkBlue'] = 0; PonyStats['EnteringLightBlue'] = 0; PonyStats['EnteringGrey'] = 0; PonyStats['EnteringKnownGreatTippers'] = 0; PonyStats['EnteringKnownHugeTippers'] = 0; PonyStats['TippingCounter'] = 0; PonyStats['TotalTips'] = 0; PonyStats['TippingCounter'] = 0; PonyStats['BlueTurnedGrey'] = 0; PonyStats['GreyTurnedBlue'] = 0; PonyStats['MinutesInRoom_Grey'] = 0; PonyStats['MinutesInRoom_Light'] = 0; PonyStats['MinutesInRoom_Dark'] = 0; var SnowBallMiss = new Array(); SnowBallMiss.push('The ball is thrown so hard, it turns into a fireball and melts'); SnowBallMiss.push('The ball is thrown like a girl, and it never reaches the target'); SnowBallMiss.push('The wind catches the ball and it hits Kate Middleton in the back'); SnowBallMiss.push('Mariah Carey got in the way, and is now crying like, well Mariah !!'); SnowBallMiss.push('Mitsy caught the snowball, and is now making slushice with it'); var SnowBallHit = new Array(); SnowBallHit.push('Nice guys never win. Bullies does.'); SnowBallHit.push('The ball flies in a straight line, right *SMACK* in the face'); SnowBallHit.push('This is a precision throw, and it hits perfectly'); SnowBallHit.push('That snowball is full of win.'); SnowBallHit.push('Karma is a bitch. Watch out..'); function initPonyBot() { if ((typeof(cb.settings.KloevilleCitizensPatrician) != 'undefined') && (cb.settings.KloevilleCitizensPatrician.length > 1)) { var tempone = cb.settings.KloevilleCitizensPatrician.toLowerCase(); var temp = tempone.split(/,/); for (var i = 0; i < temp.length; i++) { KnownCitizens_Patrician.push(temp[i]) } } if ((typeof(cb.settings.KloevilleCitizensPatrician) != 'undefined') && (cb.settings.KloevilleCitizensEquestrian.length > 1)) { var tempone = cb.settings.KloevilleCitizensEquestrian.toLowerCase(); var temp = tempone.split(/,/); for (var i = 0; i < temp.length; i++) { KnownCitizens_Equestrian.push(temp[i]) } } if ((typeof(cb.settings.KloevilleCitizensPatrician) != 'undefined') && (cb.settings.KloevilleCitizensSenator.length > 1)) { var tempone = cb.settings.KloevilleCitizensSenator.toLowerCase(); var temp = tempone.split(/,/); for (var i = 0; i < temp.length; i++) { KnownCitizens_Senator.push(temp[i]) } } if ((typeof(cb.settings.KloevilleCitizensPatrician) != 'undefined') && (cb.settings.KloevilleCitizensImperial.length > 1)) { var tempone = cb.settings.KloevilleCitizensImperial.toLowerCase(); var temp = tempone.split(/,/); for (var i = 0; i < temp.length; i++) { KnownCitizens_Imperial.push(temp[i]) } } if ((typeof(cb.settings.KloevilleCitizensPatrician) != 'undefined') && (cb.settings.KloevilleCitizensGodlike.length > 1)) { var tempone = cb.settings.KloevilleCitizensGodlike.toLowerCase(); var temp = tempone.split(/,/); for (var i = 0; i < temp.length; i++) { KnownCitizens_Godlike.push(temp[i]) } } var ExpiredHusbands = ''; if ((typeof(cb.settings.Husbands) != 'undefined') && (cb.settings.Husbands.length > 1)) { var tempone = cb.settings.Husbands.toLowerCase(); var temp = tempone.split(/,/); for (var i = 0; i < temp.length; i++) { var tempt = temp[i].split('|'); if (tempt[1].length != 8) { cb.chatNotice('ERROR in husband string, date invalid for \'' + tempt[0] + '\', user ignored.', cb.room_slug, '', '#FF0000', 'bold') } else { var toDay = new Date(); var mDate = new Date(parseInt(tempt[1].substr(0, 4)), parseInt(tempt[1].substr(4, 2)), parseInt(tempt[1].substr(6, 2)), 0, 0, 1, 0); var expireDate = new Date(mDate); expireDate.setDate(mDate.getDate() + cb.settings.HusbandDivorce); if (toDay > expireDate) { ExpiredHusbands += ',' + tempt[0] } else { TrackHusbands.push(tempt[0]); TrackHusbandMarriage[tempt[0]] = tempt[1] } } } if (ExpiredHusbands.length > 0) { cb.chatNotice('IGNORED EXPIRED Husbands: ' + ExpiredHusbands.substr(1, ExpiredHusbands.length - 1) + '.', cb.room_slug, '', '#FF0000', 'bold') } } if (cb.room_slug == "kloehaze") { cb.chatNotice('Erick, Miss You', cb.room_slug, '', '#FF0000', 'bolder'); cb.chatNotice(':ponykiss', cb.room_slug, '', '#FF0000', 'bolder') } if ((typeof(cb.settings.KloevilleCitizensPatrician) != 'undefined') && (cb.settings.AutoSilenceKnownAbusersList.length > 1)) { var tempone = cb.settings.AutoSilenceKnownAbusersList.toLowerCase(); var temp = tempone.split(/,/); for (var i = 0; i < temp.length; i++) { KnownAbusers.push(temp[i]) } } if ((typeof(cb.settings.KloevilleCitizensPatrician) != 'undefined') && (cb.settings.AutoSilenceKnownRudeList.length > 1)) { var tempone = cb.settings.AutoSilenceKnownRudeList.toLowerCase(); var temp = tempone.split(/,/); for (var i = 0; i < temp.length; i++) { KnownRude.push(temp[i]) } } if ((typeof(cb.settings.KloevilleCitizensPatrician) != 'undefined') && (cb.settings.AutoSilenceKnownSpammersList.length > 1)) { var tempone = cb.settings.AutoSilenceKnownSpammersList.toLowerCase(); var temp = tempone.split(/,/); for (var i = 0; i < temp.length; i++) { KnownSpammers.push(temp[i]) } } if ((typeof(cb.settings.DisableGreyGraphics) != 'undefined') && (cb.settings.DisableGreyGraphics == 'Yes')) { NoGraphics['grey'] = 1 } if ((typeof(cb.settings.DisableBlueGraphics) != 'undefined') && (cb.settings.DisableLBlueGraphics == 'Yes')) { NoGraphics['lblue'] = 1 } } initPonyBot(); PonyBotEntryInformation(); cb.onTip(function(tip) { var userName = tip['from_user'].toLowerCase(); var LBbefore = GetLeaderBoardPosition(userName); TrackUserTotalTips[userName] = (TrackUserTotalTips[userName] || 0) + parseInt(tip['amount']); TrackUserLastTip[userName] = new Date().valueOf(); PonyStats['TotalTips'] += tip['amount']; PonyStats['TippingCounter']++; if ((typeof(cb.settings.KloevilleCelebrateNew) != 'undefined') && (cb.settings.KloevilleCelebrateNew == 'Yes')) { if (tip['amount'] == cb.settings.KloevillePricePatrician) { CelebrateNewCitizen(tip['from_user'], 'patrician') } if (tip['amount'] == cb.settings.KloevillePriceEquestrian) { CelebrateNewCitizen(tip['from_user'], 'equestrian') } if (tip['amount'] == cb.settings.KloevillePriceSenator) { CelebrateNewCitizen(tip['from_user'], 'senator') } if (tip['amount'] == cb.settings.KloevillePriceImperial) { CelebrateNewCitizen(tip['from_user'], 'imperial') } if (tip['amount'] == cb.settings.KloevillePriceGodlike) { CelebrateNewCitizen(tip['from_user'], 'godlike') } } if (!tip['from_user_has_tokens']) { if (!tip['from_user_is_mod']) { CelebrateTurningGrey(userName) } TrackUserStatus('set', userName, tip['from_user_has_tokens'], tip['from_user_tipped_recently']); PonyStats['BlueTurnedGrey']++ } if (TrackUserStatus('get', userName, 0, 0) == "G") { if (!tip['from_user_is_mod']) { CelebrateTurningBlue(userName) } TrackUserStatus('set', userName, tip['from_user_has_tokens'], tip['from_user_tipped_recently']); PonyStats['GreyTurnedBlue']++ } var LBafter = GetLeaderBoardPosition(userName); if ((LBafter == 1) && (LBbefore != 1)) { cb.chatNotice(tip['from_user'] + " is our new Tip Leader. Hail The New King!", '', '', '#0000ff', 'bold') } if ((typeof(cb.settings.AutoSilenceGreysOnTip) != 'undefined') && (cb.settings.AutoSilenceGreysOnTip == tip['amount'])) { SilenceAllGreys(cb.settings.AutoSilenceGreysOnTip_Minutes, tip['from_user']) } if ((typeof(cb.settings.ModeratorTipNotes) != 'undefined') && (cb.settings.ModeratorTipNotes == 'Yes') && (!tip['from_user_is_mod']) && (TrackUserTotalTips[userName] < 51)) { if (tip['message'].length > 1) { var tm = tip['message'].replace("@", " (at) "); ModeratorAnnouncement('TipNote', 'TIP NOTE from \'' + tip['from_user'] + '\': ' + tm) } } if ((snowballprice > 0) && (tip['amount'] >= snowballprice)) { SnowBall('issuenew', tip['from_user'], 0) } if (tip['amount'] == HusbandPrice) { ItsATrap(tip['from_user']) } if (tip['amount'] < 111) { cb.chatNotice('\u2665\u2665\u2665\u2665 Thank you for your tip, ' + tip['from_user'] + ' (: \u2665\u2665\u2665\u2665', tip['from_user'], '', '#0000ff', 'bold') } }); cb.onEnter(function(user) { var userName = user['user'].toLowerCase(); var enteredagain = TrackTime('set', userName); TrackUserStatus('set', userName, user['has_tokens'], user['tipped_recently']); if (user['is_mod']) { TrackModerators('entered', user['user']) } var level = CheckCitizen(userName); if ((typeof(cb.settings.KloevilleNotifyEntry) != 'undefined') && (cb.settings.KloevilleNotifyEntry == 'Yes') && (CheckCitizen(userName))) { AnnounceCitizen(userName, level); PonyStats['EnteringCitizens']++ } if (user['tipped_recently']) { var message = "Dark Blue, " + user['user'] + ", entered the room" + enteredagain; ModeratorAnnouncement('Notice', message); PonyStats['EnteringDarkBlue']++ } else if (user['has_tokens']) { PonyStats['EnteringLightBlue']++ } else { PonyStats['EnteringGrey']++ } if (!level) { if ((KnownHugeTippers.indexOf(userName) > -1)) { var message = "Known HUGE Tipper (5000" + '\u271b' + " tokens), " + user['user'] + ", entered the room" + enteredagain; ModeratorAnnouncement('NoticeHigh', message); PonyStats['EnteringKnownHugeTippers']++ } } if (IsMarried(userName)) { var differentmessages = 9; var pickmessage = Math.floor(Math.random() * differentmessages) + 1; if (pickmessage == 1) { cb.chatNotice('BEWARE!! Kloe\'s husband \'' + userName + '\' came home: Honey I\'m home...', '', '', '#0000ff', 'bold') } if (pickmessage == 2) { cb.chatNotice('WARNING!!. EVERYBODY hide in the closet! Kloe\'s husband \'' + userName + '\' came home. (hope there is enough room)', '', '', '#0000ff', 'bold') } if (pickmessage == 3) { cb.chatNotice('ATTENTION!! Be vevy vevy quiet.... Kloe\'s husband \'' + userName + '\' entered the room.', '', '', '#0000ff', 'bold') } if (pickmessage == 4) { cb.chatNotice('QUICKLY!! Pick up your clothes and jump out the window.. Kloe\'s husband \'' + userName + '\' came home.. Bye and Good Luck..', '', '', '#0000ff', 'bold') } if (pickmessage == 5) { cb.chatNotice('SSSHHHHHH!! Kloe\'s husband \'' + userName + '\' came home.. If you tell him what we have been doing, I KILL U', '', '', '#0000ff', 'bold') } if (pickmessage == 6) { cb.chatNotice('Kloe\'s husband \'' + userName + '\' came home.. Quickly pick up your shit and follow the red EXIT signs...', '', '', '#0000ff', 'bold') } if (pickmessage == 7) { cb.chatNotice('Kloe\'s husband \'' + userName + '\' came home.. Hurry, find the nearest EXIT sign...', '', '', '#0000ff', 'bold') } if (pickmessage == 8) { cb.chatNotice('IT\'S A TRAP!! Kloe\'s husband \'' + userName + '\' entered the room.', '', '', '#0000ff', 'bold') } if (pickmessage == 9) { cb.chatNotice('You have exactly 4 seconds to learn the Ninja skill, Invisibility.. Kloe\'s husband \'' + userName + '\' entered the room.', '', '', '#0000ff', 'bold') } } PonyBotEntryInformation(user['user']) }); cb.onMessage(function(msg) { var userName = msg['user'].toLowerCase(); var level = CheckCitizen(userName); msg['m'] = RemoveCitizenTags(msg['m']); if ((msg['m'].substring(0, 1) == '/') && ((msg['is_mod']) || (msg['user'] == cb.room_slug))) { msg['X-Spam'] = true } if ((EntryTime[userName] < 1) || (typeof(EntryTime[userName]) == 'undefined')) { TrackTime('set', userName); TrackUserStatus('set', userName, msg['has_tokens'], msg['tipped_recently']) } if ((msg['is_mod']) && (OnlineModerators.indexOf(userName) < 0)) { TrackModerators('entered', userName) } if ((msg['user'] == SuperUser) && (msg['m'].substring(0, 15) == '/startsnowgame ')) { msg['X-Spam'] = true; snowballprice = parseInt(msg['m'].substr(15), 10); cb.chatNotice(":snowball", '', '', '#0000ff', 'normal'); cb.chatNotice("SnowBall Game started. Tip " + snowballprice + " tokens to get a ball.", '', '', '#0000ff', 'normal'); return msg } if ((msg['user'] == SuperUser) && (msg['m'] == '/stopsnowgame')) { msg['X-Spam'] = true; if (snowballprice < 1) { cb.chatNotice("No SnowBall Game is running", msg['user'], '', '#ff0000', 'normal') } else { snowballprice = 0; cb.chatNotice("SnowBall Game stopped", '', '', '#0000ff', 'normal') } return msg } if ((msg['m'].substring(0, 1) == '/') && ((msg['is_mod']) || (msg['user'] == cb.room_slug))) { if ((msg['user'] == cb.room_slug) || (msg['user'] == SuperUser)) { if (msg['m'].substring(0, 12) == '/addcitizen ') { msg['X-Spam'] = true; var words = msg['m'].split(" "); if (words[1].length > 0) { if (words[2] == 'patrician') { CelebrateNewCitizen(words[1], 'patrician') } else if (words[2] == 'equestrian') { CelebrateNewCitizen(words[1], 'equestrian') } else if (words[2] == 'senator') { CelebrateNewCitizen(words[1], 'senator') } else if (words[2] == 'imperial') { CelebrateNewCitizen(words[1], 'imperial') } else if (words[2] == 'godlike') { CelebrateNewCitizen(words[1], 'godlike') } else { cb.chatNotice("PonyBot: " + words[2] + " is not a known citizen-type", msg['user'], '', '#ff0000', 'normal') } } return msg } if (msg['m'].substring(0, 10) == '/marriage ') { msg['X-Spam'] = true; var temp = msg['m'].split(" "); if (temp[1] > 0) { HusbandPrice = parseInt(temp[1]); cb.chatNotice("Husband Counter activated. Price set to " + HusbandPrice + " tokens.", msg['user'], '', '#ff0000', 'normal') } else { HusbandPrice = 0; cb.chatNotice("Husband Counter DEactivated. Price set to " + HusbandPrice + " tokens.", msg['user'], '', '#ff0000', 'normal') } return msg } if (msg['m'].substring(0, 9) == '/husbands') { msg['X-Spam'] = true; var husbands = ''; for (var i = 0; i < TrackHusbands.length; i++) { if (typeof TrackHusbands[i] !== 'undefined') { husbands += ',' + TrackHusbands[i] + '|' + TrackHusbandMarriage[TrackHusbands[i]] + '' } } cb.chatNotice(husbands.substr(1), msg['user'], '', '#ff0000', 'normal'); return msg } if (msg['m'].substring(0, 8) == '/sexygfx') { if (caysexyactive) { caysexyactive = 0; cb.chatNotice("Sexy GFX DEactivated, love you girl.", msg['user'], '', '#ff0000', 'normal') } else { caysexyactive = 1; cb.chatNotice("Sexy GFX Activated.", msg['user'], '', '#ff0000', 'normal') } return msg } } if (msg['m'].substring(0, 13) == '/silencegreys') { msg['X-Spam'] = true; if (msg['m'].length > 14) { var stime = parseInt(msg['m'].substr(14), 10) } else { var stime = cb.settings.AutoSilenceGreysOnTip_Minutes } SilenceAllGreys(stime, msg['user']); return msg } if (msg['m'].substring(0, 15) == '/unsilencegreys') { msg['X-Spam'] = true; TrackSilencedUsers['ALLGREYS'] = 0; cb.chatNotice(msg['user'] + ' UNsilenced greys', '', '', '#0000ff', 'bold'); return msg } if ((msg['m'] == '/help') || (msg['m'] == '/ponyhelp') || (msg['m'] == '/bothelp') || (msg['m'] == '/commands')) { msg['X-Spam'] = true; getHelpInformation(msg['user'], msg['is_mod']); return msg } if (msg['m'] == '/system on') { msg['X-Spam'] = true; TrackSystemMessages('on', msg['user']); cb.chatNotice("PonyBot: Got Ya, Show System Messages: ON", msg['user'], '', '#0000ff', 'normal'); return msg } if (msg['m'] == '/system off') { msg['X-Spam'] = true; TrackSystemMessages('off', msg['user']); cb.chatNotice("PonyBot: Got Ya, Show System Messages: OFF", msg['user'], '', '#0000ff', 'normal'); return msg } if ((msg['m'] == '/tipnotes on')) { msg['X-Spam'] = true; if ((typeof(cb.settings.ModeratorTipNotes) != 'undefined') && (cb.settings.ModeratorTipNotes == 'Yes')) { TrackTipNotes('on', msg['user']); cb.chatNotice("PonyBot: Got Ya, Show Tip Notes: ON", msg['user'], '', '#0000ff', 'normal') } else { cb.chatNotice("PonyBot: Tip Notes have not been activated by Kloe", msg['user'], '', '#0000ff', 'normal') } return msg } if (msg['m'] == '/tipnotes off') { msg['X-Spam'] = true; TrackTipNotes('off', msg['user']); cb.chatNotice("PonyBot: Got Ya, Show Tip Notes: OFF", msg['user'], '', '#0000ff', 'normal'); return msg } if (msg['m'] == '/notice on') { msg['X-Spam'] = true; TrackNotice('on', msg['user']); cb.chatNotice("PonyBot: Got Ya, Show Notice Messages: ON", msg['user'], '', '#0000ff', 'normal'); return msg } if (msg['m'] == '/notice off') { msg['X-Spam'] = true; TrackNotice('off', msg['user']); cb.chatNotice("PonyBot: Got Ya, Show Notice Messages: OFF", msg['user'], '', '#0000ff', 'normal'); return msg } if (msg['m'] == '/noticehigh on') { msg['X-Spam'] = true; TrackNoticeHigh('on', msg['user']); cb.chatNotice("PonyBot: Got Ya, Show NoticeHigh Messages: ON", msg['user'], '', '#0000ff', 'normal'); return msg } if (msg['m'] == '/noticehigh off') { msg['X-Spam'] = true; TrackNoticeHigh('off', msg['user']); cb.chatNotice("PonyBot: Got Ya, Show NoticeHigh Messages: OFF", msg['user'], '', '#0000ff', 'normal'); return msg } if (msg['m'] == '/ponybot on') { msg['X-Spam'] = true; TrackPonyBot('on', msg['user']); cb.chatNotice("PonyBot: Got Ya, Show PonyBot Messages: ON", msg['user'], '', '#0000ff', 'normal'); return msg } if (msg['m'] == '/ponybot off') { msg['X-Spam'] = true; TrackPonyBot('off', msg['user']); cb.chatNotice("PonyBot: Got Ya, Show PonyBot Messages: OFF", msg['user'], '', '#0000ff', 'normal'); return msg } if (msg['m'] == '/nogfx grey') { msg['X-Spam'] = true; if (NoGraphics['grey']) { NoGraphics['grey'] = 0; cb.chatNotice("PonyBot: Got Ya, Graphics OFF: GREYS", msg['user'], '', '#0000ff', 'normal') } else { NoGraphics['grey'] = 1; cb.chatNotice("PonyBot: Got Ya, Graphics ON: GREYS", msg['user'], '', '#0000ff', 'normal') } return msg } if (msg['m'] == '/nogfx lblue') { msg['X-Spam'] = true; if (NoGraphics['lblue']) { NoGraphics['lblue'] = 0; cb.chatNotice("PonyBot: Got Ya, Graphics OFF: LIGHT BLUES", msg['user'], '', '#0000ff', 'normal') } else { NoGraphics['lblue'] = 1; cb.chatNotice("PonyBot: Got Ya, Graphics ON: LIGHT BLUES", msg['user'], '', '#0000ff', 'normal') } return msg } if (msg['m'] == '/nogfx dblue') { msg['X-Spam'] = true; if (NoGraphics['dblue']) { NoGraphics['dblue'] = 0; cb.chatNotice("PonyBot: Got Ya, Graphics OFF: DARK BLUES", msg['user'], '', '#0000ff', 'normal') } else { NoGraphics['grey'] = 1; cb.chatNotice("PonyBot: Got Ya, Graphics ON: DARK BLUES", msg['user'], '', '#0000ff', 'normal') } return msg } if (msg['m'].substring(0, 9) == '/silence ') { msg['X-Spam'] = true; var temp = msg['m'].split(" "); if (!UserStatus[temp[1]]) { cb.chatNotice("Sorry, I have not noticed any user named '" + temp[1] + "' in the room yet", msg['user'], '', '#ff0000', 'normal') } else if ((OnlineModerators.indexOf(temp[1]) > -1) || (temp[1] == cb.room_slug)) { SilenceUser(msg['user'], 5); cb.chatNotice(msg['user'] + ' gave himself a TIME OUT for 5 minutes', '', '', '#0000ff', 'normal') } else { if (!temp[2]) { temp[2] = cb.settings.AutoSilenceGreysOnTip_Minutes } SilenceUser(temp[1], temp[2]); cb.chatNotice(msg['user'] + ' gave ' + temp[1] + ' a TIME OUT for ' + temp[2] + ' minutes', '', '', '#0000ff', 'normal') } return msg } if (msg['m'].substring(0, 11) == '/unsilence ') { msg['X-Spam'] = true; var temp = msg['m'].split(" "); if (!UserStatus[temp[1]]) { cb.chatNotice("Sorry, I have not noticed any user named '" + temp[1] + "' in the room yet", msg['user'], '', '#ff0000', 'normal') } else if (msg['user'] == temp[1]) { if (!temp[2]) { temp[2] = cb.settings.AutoSilenceGreysOnTip_Minutes } cb.chatNotice("Sorry, You cannot unsilence yourself, accept your loss", msg['user'], '', '#ff0000', 'normal') } else if (CheckIsSilenced(temp[1]) < 1) { cb.chatNotice("" + temp[1] + " is not silenced!!", msg['user'], '', '#0000ff', 'normal') } else { TrackSilencedUsers[temp[1]] = 0; cb.chatNotice('' + msg['user'] + ' unsilenced', msg['user'], '', '#0000ff', 'normal'); cb.chatNotice('You were UNsilenced by ' + msg['user'], temp[1], '', '#ff0000', 'bold'); ModeratorAnnouncement('System', temp[1] + ' were unsilenced by ' + msg['user']) } return msg } if (msg['m'] == '/ponystats') { msg['X-Spam'] = true; ShowPonyStats(msg['user']); return msg } } PonyStats['TotalMessages']++; if ((msg['m'] == '/lb') || (msg['m'] == '!lb')) { if ((TrackUserTotalTips[userName] > 0) || (msg['is_mod']) || (msg['user'] == cb.room_slug)) { ShowLeaderBoard(msg['user'], true) } else { cb.chatNotice("Sorry, Leaderboard is none of your business", msg['user'], '', '#ff0000', 'bold'); ModeratorAnnouncement('Ponybot', msg['user'] + ' trying to view the leaderboard, got rejected.'); msg['X-Spam'] = true } return msg } if (msg['m'].substring(0, 5) == '/hit ') { var temp = msg['m'].split(" "); if (!UserStatus[temp[1]]) { cb.chatNotice("SnowBall Game: Sorry, I have not noticed any user named '" + temp[1] + "' in the room yet", msg['user'], '', '#ff0000', 'normal') } else { SnowBall('throw', msg['user'], temp[1]) } msg['X-Spam'] = true; return msg } if (msg['m'].substring(0, 7) == '/guard ') { var temp = msg['m'].split(" "); if (!UserStatus[temp[1]]) { cb.chatNotice("SnowBall Game: Sorry, I have not noticed any user named '" + temp[1] + "' in the room yet", msg['user'], '', '#ff0000', 'normal') } else if (temp[1] == msg['user']) { cb.chatNotice("SnowBall Game: Sorry, you cannot guard yourself", msg['user'], '', '#ff0000', 'normal') } else { SnowBall('guard', msg['user'], temp[1]) } msg['X-Spam'] = true; return msg } if ((typeof(cb.settings.DisableReduntantMessages) != 'undefined') && (cb.settings.DisableRedundantMessages == 'Yes') && (LastMessage[userName] == msg['m'])) { cb.chatNotice("ChatBot: " + userName + ", no redundant messages, we heard you the first time", msg['user'], '', '#ff0000', 'bold'); msg['X-Spam'] = true; ModeratorAnnouncement('Ponybot', msg['user'] + ' got a warning for posting redundant messages'); PonyStats['AutoSilencedMessages']++; return msg } LastMessage[userName] = msg['m']; var Useconds = CheckIsSilenced(userName); if (Useconds > 0) { var foranother = Useconds + " seconds"; if (Useconds > 130) { foranother = Math.floor(Useconds / 60) + " minutes" } cb.chatNotice("Sorry " + msg['user'] + ", you are still silenced for about another " + foranother, msg['user'], '', '#ff0000', 'bold'); PonyStats['AutoSilencedMessages']++; msg['X-Spam'] = true; return msg } if ((level) && (msg['m'].substring(0, 1) != '/')) { if ((typeof(cb.settings.KloevilleAddTag) != 'undefined') && (cb.settings.KloevilleAddTag == '[Citizen]')) { msg['m'] = "[Citizen] " + msg['m'] } else if ((typeof(cb.settings.KloevilleAddTag) != 'undefined') && (cb.settings.KloevilleAddTag == '[Senator]')) { msg['m'] = "[" + level + "] " + msg['m'] } if (typeof(cb.settings.KloevilleBgColor) != 'undefined') { if (cb.settings.KloevilleBgColor == 'Light Yellow') { msg['background'] = '#fffdc8' } if (cb.settings.KloevilleBgColor == 'Light Green') { msg['background'] = '#c5ffd5' } if (cb.settings.KloevilleBgColor == 'Light Blue') { msg['background'] = '#c5c8ff' } } PonyStats['CitizenMessages']++ } if ((!msg['is_mod']) && (userName != cb.room_slug)) { var Gseconds = CheckIsSilenced('ALLGREYS'); if ((!msg['tipped_recently']) && (Gseconds > 0)) { if (((typeof(TrackUserTotalTips[msg['user']]) == 'undefined') || (TrackUserTotalTips[msg['user']] < 1)) && (!level)) { var foranother = Gseconds + " seconds"; if (Gseconds > 130) { foranother = Math.floor(Gseconds / 60) + " minutes" } cb.chatNotice("Sorry " + msg['user'] + ", ALL GREYS (and light blue) are still silenced for about another " + foranother + ' (tip to unsilence)', msg['user'], '', '#ff0000', 'bold'); PonyStats['AutoSilencedMessages']++; msg['X-Spam'] = true; return msg } } if ((!level) && (typeof(cb.settings.HideGreyStickyKeys) != 'undefined') && (cb.settings.HideGreyStickyKeys == 'Yes') && (HasRepeatedLetters(msg['m']))) { msg['X-Spam'] = true; cb.chatNotice("" + msg['user'] + " please fix your keyboard. A key seems to be stuck.", msg['user'], '', '#ff0000', 'bold'); ModeratorAnnouncement('Ponybot', msg['user'] + " got a message to fix keyboard. Having sticky keys '" + msg['m'] + "'"); PonyStats['AutoSilencedMessages']++; return msg } if ((typeof(cb.settings.HideGreyTipBegging) != 'undefined') && (cb.settings.HideGreyTipBegging == 'Yes') && (!level)) { if (SearchMessage(msg['m'], PhrasesTip)) { cb.chatNotice("ChatBot: " + msg['user'] + " please don't ask others to tip. Get tokens and do it yourself.", msg['user'], '', '#ff0000', 'bold'); msg['X-Spam'] = true; ModeratorAnnouncement('Ponybot', msg['user'] + " got a warning for begging others to tip '" + msg['m'] + "'"); PonyStats['AutoSilencedMessages']++; return msg } } if ((typeof(cb.settings.HideGreyBeggingBroadcaster) != 'undefined') && (cb.settings.HideGreyBeggingBroadcaster == 'Yes') && (!msg['tipped_recently']) && (!level) && (!HasTippedHigh())) { if (SearchMessage(msg['m'].toLowerCase(), PhrasesBegging)) { cb.chatNotice("ChatBot: " + msg['user'] + " please stop requesting. Get your money out or just enjoy the view.", msg['user'], '', '#ff0000', 'bold'); msg['X-Spam'] = true; ModeratorAnnouncement('Ponybot', msg['user'] + " got a warning for requesting/begging '" + msg['m'] + "'"); PonyStats['AutoSilencedMessages']++; return msg } } if ((!level) && (typeof(cb.settings.AutoSilenceKnownRude) != 'undefined') && (cb.settings.AutoSilenceKnownRude == 'Yes')) { if (SearchMessage(msg['m'].toLowerCase(), PhrasesRude)) { if (KnownRude.indexOf(userName) > -1) { cb.chatNotice("" + msg['user'] + " go away, we do not want rude retards in this room", msg['user'], '', '#ff0000', 'bold'); PonyStats['AutoSilencedMessages']++; msg['X-Spam'] = true } if (UserWarnings[userName] > 2) { KnownRude.push(userName); msg['m'] = '\u2020' + " I went full RETARD! now I am silenced..." } else { cb.chatNotice("ChatBot: " + msg['user'] + " please have a little respect", msg['user'], '', '#ff0000', 'bold'); msg['X-Spam'] = true; UserWarnings[userName] = (UserWarnings[userName] || 0) + 1; ModeratorAnnouncement('Ponybot', msg['user'] + " got a warning for being rude '" + msg['m'] + "'"); PonyStats['AutoSilencedMessages']++; return msg } } } if ((typeof(cb.settings.AutoSilenceKnownSpammers) != 'undefined') && (cb.settings.AutoSilenceKnownSpammers == 'Yes')) { if (SearchMessage(msg['m'].toLowerCase(), PhrasesSpam)) { if (UserWarnings[userName] > 0) { KnownSpammers.push(userName) } else { cb.chatNotice("ChatBot: " + msg['user'] + " please leave this room. Advertising is so retarded", msg['user'], '', '#ff0000', 'bold'); msg['X-Spam'] = true; UserWarnings[userName]++; ModeratorAnnouncement('Ponybot', msg['user'] + " got a warning for advertising '" + msg['m'] + "'"); PonyStats['AutoSilencedMessages']++; return msg } } if (KnownSpammers.indexOf(userName) > 2) { msg['X-Spam'] = true; cb.chatNotice("ChatBot: " + msg['user'] + " go away, we do not want spammers in this room", msg['user'], '', '#ff0000', 'bold'); PonyStats['AutoSilencedMessages']++; return msg } } if ((typeof(cb.settings.AutoSilenceKnownAbusers) != 'undefined') && (cb.settings.AutoSilenceKnownAbusers == 'Yes') && (KnownAbusers.indexOf(userName) > -1)) { msg['m'] = '\u2020' + " I went full RETARD!"; cb.chatNotice("" + msg['user'] + " go away, we do not want abusers in this room", msg['user'], '', '#ff0000', 'bold'); PonyStats['AutoSilencedMessages']++ } msg['m'] = AutoRemovePhrases(msg['m'], AutoRemoveGraphics) } if ((typeof(cb.settings.DisableGreyCaps) != 'undefined') && (cb.settings.DisableGreyCaps == 'Yes') && ((!msg['is_mod']) && (userName != cb.room_slug) && !level && !msg['tipped_recently'])) { msg['m'] = CleanCAPS(msg['m']) } if ((!level) && (!HasTipped(msg['user'])) && (msg['user'] !== cb.room_slug)) { if ((NoGraphics['grey']) && (!msg['has_tokens'])) { msg['m'] = msg['m'].replace(':', ':' + '\u00ad'); msg['m'] = msg['m'].replace(/:/g, ':' + '\u00ad') } else if ((NoGraphics['lblue']) && (msg['has_tokens'] && !msg['tipped_recently'])) { msg['m'] = msg['m'].replace(':', ':' + '\u00ad'); msg['m'] = msg['m'].replace(/:/g, ':' + '\u00ad') } else if ((NoGraphics['dblue']) && (msg['has_tokens'] && msg['tipped_recently'])) { msg['m'] = msg['m'].replace(':', ':' + '\u00ad'); msg['m'] = msg['m'].replace(/:/g, ':' + '\u00ad') } } if (msg['user'] == cb.room_slug) { msg['m'] = AutoTranslation(msg['m']).replace('*', '') } else { msg['m'] = AutoTranslation(msg['m']) } if ((msg['m'].substring(0, 1) != '/')) { if (userName == TipLeader['gold']) { msg['m'] = ":kloehazecrowngold : " + msg['m'] } if (userName == TipLeader['silver']) { msg['m'] = ":kloehazecrownsilver : " + msg['m'] } } if (IsMarried(msg['user'])) { msg['m'] = ":kloehazetophat : " + msg['m'] } if ((msg['user'] == cb.room_slug) && (caysexyactive)) { msg['m'] = ":kloehazesexygirl " + msg['m'] } if (!msg['m']) { msg['X-Spam'] = true } if ((!msg['has_tokens']) && (!level) && (!msg['is_mod']) && (userName != cb.room_slug)) { CheckTwitterChat(msg['m']) } return msg }); function HasTipped(userName) { if ((typeof(TrackUserTotalTips[userName]) == 'undefined') || (TrackUserTotalTips[userName] < 5)) { return 0 } else { return 1 } } function HasTippedHigh(userName) { if ((typeof(TrackUserTotalTips[userName]) == 'undefined') || (TrackUserTotalTips[userName] < 100)) { return 0 } else { return 1 } } function CheckTwitterChat(message) { if ((message.search(/twitter/i) > -1) && (message.search(/accept/i) > -1)) { AnnounceTwitterAccept(); return } if ((message.search(/twitter/i) > -1) && (message.search(/approve/i) > -1)) { AnnounceTwitterAccept(); return } if ((message.search(/twitter/i) > -1) && (message.search(/you have/i) > -1)) { AnnounceTwitterAccept(); return } } function AnnounceTwitterAccept() { var out = ''; out += "Twitter link is located left of the video feed." + "\n"; out += "Twitter requests are not accepted while Kloe is broadcasting." + "\n"; out += "She will accept requests as soon as possible. She is kinda busy right now."; cb.chatNotice(out, '', '', '#ff0000', 'bolder') } cb.onLeave(function(user) { var userName = user['user'].toLowerCase(); if (user['is_mod']) { TrackModerators('left', userName) } if (user['tipped_recently']) { var message = "Dark Blue, " + user['user'] + ", left the room"; var roomtime = TrackTime('get', userName); if (!isNaN(roomtime)) { message += " (in room for: " + roomtime + ")" } ModeratorAnnouncement('Notice', message) } if ((KnownHighTippers.indexOf(userName) > -1)) { var message = "Known High Tipper (1000" + '\u271b' + " tokens), " + user['user'] + ", left the room"; var roomtime = TrackTime('get', userName); if (!isNaN(roomtime)) { message += " (in room for: " + roomtime + ")" } ModeratorAnnouncement('Notice', message) } if ((KnownHugeTippers.indexOf(userName) > -1)) { var message = "Known HUGE Tipper (5000" + '\u271b' + " tokens), " + user['user'] + ", left the room"; var roomtime = TrackTime('get', userName); if (!isNaN(roomtime)) { message += " (in room for: " + roomtime + ")" } ModeratorAnnouncement('Notice', message) } var minutesonline = TrackTime("getminutes", userName); EntryTime[userName] = 0; if (minutesonline > 0) { if (UserStatus[userName] == "D") { PonyStats['MinutesInRoom_Dark'] += minutesonline } else if (UserStatus[userName] == "B") { PonyStats['MinutesInRoom_Light'] += minutesonline } else { PonyStats['MinutesInRoom_Grey'] += minutesonline } } }); function SnowBall(command, user, hit) { if (command == 'issuenew') { var minutesvalid = 3; if (SnowBall('hasvalidball', user, 0)) { TrackSnowBalls[user] = Math.round(+new Date() / 1000) + (minutesvalid * 60) } else { TrackSnowBalls[user] = Math.round(+new Date() / 1000) + (minutesvalid * 60); var out = ''; out += repeatStr('\u2014', 25) + '\n'; out += 'Snowball Game' + '\n'; out += user + ' you got a snowball you can throw at a user' + '\n'; out += 'type \'/hit username\' to throw the ball at \'username\'' + '\n'; out += 'type \'/guard username\' to guard \'username\' against other attackers' + '\n'; out += '** The snowball will melt if not used within 2 minutes' + '\n'; out += repeatStr('\u2014', 25) + ''; cb.chatNotice(out, user, '', '#0000FF', 'bold') } } if (command == 'hasvalidball') { var secondsleft = Math.round((TrackSnowBalls[user] - (+new Date() / 1000))); if (secondsleft > 0) { return 1 } else { return 0 } } if (command == 'guard') { if (!SnowBall('hasvalidball', user, 0)) { cb.chatNotice('SnowBall Game: You do not have any snowballs to guard with.', user, '', '#FF0000', 'bold') } else { GuardCounter = GuardCounter + 1; GuardTracking[GuardCounter] = user + "...." + hit; cb.chatNotice('SnowBall Game: You are now guarding ' + hit + ' from snow bullies.', user, '', '#0000FF', 'bold'); TrackSnowBalls[user] = 0 } } if (command == 'throw') { var out = ''; if (!SnowBall('hasvalidball', user, 0)) { cb.chatNotice('SnowBall Game: You do not have any snowballs to throw.', user, '', '#FF0000', 'bold') } else { TrackSnowBalls[user] = 0; if (hit == user) { var she = 'he'; var her = 'his'; if (cb.room_slug == user) { she = 'she'; her = 'her' } out += 'SnowBall Game:' + '\n'; out += user + ' threw a snowball straight up in the air, and it landed right in ' + her + ' face' + '\n'; out += user + ' is silenced for 3 minutes while ' + she + ' recovers' + ''; SilenceUser(user, 3); cb.chatNotice(out, '', '', '#0000FF', 'normal'); return 1 } var protectedby = ''; for (var i = 1; i <= GuardCounter; i++) { if ((!protectedby) && (GuardTracking[i].length > 0)) { var temp = GuardTracking[i].split("...."); if (temp[1] == hit) { protectedby = temp[0]; GuardTracking[i] = '' } } } if (protectedby.length > 0) { var she = 'he'; var her = 'his'; if (cb.room_slug == user) { she = 'she'; her = 'her' } var minutes = Math.floor(Math.random() * (10)) + 1; out += 'SnowBall Game: ' + user + ' threw a snowball at ' + hit + '.\n'; out += 'Unfortunately, ' + hit + ' was protected by ' + protectedby + ' who returns a ball at supersonic speed.' + '\n'; out += user + ' is silenced for ' + minutes + ' minutes while ' + she + ' recovers from the hit.' + ''; SilenceUser(user, minutes); cb.chatNotice(out, '', '', '#0000FF', 'normal'); return 1 } else { var minutes = Math.floor(Math.random() * (10)) - 3; out += 'SnowBall Game: ' + user + ' threw a snowball at ' + hit + '.\n'; if (minutes <= 0) { var randomnumber = Math.floor(Math.random() * (SnowBallMiss.length)); out += SnowBallMiss[randomnumber] + ''; cb.chatNotice(out, '', '', '#0000FF', 'normal'); return 1 } else { var she = 'he'; var her = 'his'; if (cb.room_slug == user) { she = 'she'; her = 'her' } var randomnumber = Math.floor(Math.random() * (SnowBallHit.length)); out += SnowBallHit[randomnumber] + '\n'; out += hit + ' is silenced for ' + minutes + ' minutes while ' + she + ' recovers from the hit.' + ''; SilenceUser(hit, minutes); cb.chatNotice(out, '', '', '#0000FF', 'normal'); return 1 } } } } } function numberWithDots(x) { return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ".") } function ShowPonyStats(to_user) { var out = ''; var temp = new Array(); out += repeatStr('\u2014', 25) + '\n'; out += 'Kloe\'s PonyBot - Statistics' + '\n'; out += 'PonyBot revision: ' + PonyBotDate + '\n'; out += repeatStr('\u2014', 25) + '\n'; out += 'PonyBot:' + '\n'; out += '. Known High Tippers (1000' + '\u271b' + '): ' + Math.floor(KnownHighTippers.length) + '\n'; out += '. Known Huge Tippers (5000' + '\u271b' + '): ' + Math.floor(KnownHugeTippers.length) + '\n'; out += '. Known Abusers (evil): ' + Math.floor(KnownAbusers.length) + '\n'; out += '. Known Rude: ' + Math.floor(KnownRude.length) + '\n'; out += '. Known Spammers: ' + Math.floor(KnownSpammers.length) + '\n'; out += '\n' + 'Session (since Bot started):' + '\n'; out += '. Total Messages: ' + numberWithDots(Math.floor(PonyStats['TotalMessages'])) + '\n'; out += '. Citizen Messages: ' + numberWithDots(Math.floor(PonyStats['CitizenMessages'])) + '\n'; out += '. Silenced Messages: ' + numberWithDots(Math.floor(PonyStats['AutoSilencedMessages'])) + '\n'; out += '\n'; out += '. Moderators online: ' + Math.floor(OnlineModerators.length) + '\n'; out += '. Visiting Citizens: ' + Math.floor(PonyStats['EnteringCitizens']) + '\n'; out += '. Visiting Dark Blues: ' + numberWithDots(Math.floor(PonyStats['EnteringDarkBlue'])) + '\n'; out += '. Visiting Light Blues: ' + numberWithDots(Math.floor(PonyStats['EnteringLightBlue'])) + '\n'; out += '. Visiting Greys: ' + numberWithDots(Math.floor(PonyStats['EnteringGrey'])) + '\n'; out += '. Visiting Known High Tippers: ' + Math.floor(PonyStats['EnteringKnownGreatTippers']) + '\n'; out += '. Visiting Known Huge Tippers: ' + Math.floor(PonyStats['EnteringKnownHugeTippers']) + '\n'; out += '\n'; if (!PonyStats['TippingCounter']) { PonyStats['TippingCounter'] = 1 } out += '. Total Tips: ' + numberWithDots(Math.floor(PonyStats['TotalTips'])) + ' tokens [\$' + numberWithDots(Math.floor(PonyStats['TotalTips'] / 20)) + '] (avg. ' + numberWithDots(Math.floor(PonyStats['TotalTips'] / PonyStats['TippingCounter'])) + '/tip)' + '\n'; out += '. Blues turned Grey: ' + Math.floor(PonyStats['BlueTurnedGrey']) + '\n'; out += '. Greys turned Blue: ' + Math.floor(PonyStats['GreyTurnedBlue']) + '\n'; out += '\n'; temp['B'] = 0; temp['D'] = 0; temp['G'] = 0; for (var key in EntryTime) { if (EntryTime[key] > 0) { var minutes = TrackTime("getminutes", key); if (UserStatus[key] == "D") { temp['D'] += minutes } else if (UserStatus[key] == "B") { temp['B'] += minutes } else { temp['G'] += minutes } } } out += '. Hours spent in room (Greys): ' + numberWithDots(Math.floor((PonyStats['MinutesInRoom_Grey'] + temp['G']) / 60)) + '\n'; out += '. Hours spent in room (Lblue): ' + numberWithDots(Math.floor((PonyStats['MinutesInRoom_Light'] + temp['B']) / 60)) + '\n'; out += '. Hours spent in room (Dblue): ' + numberWithDots(Math.floor((PonyStats['MinutesInRoom_Dark'] + temp['D']) / 60)) + '\n'; out += '..... (only counting time for users that have left the room)' + '\n'; out += repeatStr('\u2014', 25); cb.chatNotice(out, to_user, '', '#000000', 'normal') } function getHelpInformation(to_user, is_mod) { var out = ''; out += repeatStr('\u2014', 25) + '\n'; out += 'Kloeville Bot (PonyBot)' + '\n'; out += 'PonyBot revision: ' + PonyBotDate + '\n'; out += repeatStr('\u2014', 25) + '\n'; out += 'Commands:' + '\n'; if (!is_mod) { out += '/addcitizen <username> <citizenship>' + '\n'; out += '/marriage <price> (0=off)' + '\n'; out += '/husbands - will list current husband-string' + '\n'; out += '/sexygfx : turns on/off your sexygirl-gfx' + '\n'; out += '/nogfx <grey/lblue/dblue> : Turn on or off graphics for a group. Tippers and citizens excluded.' + '\n'; out += '\n' } out += '/silencegreys <minutes> : Silence Non-tipping Greys and Light Blue' + '\n'; out += '/unsilencegreys : UnSilence Greys' + '\n'; out += '/silence <user> <minutes> : Silence User' + '\n'; out += '/unsilence <user> : UnSilence user' + '\n'; out += '/system <on/off> : System Messages ON or OFF' + '\n'; out += '/ponybot <on/off> : PonyBot Messages ON or OFF' + '\n'; out += '/notice <on/off> : Notices ON or OFF' + '\n'; out += '/noticehigh <on/off> : High Priority Notices ON or OFF' + '\n'; if ((typeof(cb.settings.ModeratorTipNotes) != 'undefined') && (cb.settings.ModeratorTipNotes == 'Yes')) { out += '/tipnotes <on/off> : Show/Hide tipnotes from low tippers' + '\n' } out += '/ponystats : Some statistics' + '\n'; out += '/bothelp /help /ponyhelp /commands : This short help information' + '\n'; out += repeatStr('\u2014', 25); cb.chatNotice(out, to_user, '', '', 'normal') } function CheckCitizen(userName) { if (KnownCitizens_Godlike.indexOf(userName) > -1) { return "Godlike" } else if (KnownCitizens_Imperial.indexOf(userName) > -1) { return "Imperial" } else if (KnownCitizens_Senator.indexOf(userName) > -1) { return "Senator" } else if (KnownCitizens_Equestrian.indexOf(userName) > -1) { return "Equestrian" } else if (KnownCitizens_Patrician.indexOf(userName) > -1) { return "Patrician" } else { return "" } } function RemoveCitizenTags(message) { message = message.replace('[Godlike]', ""); message = message.replace('[godlike]', ""); message = message.replace('[Imperial]', ""); message = message.replace('[imperial]', ""); message = message.replace('[Senator]', ""); message = message.replace('[senator]', ""); message = message.replace('[Equestrian]', ""); message = message.replace('[equestrian]', ""); message = message.replace('[Patrician]', ""); message = message.replace('[patrician]', ""); return message } function HasRepeatedLetters(string) { var patt = /(.)\1{6,}/ig; var result = patt.test(string); return result } function AutoTranslation(message) { var words = message.split(" "); var cword = []; for (var i = 0; i < words.length; i++) { for (var key in PhrasesTranslate) { if (words[i].toLowerCase() == key) { words[i] = PhrasesTranslate[key] } } cword.push(words[i]) } return cword.join(' ') } function CleanCAPS(message) { var words = message.split(" "); var cword = []; for (var i = 0; i < words.length; i++) { if (((words[i]).search(":") < 0) && ((words[i]).match(/\b([A-Z]{2,})\b/g))) { cword.push(words[i].toLowerCase()) } else { cword.push(words[i]) } } return cword.join(' ') } function AutoRemovePhrases(message, wordarray) { for (var i = 0; i < wordarray.length; i++) { message = message.replace(wordarray[i], "") } return message } function SearchMessage(message, wordarray) { for (var i = 0; i < wordarray.length; i++) { if (message == wordarray[i]) { return 1 } if (message.search(" " + wordarray[i]) > -1) { return 1 } if (message.search(wordarray[i] + " ") > -1) { return 1 } } return 0 } function AnnounceCitizen(userName, level) { var out = ''; out += repeatStr('\u2014', 25) + '\n'; out += '\u203a ' + 'We all bow to the citizen of Kloeville' + '\n'; out += '\u203a ' + level + ' ' + userName + ' entered the room' + '\n'; out += repeatStr('\u2014', 25); cb.chatNotice(out, '', '', '#0000ff', 'bold') } function PonyBotEntryInformation(userName) { var out = ''; out += repeatStr('\u2014', 25) + '\n'; out += '\u203a ' + 'Kloeville PonyBot is guarding this room' + '\n'; out += '\u203a ' + 'Please show common respect for everyone in here' + '\n'; out += '\u203a ' + 'Enjoy and have fun' + '\n'; out += repeatStr('\u2014', 25); cb.chatNotice(out, userName, '', '#ff0000', 'bold') } function repeatStr(string, counter) { var temp = ''; for (x = 1; x <= counter; x++) { temp += string } return temp } function capitalize(string) { return string.charAt(0).toUpperCase() + string.slice(1).toLowerCase() } function CelebrateTurningGrey(user) { var out = ''; out += repeatStr('\u2014', 25) + '\n'; out += '\u203a ' + 'YAAAAAY... ' + user + ' turned GREY for Kloe' + '\n'; out += '\u203a ' + 'We bow our heads in total respect' + '\n'; out += repeatStr('\u2014', 25); cb.chatNotice(out, '', '', '#0000ff', 'bold') } function CelebrateTurningBlue(user) { var out = ''; out += repeatStr('\u2014', 25) + '\n'; out += '\u203a ' + 'YAAAAAY... ' + user + ' turned BLUE' + '\n'; out += repeatStr('\u2014', 25); cb.chatNotice(out, '', '', '#0000ff', 'bold') } function CelebrateNewCitizen(user, newlevel) { var level = CheckCitizen(user); if (newlevel == "godlike") { KnownCitizens_Godlike.push(user) } if (newlevel == "senator") { KnownCitizens_Senator.push(user) } if (newlevel == "imperial") { KnownCitizens_Imperial.push(user) } if (newlevel == "equestrian") { KnownCitizens_Equestrian.push(user) } if (newlevel == "patrician") { KnownCitizens_Patrician.push(user) } var out = ''; out += repeatStr('\u2014', 40) + '\n'; out += '\u203a ' + 'WE HAVE A NEW CITIZEN' + '\n'; out += repeatStr('\u2014', 40) + '\n'; out += '\u203a ' + 'The Queen of Kloeville has given \'' + user + '\' the title of ' + capitalize(newlevel) + '\n'; if (level) { out += '\u203a ' + 'This is not ' + user + '\'s first citizenship to Kloeville' + '\n' } out += '\u203a ' + 'All the citizens of Kloeville bids ' + capitalize(newlevel) + ' ' + user + ' a warm welcome' + '\n'; out += repeatStr('\u2014', 40); cb.chatNotice(out, '', '#dfffb2', '#0000ff', 'bold') } function ItsATrap(userName) { if (!IsMarried(userName)) { TrackHusbands.push(userName); var rightNow = new Date(); var daystring = rightNow.toISOString().slice(0, 10).replace(/-/g, ""); TrackHusbandMarriage[userName] = daystring; var number = TrackHusbands.length; var out = ''; out += repeatStr('\u2014', 40) + '\n'; out += '\u203a ' + 'NEW HUSBAND:' + '\n'; out += '\u203a ' + 'With that ' + HusbandPrice + ' token tip, ' + userName + ' is now married to Kloe' + '\n'; out += '\u203a ' + "She now owns half " + userName + "'s shit, sorry, it's the rules of the room." + '\n'; out += '\u203a ' + 'Good luck! (husband #' + number + ')' + '\n'; out += repeatStr('\u2014', 40); cb.chatNotice(out, '', '', '#0000ff', 'bold') } } function IsMarried(userName) { if (TrackHusbands.indexOf(userName) < 0) { return 0 } else { return 1 } } function TrackModerators(type, userName) { if (type == "entered") { var pos = OnlineModerators.indexOf(userName); if (pos < 0) { OnlineModerators.push(userName) } TrackSystemMessages('on', userName); TrackNoticeHigh('on', userName) } if (type == "left") { var pos = OnlineModerators.indexOf(userName); if (pos > -1) { OnlineModerators.splice(pos, 1) } TrackTipNotes('off', userName); TrackNotice('off', userName); TrackPonyBot('off', userName); TrackSystemMessages('off', userName); TrackNoticeHigh('off', userName) } } function TrackSystemMessages(type, userName) { if (type == "on") { var pos = SystemMessagesOn.indexOf(userName); if (pos < 0) { SystemMessagesOn.push(userName) } } if (type == "off") { var pos = SystemMessagesOn.indexOf(userName); if (pos > -1) { SystemMessagesOn.splice(pos, 1) } } } function TrackTipNotes(type, userName) { if (type == "on") { var pos = ModeratorTipNotesOn.indexOf(userName); if (pos < 0) { ModeratorTipNotesOn.push(userName) } } if (type == "off") { var pos = ModeratorTipNotesOn.indexOf(userName); if (pos > -1) { ModeratorTipNotesOn.splice(pos, 1) } } } function TrackNotice(type, userName) { if (type == "on") { var pos = SystemNoticeOn.indexOf(userName); if (pos < 0) { SystemNoticeOn.push(userName) } } if (type == "off") { var pos = SystemNoticeOn.indexOf(userName); if (pos > -1) { SystemNoticeOn.splice(pos, 1) } } } function TrackNoticeHigh(type, userName) { if (type == "on") { var pos = SystemNoticeHighOn.indexOf(userName); if (pos < 0) { SystemNoticeHighOn.push(userName) } } if (type == "off") { var pos = SystemNoticeHighOn.indexOf(userName); if (pos > -1) { SystemNoticeHighOn.splice(pos, 1) } } } function TrackPonyBot(type, userName) { if (type == "on") { var pos = SystemPonybotOn.indexOf(userName); if (pos < 0) { SystemPonybotOn.push(userName) } } if (type == "off") { var pos = SystemPonybotOn.indexOf(userName); if (pos > -1) { SystemPonybotOn.splice(pos, 1) } } } function ModeratorAnnouncement(type, message) { if (type == 'System') { if (SystemMessagesOn.length > 0) { for (var i = 0; i < SystemMessagesOn.length; i++) { cb.chatNotice("PonyBot: " + message, SystemMessagesOn[i], '', '#0000ff', 'normal') } } } if (type == 'Ponybot') { if (SystemPonybotOn.length > 0) { for (var i = 0; i < SystemPonybotOn.length; i++) { cb.chatNotice("PonyBot: " + message, SystemPonybotOn[i], '', '#000000', 'normal') } } } if (type == 'Notice') { if (SystemNoticeOn.length > 0) { for (var i = 0; i < SystemNoticeOn.length; i++) { cb.chatNotice("PonyBot: " + message, SystemNoticeOn[i], '', '#000000', 'normal') } } } if (type == 'NoticeHigh') { if (SystemNoticeHighOn.length > 0) { for (var i = 0; i < SystemNoticeHighOn.length; i++) { cb.chatNotice("PonyBot: " + message, SystemNoticeHighOn[i], '', '#0000ff', 'normal') } } } if (type == 'TipNote') { if (ModeratorTipNotesOn.length > 0) { for (var i = 0; i < ModeratorTipNotesOn.length; i++) { cb.chatNotice("PonyBot: " + message, ModeratorTipNotesOn[i], '', '#0000ff', 'normal') } } } } function TrackUserStatus(type, userName, hastokens, isdarkblue) { if (type == "set") { if (isdarkblue) { UserStatus[userName] = 'D' } else if (hastokens) { UserStatus[userName] = 'B' } else { UserStatus[userName] = 'G' } } if (type == "get") { return UserStatus[userName] } } function TrackTime(type, userName) { if (type == "set") { var out = ""; if (EntryTime[userName] > 0) { out = " AGAIN" } EntryTime[userName] = Math.round(+new Date() / 1000); return out } if (type == "get") { var differenceSec = Math.round(+new Date() / 1000) - EntryTime[userName]; if ((differenceSec / 60 > 5)) { return Math.floor(differenceSec / 60) + " minutes" } else { return differenceSec + " seconds" } } if (type == "getminutes") { if (EntryTime[userName] > 0) { var differenceSec = Math.round(+new Date() / 1000) - EntryTime[userName]; return Math.floor(differenceSec / 60) } else { return 0 } } } function CheckIsSilenced(user) { var seconds = Math.round((TrackSilencedUsers[user] - (+new Date() / 1000))); if (seconds > 0) { return seconds } else { return 0 } } function SilenceAllGreys(minutes, whosilenced) { cb.chatNotice(whosilenced + ' silenced all Greys/Light Blues for ' + minutes + ' minutes, enjoy the sound of silence', '', '', '#0000ff', 'bold'); GreySilenceLastAnnounced = Math.round(+new Date() / 1000); if (CheckIsSilenced('ALLGREYS') > 0) { TrackSilencedUsers['ALLGREYS'] += (minutes * 60) } else { TrackSilencedUsers['ALLGREYS'] = Math.round(+new Date() / 1000) + (minutes * 60) } } function SilenceUser(who, minutes) { if (CheckIsSilenced(who) > 0) { TrackSilencedUsers[who] += (minutes * 60) } else { TrackSilencedUsers[who] = Math.round(+new Date() / 1000) + (minutes * 60) } } function RunEveryMinute() { if (CheckIsSilenced['ALLGREYS'] > 0) { if (5 < (Math.floor((Math.round(+new Date() / 1000) - GreySilenceLastAnnounced) / 60))) { var seconds = CheckIsSilenced('ALLGREYS'); var foranother = seconds + " seconds"; if (seconds > 130) { foranother = Math.floor(seconds / 60) + " minutes" } cb.chatNotice("PonyBot: ALL GREYS/Light Blues are still silenced for about another " + foranother, '', '', '#0000ff', ''); GreySilenceLastAnnounced = Math.round(+new Date() / 1000) } } cb.setTimeout(RunEveryMinute, (60000)) } cb.setTimeout(RunEveryMinute, (60000)); function UpdateTopTippers() { LeaderBoardSort() } function ShowLeaderBoard(to_user, fullLB) { var minamount = 111; var sorted = LeaderBoardSort(); var l = fullLB ? sorted.length : 5; var out = '', user = '', rank = 0; var cnt = 0; out += repeatStr('\u2014', 25) + '\n'; out += 'PonyBot Tip LeaderBoard' + '\n'; out += repeatStr('\u2014', 25) + '\n'; for (rank = 0; rank < l; rank++) { if (rank < sorted.length) { user = sorted[rank][2]; if ((minamount <= TrackUserTotalTips[user]) || (!fullLB)) { out += (rank + 1) + '. ' + user + ' (' + TrackUserTotalTips[user] + ' token' + (TrackUserTotalTips[user] != 1 ? 's' : '') + ')' + '\n'; cnt = cnt + 1 } } } if (cnt < 6) { for (x = cnt + 1; x < 6; x++) { out += x + '. ----------' + '\n' } } out += repeatStr('\u2014', 25); if (to_user == 'all') { if (sorted.length > 0) { cb.chatNotice(out); LeaderBoardLastShown = Math.round(+new Date() / 1000) } } else { if (sorted.length > 0) { cb.chatNotice(out, to_user) } else { cb.chatNotice('LeaderBoard is empty', to_user) } } } function GetLeaderBoardPosition(userName) { var sorted = LeaderBoardSort(); var position = 0; if (!sorted.length) { return 0 } for (var user in sorted) { if (sorted.hasOwnProperty(user)) { position = position + 1; if (user == userName) { return position } } } return 0 } function LeaderBoardSort() { var lb = []; for (var user in TrackUserTotalTips) { if (TrackUserTotalTips.hasOwnProperty(user)) { lb.push([TrackUserTotalTips[user], -TrackUserLastTip[user], user]) } } if (lb.length > 0) { lb.sort(function(a, b) { var r, i; for (i = 0; i < a.length; i++) { if (a[i] < b[i]) { return 1 } if (a[i] > b[i]) { return -1 } } return 0 }) } if (lb.length > 0) { TipLeader['gold'] = lb[0][2] } if (lb.length > 1) { TipLeader['silver'] = lb[1][2] } return lb }
© Copyright Chaturbate 2011- 2026. All Rights Reserved.