Apps Home
|
Create an App
KimberleysWordTestapp
Author:
jesusweptdev
Description
Source Code
Launch App
Current Users
Created by:
Jesusweptdev
cb.log("TWTEST Initializing Start"); cb.log("Creating Group member Arrays"); var group1Members = {}; var group2Members = {}; var group3Members = {}; var group4Members = {}; var group5Members = {}; var group6Members = {}; var group7Members = {}; var group8Members = {}; var group9Members = {}; var group10Members = {}; var group11Members = {}; var group12Members = {}; var group13Members = {}; var group14Members = {}; var group15Members = {}; var blockMembers = {}; cb.log("Setting minimum tips for each Group"); var group1MinTip = 15; var group2MinTip = 14; var group3MinTip = 13; var group4MinTip = 12; var group5MinTip = 11; var group6MinTip = 10; var group7MinTip = 9; var group8MinTip = 8; var group9MinTip = 7; var group10MinTip = 6; var group11MinTip = 5; var group12MinTip = 4; var group13MinTip = 3; var group14MinTip = 2; var group15MinTip = 1; var twcRegex = /t.?k.?n.?wh.?r.?_c.?nt.?/i; cb.settings_choices = [ {name: 'blockMemberList', label: 'List of Blocked Users, separated by commas', minLength: 0, maxLength: 10240, required: false, defaultValue: ''}, {name: 'group1Name', label: 'Name Of Group1', type: 'str', minLength: 0, maxLength: 10, required: false, defaultValue: 'Whatever'}, {name: 'group1Text', label: 'Text to put in front of Group1 Messages', type: 'str', minLength: 0, maxLength: 10, required: false, defaultValue: 'Whatever'}, {name: 'group1Emote', label: 'Emoticon to put in front of Group1 messages', type: 'str', minLength: 0, maxLength: 10, required: false, defaultValue: ''}, {name: 'group1BGColor', label: 'Group1 Text background color (000000 is black)', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: 'd7dc42'}, {name: 'group1MinTip',label: 'Minimum tip to become a Group1 Member', type: 'int', minValue: 1, defaultValue: 1000}, {name: 'group1Announce',label: 'Text to show when someone tips to become Group1',type: 'str', minLength: 0, maxLength: 10240, required: false,defaultValue: 'MEMBERNAME became a Whatever'}, {name: 'group1MemberList', label: 'List of current Group1 Members, separated by commas',type: 'str', minLength: 0, maxLength: 10240, required: false, defaultValue: ''}, {name: 'group1RainText', label: 'Text to use for Group1 rain lines',type: 'str', minLength: 0, maxLength: 80, required: false,defaultValue: 'Kimberleys World has a new Whatever!'}, {name: 'group1RainCount', label: 'Number of lines of to annnounce their membership',type: 'int', minValue: 1, maxValue: 15, defaultValue: 15}, {name: 'group1EmoteEnter', label: 'Emoticon for Group1 Users',type: 'str', minLength: 0, maxLength: 20, required: false, defaultValue: ''}, {name: 'group1EnterRoom',label: 'Text to display when Group1 Member Enters the Room',type: 'str', minLength: 0, maxLength: 10240, required: false,defaultValue: 'has entered the room!'}, {name: 'group1BGEnter', label: 'Background Color for when Group1 enters the Room',type: 'str', minLength: 0, maxLength: 7, required: false, defaultValue: '#d7dc42'}, {name: 'group2Name', label: 'Name Of group2', type: 'str', minLength: 0, maxLength: 10, required: false, defaultValue: 'Whatever'}, {name: 'group2Text', label: 'Text to put in front of group2 Messages', type: 'str', minLength: 0, maxLength: 10, required: false, defaultValue: 'Whatever'}, {name: 'group2Emote', label: 'Emoticon to put in front of group2 messages', type: 'str', minLength: 0, maxLength: 10, required: false, defaultValue: ''}, {name: 'group2BGColor', label: 'group2 Text background color (000000 is black)', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: 'd7dc42'}, {name: 'group2MinTip',label: 'Minimum tip to become a group2 Member', type: 'int', minValue: 1, defaultValue: 1000}, {name: 'group2Announce',label: 'Text to show when someone tips to become group2',type: 'str', minLength: 0, maxLength: 10240, required: false,defaultValue: 'MEMBERNAME became a Whatever'}, {name: 'group2MemberList', label: 'List of current group2 Members, separated by commas',type: 'str', minLength: 0, maxLength: 10240, required: false, defaultValue: ''}, {name: 'group2RainText', label: 'Text to use for group2 rain lines',type: 'str', minLength: 0, maxLength: 80, required: false,defaultValue: 'Kimberleys World has a new Whatever!'}, {name: 'group2RainCount', label: 'Number of lines of to annnounce their membership',type: 'int', minValue: 1, maxValue: 15, defaultValue: 15}, {name: 'group2EmoteEnter', label: 'Emoticon for group2 Users',type: 'str', minLength: 0, maxLength: 20, required: false, defaultValue: ''}, {name: 'group2EnterRoom',label: 'Text to display when group2 Member Enters the Room',type: 'str', minLength: 0, maxLength: 10240, required: false,defaultValue: 'has entered the room!'}, {name: 'group2BGEnter', label: 'Background Color for when group2 enters the Room',type: 'str', minLength: 0, maxLength: 7, required: false, defaultValue: '#d7dc42'}, {name: 'group3Name', label: 'Name Of group3', type: 'str', minLength: 0, maxLength: 10, required: false, defaultValue: 'Whatever'}, {name: 'group3Text', label: 'Text to put in front of group3 Messages', type: 'str', minLength: 0, maxLength: 10, required: false, defaultValue: 'Whatever'}, {name: 'group3Emote', label: 'Emoticon to put in front of group3 messages', type: 'str', minLength: 0, maxLength: 10, required: false, defaultValue: ''}, {name: 'group3BGColor', label: 'group3 Text background color (000000 is black)', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: 'd7dc42'}, {name: 'group3MinTip',label: 'Minimum tip to become a group3 Member', type: 'int', minValue: 1, defaultValue: 1000}, {name: 'group3Announce',label: 'Text to show when someone tips to become group3',type: 'str', minLength: 0, maxLength: 10240, required: false,defaultValue: 'MEMBERNAME became a Whatever'}, {name: 'group3MemberList', label: 'List of current group3 Members, separated by commas',type: 'str', minLength: 0, maxLength: 10240, required: false, defaultValue: ''}, {name: 'group3RainText', label: 'Text to use for group3 rain lines',type: 'str', minLength: 0, maxLength: 80, required: false,defaultValue: 'Kimberleys World has a new Whatever!'}, {name: 'group3RainCount', label: 'Number of lines of to annnounce their membership',type: 'int', minValue: 1, maxValue: 15, defaultValue: 15}, {name: 'group3EmoteEnter', label: 'Emoticon for group3 Users',type: 'str', minLength: 0, maxLength: 20, required: false, defaultValue: ''}, {name: 'group3EnterRoom',label: 'Text to display when group3 Member Enters the Room',type: 'str', minLength: 0, maxLength: 10240, required: false,defaultValue: 'has entered the room!'}, {name: 'group3BGEnter', label: 'Background Color for when group3 enters the Room',type: 'str', minLength: 0, maxLength: 7, required: false, defaultValue: '#d7dc42'}, {name: 'group4Name', label: 'Name Of group4', type: 'str', minLength: 0, maxLength: 10, required: false, defaultValue: 'Whatever'}, {name: 'group4Text', label: 'Text to put in front of group4 Messages', type: 'str', minLength: 0, maxLength: 10, required: false, defaultValue: 'Whatever'}, {name: 'group4Emote', label: 'Emoticon to put in front of group4 messages', type: 'str', minLength: 0, maxLength: 10, required: false, defaultValue: ''}, {name: 'group4BGColor', label: 'group4 Text background color (000000 is black)', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: 'd7dc42'}, {name: 'group4MinTip',label: 'Minimum tip to become a group4 Member', type: 'int', minValue: 1, defaultValue: 1000}, {name: 'group4Announce',label: 'Text to show when someone tips to become group4',type: 'str', minLength: 0, maxLength: 10240, required: false,defaultValue: 'MEMBERNAME became a Whatever'}, {name: 'group4MemberList', label: 'List of current group4 Members, separated by commas',type: 'str', minLength: 0, maxLength: 10240, required: false, defaultValue: ''}, {name: 'group4RainText', label: 'Text to use for group4 rain lines',type: 'str', minLength: 0, maxLength: 80, required: false,defaultValue: 'Kimberleys World has a new Whatever!'}, {name: 'group4RainCount', label: 'Number of lines of to annnounce their membership',type: 'int', minValue: 1, maxValue: 15, defaultValue: 15}, {name: 'group4EmoteEnter', label: 'Emoticon for group4 Users',type: 'str', minLength: 0, maxLength: 20, required: false, defaultValue: ''}, {name: 'group4EnterRoom',label: 'Text to display when group4 Member Enters the Room',type: 'str', minLength: 0, maxLength: 10240, required: false,defaultValue: 'has entered the room!'}, {name: 'group4BGEnter', label: 'Background Color for when group4 enters the Room',type: 'str', minLength: 0, maxLength: 7, required: false, defaultValue: '#d7dc42'}, {name: 'group5Name', label: 'Name Of group5', type: 'str', minLength: 0, maxLength: 10, required: false, defaultValue: 'Whatever'}, {name: 'group5Text', label: 'Text to put in front of group5 Messages', type: 'str', minLength: 0, maxLength: 10, required: false, defaultValue: 'Whatever'}, {name: 'group5Emote', label: 'Emoticon to put in front of group5 messages', type: 'str', minLength: 0, maxLength: 10, required: false, defaultValue: ''}, {name: 'group5BGColor', label: 'group5 Text background color (000000 is black)', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: 'd7dc42'}, {name: 'group5MinTip',label: 'Minimum tip to become a group5 Member', type: 'int', minValue: 1, defaultValue: 1000}, {name: 'group5Announce',label: 'Text to show when someone tips to become group5',type: 'str', minLength: 0, maxLength: 10240, required: false,defaultValue: 'MEMBERNAME became a Whatever'}, {name: 'group5MemberList', label: 'List of current group5 Members, separated by commas',type: 'str', minLength: 0, maxLength: 10240, required: false, defaultValue: ''}, {name: 'group5RainText', label: 'Text to use for group5 rain lines',type: 'str', minLength: 0, maxLength: 80, required: false,defaultValue: 'Kimberleys World has a new Whatever!'}, {name: 'group5RainCount', label: 'Number of lines of to annnounce their membership',type: 'int', minValue: 1, maxValue: 15, defaultValue: 15}, {name: 'group5EmoteEnter', label: 'Emoticon for group5 Users',type: 'str', minLength: 0, maxLength: 20, required: false, defaultValue: ''}, {name: 'group5EnterRoom',label: 'Text to display when group5 Member Enters the Room',type: 'str', minLength: 0, maxLength: 10240, required: false,defaultValue: 'has entered the room!'}, {name: 'group5BGEnter', label: 'Background Color for when group5 enters the Room',type: 'str', minLength: 0, maxLength: 7, required: false, defaultValue: '#d7dc42'}, {name: 'group6Name', label: 'Name Of group6', type: 'str', minLength: 0, maxLength: 10, required: false, defaultValue: 'Whatever'}, {name: 'group6Text', label: 'Text to put in front of group6 Messages', type: 'str', minLength: 0, maxLength: 10, required: false, defaultValue: 'Whatever'}, {name: 'group6Emote', label: 'Emoticon to put in front of group6 messages', type: 'str', minLength: 0, maxLength: 10, required: false, defaultValue: ''}, {name: 'group6BGColor', label: 'group6 Text background color (000000 is black)', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: 'd7dc42'}, {name: 'group6MinTip',label: 'Minimum tip to become a group6 Member', type: 'int', minValue: 1, defaultValue: 1000}, {name: 'group6Announce',label: 'Text to show when someone tips to become group6',type: 'str', minLength: 0, maxLength: 10240, required: false,defaultValue: 'MEMBERNAME became a Whatever'}, {name: 'group6MemberList', label: 'List of current group6 Members, separated by commas',type: 'str', minLength: 0, maxLength: 10240, required: false, defaultValue: ''}, {name: 'group6RainText', label: 'Text to use for group6 rain lines',type: 'str', minLength: 0, maxLength: 80, required: false,defaultValue: 'Kimberleys World has a new Whatever!'}, {name: 'group6RainCount', label: 'Number of lines of to annnounce their membership',type: 'int', minValue: 1, maxValue: 15, defaultValue: 15}, {name: 'group6EmoteEnter', label: 'Emoticon for group6 Users',type: 'str', minLength: 0, maxLength: 20, required: false, defaultValue: ''}, {name: 'group6EnterRoom',label: 'Text to display when group6 Member Enters the Room',type: 'str', minLength: 0, maxLength: 10240, required: false,defaultValue: 'has entered the room!'}, {name: 'group6BGEnter', label: 'Background Color for when group6 enters the Room',type: 'str', minLength: 0, maxLength: 7, required: false, defaultValue: '#d7dc42'}, {name: 'group7Name', label: 'Name Of group7', type: 'str', minLength: 0, maxLength: 10, required: false, defaultValue: 'Whatever'}, {name: 'group7Text', label: 'Text to put in front of group7 Messages', type: 'str', minLength: 0, maxLength: 10, required: false, defaultValue: 'Whatever'}, {name: 'group7Emote', label: 'Emoticon to put in front of group7 messages', type: 'str', minLength: 0, maxLength: 10, required: false, defaultValue: ''}, {name: 'group7BGColor', label: 'group7 Text background color (000000 is black)', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: 'd7dc42'}, {name: 'group7MinTip',label: 'Minimum tip to become a group7 Member', type: 'int', minValue: 1, defaultValue: 1000}, {name: 'group7Announce',label: 'Text to show when someone tips to become group7',type: 'str', minLength: 0, maxLength: 10240, required: false,defaultValue: 'MEMBERNAME became a Whatever'}, {name: 'group7MemberList', label: 'List of current group7 Members, separated by commas',type: 'str', minLength: 0, maxLength: 10240, required: false, defaultValue: ''}, {name: 'group7RainText', label: 'Text to use for group7 rain lines',type: 'str', minLength: 0, maxLength: 80, required: false,defaultValue: 'Kimberleys World has a new Whatever!'}, {name: 'group7RainCount', label: 'Number of lines of to annnounce their membership',type: 'int', minValue: 1, maxValue: 15, defaultValue: 15}, {name: 'group7EmoteEnter', label: 'Emoticon for group7 Users',type: 'str', minLength: 0, maxLength: 20, required: false, defaultValue: ''}, {name: 'group7EnterRoom',label: 'Text to display when group7 Member Enters the Room',type: 'str', minLength: 0, maxLength: 10240, required: false,defaultValue: 'has entered the room!'}, {name: 'group7BGEnter', label: 'Background Color for when group7 enters the Room',type: 'str', minLength: 0, maxLength: 7, required: false, defaultValue: '#d7dc42'}, {name: 'group8Name', label: 'Name Of group8', type: 'str', minLength: 0, maxLength: 10, required: false, defaultValue: 'Whatever'}, {name: 'group8Text', label: 'Text to put in front of group8 Messages', type: 'str', minLength: 0, maxLength: 10, required: false, defaultValue: 'Whatever'}, {name: 'group8Emote', label: 'Emoticon to put in front of group8 messages', type: 'str', minLength: 0, maxLength: 10, required: false, defaultValue: ''}, {name: 'group8BGColor', label: 'group8 Text background color (000000 is black)', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: 'd7dc42'}, {name: 'group8MinTip',label: 'Minimum tip to become a group8 Member', type: 'int', minValue: 1, defaultValue: 1000}, {name: 'group8Announce',label: 'Text to show when someone tips to become group8',type: 'str', minLength: 0, maxLength: 10240, required: false,defaultValue: 'MEMBERNAME became a Whatever'}, {name: 'group8MemberList', label: 'List of current group8 Members, separated by commas',type: 'str', minLength: 0, maxLength: 10240, required: false, defaultValue: ''}, {name: 'group8RainText', label: 'Text to use for group8 rain lines',type: 'str', minLength: 0, maxLength: 80, required: false,defaultValue: 'Kimberleys World has a new Whatever!'}, {name: 'group8RainCount', label: 'Number of lines of to annnounce their membership',type: 'int', minValue: 1, maxValue: 15, defaultValue: 15}, {name: 'group8EmoteEnter', label: 'Emoticon for group8 Users',type: 'str', minLength: 0, maxLength: 20, required: false, defaultValue: ''}, {name: 'group8EnterRoom',label: 'Text to display when group8 Member Enters the Room',type: 'str', minLength: 0, maxLength: 10240, required: false, defaultValue: 'MEMBERNAME entered the room!'}, {name: 'group8BGEnter', label: 'Background Color for when group8 enters the Room',type: 'str', minLength: 0, maxLength: 7, required: false, defaultValue: '#d7dc42'}, {name: 'group9Name', label: 'Name Of group9', type: 'str', minLength: 0, maxLength: 10, required: false, defaultValue: 'Whatever'}, {name: 'group9Text', label: 'Text to put in front of group9 Messages', type: 'str', minLength: 0, maxLength: 10, required: false, defaultValue: 'Whatever'}, {name: 'group9Emote', label: 'Emoticon to put in front of group9 messages', type: 'str', minLength: 0, maxLength: 10, required: false, defaultValue: ''}, {name: 'group9BGColor', label: 'group9 Text background color (000000 is black)', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: 'd7dc42'}, {name: 'group9MinTip',label: 'Minimum tip to become a group9 Member', type: 'int', minValue: 1, defaultValue: 1000}, {name: 'group9Announce',label: 'Text to show when someone tips to become group9',type: 'str', minLength: 0, maxLength: 10240, required: false,defaultValue: 'MEMBERNAME became a Whatever'}, {name: 'group9MemberList', label: 'List of current group9 Members, separated by commas',type: 'str', minLength: 0, maxLength: 10240, required: false, defaultValue: ''}, {name: 'group9RainText', label: 'Text to use for group9 rain lines',type: 'str', minLength: 0, maxLength: 80, required: false,defaultValue: 'Kimberleys World has a new Whatever!'}, {name: 'group9RainCount', label: 'Number of lines of to annnounce their membership',type: 'int', minValue: 1, maxValue: 15, defaultValue: 15}, {name: 'group9EmoteEnter', label: 'Emoticon for group9 Users',type: 'str', minLength: 0, maxLength: 20, required: false, defaultValue: ''}, {name: 'group9EnterRoom',label: 'Text to display when group9 Member Enters the Room',type: 'str', minLength: 0, maxLength: 10240, required: false,defaultValue:'MEMBERNAME has entered the room!'}, {name: 'group9BGEnter', label: 'Background Color for when group9 enters the Room',type: 'str', minLength: 0, maxLength: 7, required: false, defaultValue: '#d7dc42'}, {name: 'group10Name', label: 'Name Of group10', type: 'str', minLength: 0, maxLength: 10, required: false, defaultValue: 'Whatever'}, {name: 'group10Text', label: 'Text to put in front of group10 Messages', type: 'str', minLength: 0, maxLength: 10, required: false, defaultValue: 'Whatever'}, {name: 'group10Emote', label: 'Emoticon to put in front of group10 messages', type: 'str', minLength: 0, maxLength: 10, required: false, defaultValue: ''}, {name: 'group10BGColor', label: 'group10 Text background color (000000 is black)', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: 'd7dc42'}, {name: 'group10MinTip',label: 'Minimum tip to become a group10 Member', type: 'int', minValue: 1, defaultValue: 1000}, {name: 'group10Announce',label: 'Text to show when someone tips to become group10',type: 'str', minLength: 0, maxLength: 10240, required: false,defaultValue: 'MEMBERNAME became a Whatever'}, {name: 'group10MemberList', label: 'List of current group10 Members, separated by commas',type: 'str', minLength: 0, maxLength: 10240, required: false, defaultValue: ''}, {name: 'group10RainText', label: 'Text to use for group10 rain lines',type: 'str', minLength: 0, maxLength: 80, required: false,defaultValue: 'Kimberleys World has a new Whatever!'}, {name: 'group10RainCount', label: 'Number of lines of to annnounce their membership',type: 'int', minValue: 1, maxValue: 15, defaultValue: 15}, {name: 'group10EmoteEnter', label: 'Emoticon for group10 Users',type: 'str', minLength: 0, maxLength: 20, required: false, defaultValue: ''}, {name: 'group10EnterRoom',label: 'Text to display when group10 Member Enters the Room',type: 'str', minLength: 0, maxLength: 10240, required: false,defaultValue:'MEMBERNAME has entered the room!'}, {name: 'group10BGEnter', label: 'Background Color for when group10 enters the Room',type: 'str', minLength: 0, maxLength: 7, required: false, defaultValue: '#d7dc42'}, {name: 'group11Name', label: 'Name Of group11', type: 'str', minLength: 0, maxLength: 10, required: false, defaultValue: 'Whatever'}, {name: 'group11Text', label: 'Text to put in front of group11 Messages', type: 'str', minLength: 0, maxLength: 10, required: false, defaultValue: 'Whatever'}, {name: 'group11Emote', label: 'Emoticon to put in front of group11 messages', type: 'str', minLength: 0, maxLength: 10, required: false, defaultValue: ''}, {name: 'group11BGColor', label: 'group11 Text background color (000000 is black)', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: 'd7dc42'}, {name: 'group11MinTip',label: 'Minimum tip to become a group11 Member', type: 'int', minValue: 1, defaultValue: 1000}, {name: 'group11Announce',label: 'Text to show when someone tips to become group11',type: 'str', minLength: 0, maxLength: 10240, required: false,defaultValue: 'MEMBERNAME became a Whatever'}, {name: 'group11MemberList', label: 'List of current group11 Members, separated by commas',type: 'str', minLength: 0, maxLength: 10240, required: false, defaultValue: ''}, {name: 'group11RainText', label: 'Text to use for group11 rain lines',type: 'str', minLength: 0, maxLength: 80, required: false,defaultValue: 'Kimberleys World has a new Whatever!'}, {name: 'group11RainCount', label: 'Number of lines of to annnounce their membership',type: 'int', minValue: 1, maxValue: 15, defaultValue: 15}, {name: 'group11EmoteEnter', label: 'Emoticon for group11 Users',type: 'str', minLength: 0, maxLength: 20, required: false, defaultValue: ''}, {name: 'group11EnterRoom',label: 'Text to display when group11 Member Enters the Room',type: 'str', minLength: 0, maxLength: 10240, required: false,defaultValue:'MEMBERNAME has entered the room!'}, {name: 'group11BGEnter', label: 'Background Color for when group11 enters the Room',type: 'str', minLength: 0, maxLength: 7, required: false, defaultValue: '#d7dc42'}, {name: 'group12Name', label: 'Name Of group12', type: 'str', minLength: 0, maxLength: 10, required: false, defaultValue: 'Whatever'}, {name: 'group12Text', label: 'Text to put in front of group12 Messages', type: 'str', minLength: 0, maxLength: 10, required: false, defaultValue: 'Whatever'}, {name: 'group12Emote', label: 'Emoticon to put in front of group12 messages', type: 'str', minLength: 0, maxLength: 10, required: false, defaultValue: ''}, {name: 'group12BGColor', label: 'group12 Text background color (000000 is black)', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: 'd7dc42'}, {name: 'group12MinTip',label: 'Minimum tip to become a group12 Member', type: 'int', minValue: 1, defaultValue: 1000}, {name: 'group12Announce',label: 'Text to show when someone tips to become group12',type: 'str', minLength: 0, maxLength: 10240, required: false,defaultValue: 'MEMBERNAME became a Whatever'}, {name: 'group12MemberList', label: 'List of current group12 Members, separated by commas',type: 'str', minLength: 0, maxLength: 10240, required: false, defaultValue: ''}, {name: 'group12RainText', label: 'Text to use for group12 rain lines',type: 'str', minLength: 0, maxLength: 80, required: false,defaultValue: 'Kimberleys World has a new Whatever!'}, {name: 'group12RainCount', label: 'Number of lines of to annnounce their membership',type: 'int', minValue: 1, maxValue: 15, defaultValue: 15}, {name: 'group12EmoteEnter', label: 'Emoticon for group12 Users',type: 'str', minLength: 0, maxLength: 20, required: false, defaultValue: ''}, {name: 'group12EnterRoom',label: 'Text to display when group12 Member Enters the Room',type: 'str', minLength: 0, maxLength: 10240, required: false,defaultValue:'MEMBERNAME has entered the room!'}, {name: 'group12BGEnter', label: 'Background Color for when group12 enters the Room',type: 'str', minLength: 0, maxLength: 7, required: false, defaultValue: '#d7dc42'}, {name: 'group13Name', label: 'Name Of group13', type: 'str', minLength: 0, maxLength: 10, required: false, defaultValue: 'Whatever'}, {name: 'group13Text', label: 'Text to put in front of group13 Messages', type: 'str', minLength: 0, maxLength: 10, required: false, defaultValue: 'Whatever'}, {name: 'group13Emote', label: 'Emoticon to put in front of group13 messages', type: 'str', minLength: 0, maxLength: 10, required: false, defaultValue: ''}, {name: 'group13BGColor', label: 'group13 Text background color (000000 is black)', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: 'd7dc42'}, {name: 'group13MinTip',label: 'Minimum tip to become a group13 Member', type: 'int', minValue: 1, defaultValue: 1000}, {name: 'group13Announce',label: 'Text to show when someone tips to become group13',type: 'str', minLength: 0, maxLength: 10240, required: false,defaultValue: 'MEMBERNAME became a Whatever'}, {name: 'group13MemberList', label: 'List of current group13 Members, separated by commas',type: 'str', minLength: 0, maxLength: 10240, required: false, defaultValue: ''}, {name: 'group13RainText', label: 'Text to use for group13 rain lines',type: 'str', minLength: 0, maxLength: 80, required: false,defaultValue: 'Kimberleys World has a new Whatever!'}, {name: 'group13RainCount', label: 'Number of lines of to annnounce their membership',type: 'int', minValue: 1, maxValue: 15, defaultValue: 15}, {name: 'group13EmoteEnter', label: 'Emoticon for group13 Users',type: 'str', minLength: 0, maxLength: 20, required: false, defaultValue: ''}, {name: 'group13EnterRoom',label: 'Text to display when group13 Member Enters the Room',type: 'str', minLength: 0, maxLength: 10240, required: false,defaultValue:'MEMBERNAME has entered the room!'}, {name: 'group13BGEnter', label: 'Background Color for when group13 enters the Room',type: 'str', minLength: 0, maxLength: 7, required: false, defaultValue: '#d7dc42'}, {name: 'group14Name', label: 'Name Of group14', type: 'str', minLength: 0, maxLength: 10, required: false, defaultValue: 'Whatever'}, {name: 'group14Text', label: 'Text to put in front of group14 Messages', type: 'str', minLength: 0, maxLength: 10, required: false, defaultValue: 'Whatever'}, {name: 'group14Emote', label: 'Emoticon to put in front of group14 messages', type: 'str', minLength: 0, maxLength: 10, required: false, defaultValue: ''}, {name: 'group14BGColor', label: 'group14 Text background color (000000 is black)', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: 'd7dc42'}, {name: 'group14MinTip',label: 'Minimum tip to become a group14 Member', type: 'int', minValue: 1, defaultValue: 1000}, {name: 'group14Announce',label: 'Text to show when someone tips to become group14',type: 'str', minLength: 0, maxLength: 10240, required: false,defaultValue: 'MEMBERNAME became a Whatever'}, {name: 'group14MemberList', label: 'List of current group14 Members, separated by commas',type: 'str', minLength: 0, maxLength: 10240, required: false, defaultValue: ''}, {name: 'group14RainText', label: 'Text to use for group14 rain lines',type: 'str', minLength: 0, maxLength: 80, required: false,defaultValue: 'Kimberleys World has a new Whatever!'}, {name: 'group14RainCount', label: 'Number of lines of to annnounce their membership',type: 'int', minValue: 1, maxValue: 15, defaultValue: 15}, {name: 'group14EmoteEnter', label: 'Emoticon for group14 Users',type: 'str', minLength: 0, maxLength: 20, required: false, defaultValue: ''}, {name: 'group14EnterRoom',label: 'Text to display when group14 Member Enters the Room',type: 'str', minLength: 0, maxLength: 10240, required: false,defaultValue:'MEMBERNAME has entered the room!'}, {name: 'group14BGEnter', label: 'Background Color for when group14 enters the Room',type: 'str', minLength: 0, maxLength: 7, required: false, defaultValue: '#d7dc42'}, {name: 'group15Name', label: 'Name Of group15', type: 'str', minLength: 0, maxLength: 10, required: false, defaultValue: 'Whatever'}, {name: 'group15Text', label: 'Text to put in front of group15 Messages', type: 'str', minLength: 0, maxLength: 10, required: false, defaultValue: 'Whatever'}, {name: 'group15Emote', label: 'Emoticon to put in front of group15 messages', type: 'str', minLength: 0, maxLength: 10, required: false, defaultValue: ''}, {name: 'group15BGColor', label: 'group15 Text background color (000000 is black)', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: 'd7dc42'}, {name: 'group15MinTip',label: 'Minimum tip to become a group15 Member', type: 'int', minValue: 1, defaultValue: 1000}, {name: 'group15Announce',label: 'Text to show when someone tips to become group15',type: 'str', minLength: 0, maxLength: 10240, required: false,defaultValue: 'MEMBERNAME became a Whatever'}, {name: 'group15MemberList', label: 'List of current group15 Members, separated by commas',type: 'str', minLength: 0, maxLength: 10240, required: false, defaultValue: ''}, {name: 'group15RainText', label: 'Text to use for group15 rain lines',type: 'str', minLength: 0, maxLength: 80, required: false,defaultValue: 'Kimberleys World has a new Whatever!'}, {name: 'group15RainCount', label: 'Number of lines of to annnounce their membership',type: 'int', minValue: 1, maxValue: 15, defaultValue: 15}, {name: 'group15EmoteEnter', label: 'Emoticon for group15 Users',type: 'str', minLength: 0, maxLength: 20, required: false, defaultValue: ''}, {name: 'group15EnterRoom',label: 'Text to display when group15 Member Enters the Room',type: 'str', minLength: 0, maxLength: 10240, required: false,defaultValue:'MEMBERNAME has entered the room!'}, {name: 'group15BGEnter', label: 'Background Color for when group15 enters the Room',type: 'str', minLength: 0, maxLength: 7, required: false, defaultValue: '#d7dc42'}, ]; cb.onEnter(function(user) { cb.log("onEnter (Enter)"); cb.log("onEnter: Setting Entering Username"); var u = user['user']; cb.log("onEnter: Calling UserBelongsToGroup"); var groupName = userBelongsToGroup(u); cb.log("onEnter: Welcoming user to the channel"); cb.sendNotice('Welcome ' + u + '! ' + cb.settings.msg1, u,cb.settings.msgbgcolor ,cb.settings.msgcolor,'bold'); switch(groupName) { case group1: cb.log("onEnter: User belongs to Group 1 - Welcoming them to the room"); cb.sendNotice(cb.settings.group1EmoteEnter + " " + cb.settings.group1Text + " "+ u + " "+ cb.settings.group1EnterRoom, '', cb.settings.group1BGEnter, '', 'bold'); break; case group2: cb.log("onEnter: User belongs to Group 2 - Welcoming them to the room"); cb.sendNotice(cb.settings.group2EmoteEnter + " " + cb.settings.group2Text + " "+ u + " "+ cb.settings.group2EnterRoom, '', cb.settings.group2BGEnter, '', 'bold'); break; case group3: cb.log("onEnter: User belongs to Group 3 - Welcoming them to the room"); cb.sendNotice(cb.settings.group3EmoteEnter + " " + cb.settings.group3Text + " "+ u + " "+ cb.settings.group3EnterRoom, '', cb.settings.group3BGEnter, '', 'bold'); break; case group4: cb.log("onEnter: User belongs to Group 4 - Welcoming them to the room"); cb.sendNotice(cb.settings.group4EmoteEnter + " " + cb.settings.group4Text + " "+ u + " "+ cb.settings.group4EnterRoom, '', cb.settings.group4BGEnter, '', 'bold'); break; case group5: cb.log("onEnter: User belongs to Group 5 - Welcoming them to the room"); cb.sendNotice(cb.settings.group5EmoteEnter + " " + cb.settings.group5Text + " "+ u + " "+ cb.settings.group5EnterRoom, '', cb.settings.group5BGEnter, '', 'bold'); break; case group6: cb.log("onEnter: User belongs to Group 6 - Welcoming them to the room"); cb.sendNotice(cb.settings.group6EmoteEnter + " " + cb.settings.group6Text + " "+ u + " "+ cb.settings.group6EnterRoom, '', cb.settings.group6BGEnter, '', 'bold'); break; case group7: cb.log("onEnter: User belongs to Group 7 - Welcoming them to the room"); cb.sendNotice(cb.settings.group7EmoteEnter + " " + cb.settings.group7Text + " "+ u + " "+ cb.settings.group7EnterRoom, '', cb.settings.group7BGEnter, '', 'bold'); break; case group8: cb.log("onEnter: User belongs to Group 8 - Welcoming them to the room"); cb.sendNotice(cb.settings.group8EmoteEnter + " " + cb.settings.group8Text + " "+ u + " "+ cb.settings.group8EnterRoom, '', cb.settings.group8BGEnter, '', 'bold'); break; case group9: cb.log("onEnter: User belongs to Group 9 - Welcoming them to the room"); cb.sendNotice(cb.settings.group9EmoteEnter + " " + cb.settings.group9Text + " "+ u + " "+ cb.settings.group9EnterRoom, '', cb.settings.group9BGEnter, '', 'bold'); break; case group10: cb.log("onEnter: User belongs to Group 10 - Welcoming them to the room"); cb.sendNotice(cb.settings.group10EmoteEnter + " " + cb.settings.group10Text + " "+ u + " "+ cb.settings.group10EnterRoom, '', cb.settings.group10BGEnter, '', 'bold'); break; case group11: cb.log("onEnter: User belongs to Group 11 - Welcoming them to the room"); cb.sendNotice(cb.settings.group11EmoteEnter + " " + cb.settings.group11Text + " "+ u + " "+ cb.settings.group11EnterRoom, '', cb.settings.group11BGEnter, '', 'bold'); break; case group12: cb.log("onEnter: User belongs to Group 12 - Welcoming them to the room"); cb.sendNotice(cb.settings.group12EmoteEnter + " " + cb.settings.group12Text + " "+ u + " "+ cb.settings.group12EnterRoom, '', cb.settings.group12BGEnter, '', 'bold'); break; case group13: cb.log("onEnter: User belongs to Group 13 - Welcoming them to the room"); cb.sendNotice(cb.settings.group13EmoteEnter + " " + cb.settings.group13Text + " "+ u + " "+ cb.settings.group13EnterRoom, '', cb.settings.group13BGEnter, '', 'bold'); break; case group14: cb.log("onEnter: User belongs to Group 14 - Welcoming them to the room"); cb.sendNotice(cb.settings.group14EmoteEnter + " " + cb.settings.group14Text + " "+ u + " "+ cb.settings.group14EnterRoom, '', cb.settings.group14BGEnter, '', 'bold'); break; case group15: cb.log("onEnter: User belongs to Group 15 - Welcoming them to the room"); cb.sendNotice(cb.settings.group15EmoteEnter + " " + cb.settings.group15Text + " "+ u + " "+ cb.settings.group15EnterRoom, '', cb.settings.group15BGEnter, '', 'bold'); break; default: cb.log("onEnter: User doesn't belong to any group, they don't need any special greeting"); } cb.log("onEnter (Exit)"); }); cb.onMessage( function (msg) { cb.log("onMessage (Enter)"); cb.log("onMessage: Setting the username variable"); var u = msg['user']; cb.log("onMessage: Setting the msg variable"); var m = msg['m']; cb.log("onMessage: Is this the model sending the message?"); var isModel = (u == cb.room_slug); cb.log("onMessage: Setting the model to Exempt from any spam rules"); var exempt = (isModel); cb.log("onMessage: First check to see if the message is a command"); if(m[0] == '/') { cb.log("onMessage: The message is a command"); cb.log("onMessage: Setting X-SPAM to true"); msg['X-Spam'] = true; if(isModel) { cb.log("onMessage: This is the model making the request"); cb.log("onMessage: Splitting the Command in to an array"); var actionArray = m.substr(1).split(' '); if(actionArray.length >= 2) { cb.log("onMessage: Theres multiple commands being sent"); cb.log("onMessage: Setting the action"); var action = actionArray[0].ToLowercase(); cb.log("onMessage: Setting the user"); var user = actionArray[1]; cb.log("onMessage: Performing a switch over the action"); switch(action) { case "block": cb.log("onMessage: Action is to Block User: " + user); cb.sendNotice('Blocking ' + user); cb.log("onMessage: Calling SetBlock()"); setBlock(user); break; case "unblock": cb.log("onMessage: Action is to unblock user: " + user); cb.sendNotice('Removing Block ' + user); cb.log("onMessage: Calling Unblock()"); unBlock(user); break; default: cb.log("onMessage: Action is one we don't recognize - " + action); } } else if (actionArray.length == 1) { cb.log("onMessage: Simple command has been posted"); cb.log("onMessage: Performing simple switch to determine output"); switch(actionArray[0].toLowerCase()) { case "roomrules": cb.log("onMessage: Someone has requested for room rules"); cb.log("onMessage: Setting X-Spam to false"); msg['X-Spam'] = false; cb.log("onMessage: Outputting the room rules"); cb.sendNotice(cb.settings.roomRules,'','#FFDAF1','#000000',''); break; case "kwhelp": cb.log("onMessage: Someone has requested for Help"); cb.log("onMessage: Creating and building the help"); var n = ""; n += "######################################\n"; n += "Kimberleys World\n"; n += "######################################\n"; n += "/roomRules: Display the room rules\n"; n += "/listGroups: Display the Group Names, Tip Levels and Member counts"; n += "\n"; n += "/block <membername> : Blocks a user for this session\n"; n += "/unblock <membername> : Unblocks a user for this session\n"; n += "\n"; n += "######################################"; cb.log("onMessage: Outputting the help"); cb.sendNotice(n,u,'#D8DEFF','','bold'); break; default: cb.log("onMessage: An action has been requested that we do not recognize"); } } cb.log("onMessage: Setting the message background"); msg['background'] = '#' + cb.settings.ymBGColor; } } else if (userIsBlocked(u) && !exempt) { cb.log("onMessage: User has been blocked, setting X-Spam to true"); msg['X-Spam'] = true; } else { cb.log("onMessage: Message is not from the model, lets find out if they're VIP"); cb.log("onMessage: Calling userBelongsToGroup for user: " + u); var groupName = userBelongsToGroup(u); switch(groupName) { case group1: cb.log("onMessage: User belongs to Group 1 - Setting Background Color and the respect they deserve"); msg['background'] = '#' + cb.settings.group1BGColor; msg['m'] = cb.settings.group1Emote +" "+ cb.settings.group1Text + " "+cb.settings.group1Emote + " " +msg['m']; break; case group2: cb.log("onMessage: User belongs to Group 2 - Setting Background Color and the respect they deserve"); msg['background'] = '#' + cb.settings.group2BGColor; msg['m'] = cb.settings.group2Emote +" "+ cb.settings.group2Text + " "+cb.settings.group2Emote + " " +msg['m']; break; case group3: cb.log("onMessage: User belongs to Group 3 - Setting Background Color and the respect they deserve"); msg['background'] = '#' + cb.settings.group3BGColor; msg['m'] = cb.settings.group3Emote +" "+ cb.settings.group3Text + " "+cb.settings.group3Emote + " " +msg['m']; break; case group4: cb.log("onMessage: User belongs to Group 4 - Setting Background Color and the respect they deserve"); msg['background'] = '#' + cb.settings.group4BGColor; msg['m'] = cb.settings.group4Emote +" "+ cb.settings.group4Text + " "+cb.settings.group4Emote + " " +msg['m']; break; case group5: cb.log("onMessage: User belongs to Group 5 - Setting Background Color and the respect they deserve"); msg['background'] = '#' + cb.settings.group5BGColor; msg['m'] = cb.settings.group5Emote +" "+ cb.settings.group5Text + " "+cb.settings.group5Emote + " " +msg['m']; break; case group6: cb.log("onMessage: User belongs to Group 6 - Setting Background Color and the respect they deserve"); msg['background'] = '#' + cb.settings.group6BGColor; msg['m'] = cb.settings.group6Emote +" "+ cb.settings.group6Text + " "+cb.settings.group6Emote + " " +msg['m']; break; case group7: cb.log("onMessage: User belongs to Group 7 - Setting Background Color and the respect they deserve"); msg['background'] = '#' + cb.settings.group7BGColor; msg['m'] = cb.settings.group7Emote +" "+ cb.settings.group7Text + " "+cb.settings.group7Emote + " " +msg['m']; break; case group8: cb.log("onMessage: User belongs to Group 8 - Setting Background Color and the respect they deserve"); msg['background'] = '#' + cb.settings.group8BGColor; msg['m'] = cb.settings.group8Emote +" "+ cb.settings.group8Text + " "+cb.settings.group8Emote + " " +msg['m']; break; case group9: cb.log("onMessage: User belongs to Group 9 - Setting Background Color and the respect they deserve"); msg['background'] = '#' + cb.settings.group9BGColor; msg['m'] = cb.settings.group9Emote +" "+ cb.settings.group9Text + " "+cb.settings.group9Emote + " " +msg['m']; break; case group10: cb.log("onMessage: User belongs to Group 10 - Setting Background Color and the respect they deserve"); msg['background'] = '#' + cb.settings.group10BGColor; msg['m'] = cb.settings.group10Emote +" "+ cb.settings.group10Text + " "+cb.settings.group10Emote + " " +msg['m']; break; case group11: cb.log("onMessage: User belongs to Group 11 - Setting Background Color and the respect they deserve"); msg['background'] = '#' + cb.settings.group11BGColor; msg['m'] = cb.settings.group11Emote +" "+ cb.settings.group11Text + " "+cb.settings.group11Emote + " " +msg['m']; break; case group12: cb.log("onMessage: User belongs to Group 12 - Setting Background Color and the respect they deserve"); msg['background'] = '#' + cb.settings.group12BGColor; msg['m'] = cb.settings.group12Emote +" "+ cb.settings.group12Text + " "+cb.settings.group12Emote + " " +msg['m']; break; case group13: cb.log("onMessage: User belongs to Group 13 - Setting Background Color and the respect they deserve"); msg['background'] = '#' + cb.settings.group13BGColor; msg['m'] = cb.settings.group13Emote +" "+ cb.settings.group13Text + " "+cb.settings.group13Emote + " " +msg['m']; break; case group14: cb.log("onMessage: User belongs to Group 14 - Setting Background Color and the respect they deserve"); msg['background'] = '#' + cb.settings.group14BGColor; msg['m'] = cb.settings.group14Emote +" "+ cb.settings.group14Text + " "+cb.settings.group14Emote + " " +msg['m']; break; case group15: cb.log("onMessage: User belongs to Group 15 - Setting Background Color and the respect they deserve"); msg['background'] = '#' + cb.settings.group15BGColor; msg['m'] = cb.settings.group15Emote +" "+ cb.settings.group15Text + " "+cb.settings.group15Emote + " " +msg['m']; break; default: cb.log("onMessage: This is a user who is new or one we don't care about"); } } cb.log("onMessage: returning Msg"); cb.log("onMessage (Exit)"); return msg; }); cb.onTip(function (tip) { cb.log("onTip (Enter)"); cb.log("onTip: Getting the amount tipped "); var amountTipped = parseInt(tip['amount']); var announcement; var i = 0; var user = tip['from_user']; cb.log("onTip: Performing a simple switch of the amount tipped to determine if they need to be added to a group"); switch(true) { case (amountTipped == group1MinTip): cb.log("onTip: User has tipped the amount join Group1"); cb.log("onTip: Announcing this achievement to the room"); announcement = cb.settings.group1Announce.replace("MEMBERNAME", user); cb.log("onTip: Calling AddUserToGroup for user: " + user); addUserToGroup(user, 'group1'); cb.log("onTip: calling makeItRainText()"); makeItRainText(cb.settings.group1RainCount, cb.settings.group1RainText); break; case (amountTipped == group2MinTip): cb.log("onTip: User has tipped the amount join Group2"); cb.log("onTip: Announcing this achievement to the room"); announcement = cb.settings.group2Announce.replace("MEMBERNAME", user); cb.log("onTip: Calling AddUserToGroup for user: " + user); addUserToGroup(user, 'group2'); cb.log("onTip: calling makeItRainText()"); makeItRainText(cb.settings.group2RainCount, cb.settings.group2RainText); break; case (amountTipped == group3MinTip): cb.log("onTip: User has tipped the amount join Group3"); cb.log("onTip: Announcing this achievement to the room"); announcement = cb.settings.group3Announce.replace("MEMBERNAME", user); cb.log("onTip: Calling AddUserToGroup for user: " + user); addUserToGroup(user, 'group3'); cb.log("onTip: calling makeItRainText()"); makeItRainText(cb.settings.group3RainCount, cb.settings.group3RainText); break; case (amountTipped == group4MinTip): cb.log("onTip: User has tipped the amount join Group4"); cb.log("onTip: Announcing this achievement to the room"); announcement = cb.settings.group1Announce.replace("MEMBERNAME", user); cb.log("onTip: Calling AddUserToGroup for user: " + user); addUserToGroup(user, 'group4'); cb.log("onTip: calling makeItRainText()"); makeItRainText(cb.settings.group4RainCount, cb.settings.group4RainText); break; case (amountTipped == group5MinTip): cb.log("onTip: User has tipped the amount join Group5"); cb.log("onTip: Announcing this achievement to the room"); announcement = cb.settings.group5Announce.replace("MEMBERNAME", user); cb.log("onTip: Calling AddUserToGroup for user: " + user); addUserToGroup(user, 'group5'); cb.log("onTip: calling makeItRainText()"); makeItRainText(cb.settings.group5RainCount, cb.settings.group5RainText); break; case (amountTipped == group6MinTip): cb.log("onTip: User has tipped the amount join Group6"); cb.log("onTip: Announcing this achievement to the room"); announcement = cb.settings.group6Announce.replace("MEMBERNAME", user); cb.log("onTip: Calling AddUserToGroup for user: " + user); addUserToGroup(user, 'group6'); cb.log("onTip: calling makeItRainText()"); makeItRainText(cb.settings.group6RainCount, cb.settings.group6RainText); break; case (amountTipped == group7MinTip): cb.log("onTip: User has tipped the amount join Group7"); cb.log("onTip: Announcing this achievement to the room"); announcement = cb.settings.group7Announce.replace("MEMBERNAME", user); cb.log("onTip: Calling AddUserToGroup for user: " + user); addUserToGroup(user, 'group7'); cb.log("onTip: calling makeItRainText()"); makeItRainText(cb.settings.group7RainCount, cb.settings.group7RainText); break; case (amountTipped == group8MinTip): cb.log("onTip: User has tipped the amount join Group8"); cb.log("onTip: Announcing this achievement to the room"); announcement = cb.settings.group8Announce.replace("MEMBERNAME", user); cb.log("onTip: Calling AddUserToGroup for user: " + user); addUserToGroup(user, 'group8'); cb.log("onTip: calling makeItRainText()"); makeItRainText(cb.settings.group8RainCount, cb.settings.group8RainText); break; case (amountTipped == group9MinTip): cb.log("onTip: User has tipped the amount join Group9"); cb.log("onTip: Announcing this achievement to the room"); announcement = cb.settings.group9Announce.replace("MEMBERNAME", user); cb.log("onTip: Calling AddUserToGroup for user: " + user); addUserToGroup(user, 'group9'); cb.log("onTip: calling makeItRainText()"); makeItRainText(cb.settings.group9RainCount, cb.settings.group9RainText); break; case (amountTipped == group10MinTip): cb.log("onTip: User has tipped the amount join Group10"); cb.log("onTip: Announcing this achievement to the room"); announcement = cb.settings.group10Announce.replace("MEMBERNAME", user); cb.log("onTip: Calling AddUserToGroup for user: " + user); addUserToGroup(user, 'group10'); cb.log("onTip: calling makeItRainText()"); makeItRainText(cb.settings.group10RainCount, cb.settings.group10RainText); break; case (amountTipped == group11MinTip): cb.log("onTip: User has tipped the amount join Group11"); cb.log("onTip: Announcing this achievement to the room"); announcement = cb.settings.group11Announce.replace("MEMBERNAME", user); cb.log("onTip: Calling AddUserToGroup for user: " + user); addUserToGroup(user, 'group11'); cb.log("onTip: calling makeItRainText()"); makeItRainText(cb.settings.group11RainCount, cb.settings.group11RainText); break; case (amountTipped == group12MinTip): cb.log("onTip: User has tipped the amount join Group12"); cb.log("onTip: Announcing this achievement to the room"); announcement = cb.settings.group12Announce.replace("MEMBERNAME", user); cb.log("onTip: Calling AddUserToGroup for user: " + user); addUserToGroup(user, 'group12'); cb.log("onTip: calling makeItRainText()"); makeItRainText(cb.settings.group12RainCount, cb.settings.group12RainText); break; case (amountTipped == group13MinTip): cb.log("onTip: User has tipped the amount join Group13"); cb.log("onTip: Announcing this achievement to the room"); announcement = cb.settings.group1Announce.replace("MEMBERNAME", user); cb.log("onTip: Calling AddUserToGroup for user: " + user); addUserToGroup(user, 'group13'); cb.log("onTip: calling makeItRainText()"); makeItRainText(cb.settings.group13RainCount, cb.settings.group13RainText); break; case (amountTipped == group14MinTip): cb.log("onTip: User has tipped the amount join Group14"); cb.log("onTip: Announcing this achievement to the room"); announcement = cb.settings.group1Announce.replace("MEMBERNAME", user); cb.log("onTip: Calling AddUserToGroup for user: " + user); addUserToGroup(user, 'group14'); makeItRainText(cb.settings.group14RainCount, cb.settings.group14RainText); break; case (amountTipped == group15MinTip): cb.log("onTip: User has tipped the amount join Group15"); cb.log("onTip: Announcing this achievement to the room"); announcement = cb.settings.group5Announce.replace("MEMBERNAME", user); cb.log("onTip: Calling AddUserToGroup for user: " + user); addUserToGroup(user, 'group15'); cb.log("onTip: calling makeItRainText()"); makeItRainText(cb.settings.group15RainCount, cb.settings.group15RainText); break; default: } cb.log("onTip: Send Notice to annouce the tip"); cb.sendNotice(announcement); cb.log("onTip (Exit)"); }); function addToGroup(username, groupname) { cb.log("addToGroup (Enter)"); cb.log("addToGroup: Adding User: " + username + " - To Group: " + groupname); cb.log("addToGroup: Calling userBelongsToGroup to get any current group they may belong to"); var currentGroup = userBelongsToGroup(username); if(currentGroup != 'noGroup') { cb.log("addToGroup: User currently belongs to " + currentGroup); cb.log("addToGroup: First removing user: " + username + " from group: " + currentGroup); cb.log("addToGroup: Calling removeUserFromGroup()"); removeUserFromGroup(username, currentGroup); } cb.log("addToGroup: Performing a switch of the group names to determine which group to add to"); switch(groupName) { case group1: cb.log("addToGroup: Adding user to Group1"); group1Members[username] = {'u': 1}; break; case group2: cb.log("addToGroup: Adding user to Group1"); group2Members[username] = {'u': 1}; break; case group3: cb.log("addToGroup: Adding user to Group3"); group3Members[username] = {'u': 1}; break; case group4: cb.log("addToGroup: Adding user to Group4"); group4Members[username] = {'u': 1}; break; case group5: cb.log("addToGroup: Adding user to Group5"); group5Members[username] = {'u': 1}; break; case group6: cb.log("addToGroup: Adding user to Group6"); group6Members[username] = {'u': 1}; break; case group7: cb.log("addToGroup: Adding user to Group7"); group7Members[username] = {'u': 1}; break; case group8: cb.log("addToGroup: Adding user to Group8"); group8Members[username] = {'u': 1}; break; case group9: cb.log("addToGroup: Adding user to Group9"); group9Members[username] = {'u': 1}; break; case group10: cb.log("addToGroup: Adding user to Group10"); group10Members[username] = {'u': 1}; break; case group11: cb.log("addToGroup: Adding user to Group11"); group11Members[username] = {'u': 1}; break; case group12: cb.log("addToGroup: Adding user to Group12"); group12Members[username] = {'u': 1}; break; case group13: cb.log("addToGroup: Adding user to Group13"); group13Members[username] = {'u': 1}; break; case group14: cb.log("addToGroup: Adding user to Group14"); group14Members[username] = {'u': 1}; break; case group15: cb.log("addToGroup: Adding user to Group15"); group15Members[username] = {'u': 1}; break; default: cb.log("addToGroup: Group name we don't recognize has been given to us"); } cb.log("addToGroup: Finished adding user to group"); cb.log("addToGroup (Exit)"); } function buildMemberLists() { cb.log("buildMemberLists (Enter)"); cb.log("buildMemberLists: Going through the Group Member Lists from the Settings and add them to the Group Arrays"); cb.log("buildMemberLists: creating variables and arrays"); var j = 0; var memberList; var clean; if (cb.settings.group1MemberList) { cb.log("buildMemberLists: Getting a list of members from the Settings for Group1"); memberList = cb.settings.group1MemberList.split(','); cb.log("buildMemberLists: Looping over each member in the list"); for (j=0; j < memberList.length; j++) { cb.log("buildMemberLists: Cleaning the name"); clean = memberList[j].toLowerCase().replace(/ /g,""); cb.log("buildMemberLists: Adding the cleaned username to the group Members List"); group1Members[clean] = {'u': 1}; } cb.log("buildMemberLists: finished looping over each member in the list"); } else { cb.log("buildMemberLists: Group1 is empty"); } if (cb.settings.group2MemberList) { cb.log("buildMemberLists: Getting a list of members from the Settings for Group2"); memberList = cb.settings.group2MemberList.split(','); cb.log("buildMemberLists: Looping over each member in the list"); for (j=0; j < memberList.length; j++) { cb.log("buildMemberLists: Cleaning the name"); clean = memberList[j].toLowerCase().replace(/ /g,""); cb.log("buildMemberLists: Adding the cleaned username to the group Members List"); group2Members[clean] = {'u': 1}; } cb.log("buildMemberLists: finished looping over each member in the list"); } else { cb.log("buildMemberLists: Group2 is empty"); } if (cb.settings.group3MemberList) { cb.log("buildMemberLists: Getting a list of members from the Settings for Group3"); memberList = cb.settings.group3MemberList.split(','); cb.log("buildMemberLists: Looping over each member in the list"); for (j=0; j < memberList.length; j++) { cb.log("buildMemberLists: Cleaning the name"); clean = memberList[j].toLowerCase().replace(/ /g,""); cb.log("buildMemberLists: Adding the cleaned username to the group Members List"); group3Members[clean] = {'u': 1}; } cb.log("buildMemberLists: finished looping over each member in the list"); } else { cb.log("buildMemberLists: Group3 is empty"); } if (cb.settings.group4MemberList) { cb.log("buildMemberLists: Getting a list of members from the Settings for Group4"); memberList = cb.settings.group4MemberList.split(','); cb.log("buildMemberLists: Looping over each member in the list"); for (j=0; j < memberList.length; j++) { cb.log("buildMemberLists: Cleaning the name"); clean = memberList[j].toLowerCase().replace(/ /g,""); cb.log("buildMemberLists: Adding the cleaned username to the group Members List"); group4Members[clean] = {'u': 1}; } cb.log("buildMemberLists: finished looping over each member in the list"); } else { cb.log("buildMemberLists: Group4 is empty"); } if (cb.settings.group5MemberList) { cb.log("buildMemberLists: Getting a list of members from the Settings for Group5"); memberList = cb.settings.group5MemberList.split(','); cb.log("buildMemberLists: Looping over each member in the list"); for (j=0; j < memberList.length; j++) { cb.log("buildMemberLists: Cleaning the name"); clean = memberList[j].toLowerCase().replace(/ /g,""); cb.log("buildMemberLists: Adding the cleaned username to the group Members List"); group5Members[clean] = {'u': 1}; } cb.log("buildMemberLists: finished looping over each member in the list"); } else { cb.log("buildMemberLists: Group5 is empty"); } if (cb.settings.group6MemberList) { cb.log("buildMemberLists: Getting a list of members from the Settings for Group6"); memberList = cb.settings.group6MemberList.split(','); cb.log("buildMemberLists: Looping over each member in the list"); for (j=0; j < memberList.length; j++) { cb.log("buildMemberLists: Cleaning the name"); clean = memberList[j].toLowerCase().replace(/ /g,""); cb.log("buildMemberLists: Adding the cleaned username to the group Members List"); group6Members[clean] = {'u': 1}; } cb.log("buildMemberLists: finished looping over each member in the list"); } else { cb.log("buildMemberLists: Group6 is empty"); } if (cb.settings.group7MemberList) { cb.log("buildMemberLists: Getting a list of members from the Settings for Group7"); memberList = cb.settings.group7MemberList.split(','); cb.log("buildMemberLists: Looping over each member in the list"); for (j=0; j < memberList.length; j++) { cb.log("buildMemberLists: Cleaning the name"); clean = memberList[j].toLowerCase().replace(/ /g,""); cb.log("buildMemberLists: Adding the cleaned username to the group Members List"); group7Members[clean] = {'u': 1}; } cb.log("buildMemberLists: finished looping over each member in the list"); } else { cb.log("buildMemberLists: Group7 is empty"); } if (cb.settings.group8MemberList) { cb.log("buildMemberLists: Getting a list of members from the Settings for Group8"); memberList = cb.settings.group8MemberList.split(','); cb.log("buildMemberLists: Looping over each member in the list"); for (j=0; j < memberList.length; j++) { cb.log("buildMemberLists: Cleaning the name"); clean = memberList[j].toLowerCase().replace(/ /g,""); cb.log("buildMemberLists: Adding the cleaned username to the group Members List"); group8Members[clean] = {'u': 1}; } cb.log("buildMemberLists: finished looping over each member in the list"); } else { cb.log("buildMemberLists: Group8 is empty"); } if (cb.settings.group9MemberList) { cb.log("buildMemberLists: Getting a list of members from the Settings for Group9"); memberList = cb.settings.group9MemberList.split(','); cb.log("buildMemberLists: Looping over each member in the list"); for (j=0; j < memberList.length; j++) { cb.log("buildMemberLists: Cleaning the name"); clean = memberList[j].toLowerCase().replace(/ /g,""); cb.log("buildMemberLists: Adding the cleaned username to the group Members List"); group9Members[clean] = {'u': 1}; } cb.log("buildMemberLists: finished looping over each member in the list"); } else { cb.log("buildMemberLists: Group9 is empty"); } if (cb.settings.group10MemberList) { cb.log("buildMemberLists: Getting a list of members from the Settings for Group10"); memberList = cb.settings.group10MemberList.split(','); cb.log("buildMemberLists: Looping over each member in the list"); for (j=0; j < memberList.length; j++) { cb.log("buildMemberLists: Cleaning the name"); clean = memberList[j].toLowerCase().replace(/ /g,""); cb.log("buildMemberLists: Adding the cleaned username to the group Members List"); group10Members[clean] = {'u': 1}; } cb.log("buildMemberLists: finished looping over each member in the list"); } else { cb.log("buildMemberLists: Group10 is empty"); } if (cb.settings.group11MemberList) { cb.log("buildMemberLists: Getting a list of members from the Settings for Group11"); memberList = cb.settings.group11MemberList.split(','); cb.log("buildMemberLists: Looping over each member in the list"); for (j=0; j < memberList.length; j++) { cb.log("buildMemberLists: Cleaning the name"); clean = memberList[j].toLowerCase().replace(/ /g,""); cb.log("buildMemberLists: Adding the cleaned username to the group Members List"); group11Members[clean] = {'u': 1}; } cb.log("buildMemberLists: finished looping over each member in the list"); } else { cb.log("buildMemberLists: Group11 is empty"); } if (cb.settings.group12MemberList) { cb.log("buildMemberLists: Getting a list of members from the Settings for Group12"); memberList = cb.settings.group12MemberList.split(','); cb.log("buildMemberLists: Looping over each member in the list"); for (j=0; j < memberList.length; j++) { cb.log("buildMemberLists: Cleaning the name"); clean = memberList[j].toLowerCase().replace(/ /g,""); cb.log("buildMemberLists: Adding the cleaned username to the group Members List"); group12Members[clean] = {'u': 1}; } cb.log("buildMemberLists: finished looping over each member in the list"); } else { cb.log("buildMemberLists: Group12 is empty"); } if (cb.settings.group13MemberList) { cb.log("buildMemberLists: Getting a list of members from the Settings for Group13"); memberList = cb.settings.group13MemberList.split(','); cb.log("buildMemberLists: Looping over each member in the list"); for (j=0; j < memberList.length; j++) { cb.log("buildMemberLists: Cleaning the name"); clean = memberList[j].toLowerCase().replace(/ /g,""); cb.log("buildMemberLists: Adding the cleaned username to the group Members List"); group13Members[clean] = {'u': 1}; } cb.log("buildMemberLists: finished looping over each member in the list"); } else { cb.log("buildMemberLists: Group13 is empty"); } if (cb.settings.group14MemberList) { cb.log("buildMemberLists: Getting a list of members from the Settings for Group14"); memberList = cb.settings.group14MemberList.split(','); cb.log("buildMemberLists: Looping over each member in the list"); for (j=0; j < memberList.length; j++) { cb.log("buildMemberLists: Cleaning the name"); clean = memberList[j].toLowerCase().replace(/ /g,""); cb.log("buildMemberLists: Adding the cleaned username to the group Members List"); group14Members[clean] = {'u': 1}; } cb.log("buildMemberLists: finished looping over each member in the list"); } else { cb.log("buildMemberLists: Group14 is empty"); } if (cb.settings.group15MemberList) { cb.log("buildMemberLists: Getting a list of members from the Settings for Group15"); memberList = cb.settings.group15MemberList.split(','); cb.log("buildMemberLists: Looping over each member in the list"); for (j=0; j < memberList.length; j++) { cb.log("buildMemberLists: Cleaning the name"); clean = memberList[j].toLowerCase().replace(/ /g,""); cb.log("buildMemberLists: Adding the cleaned username to the group Members List"); group10Members[clean] = {'u': 1}; } cb.log("buildMemberLists: finished looping over each member in the list"); } else { cb.log("buildMemberLists: Group15 is empty"); } if (cb.settings.blockMemberList) { cb.log("buildMemberLists: Getting a list of members from the Settings for BlockList"); memberList = cb.settings.blockMemberList.split(','); cb.log("buildMemberLists: Looping over each member in the list"); for (j=0; j < blockMemberList.length; j++) { cb.log("buildMemberLists: Cleaning the name"); clean = blockMemberList[j].toLowerCase().replace(/ /g, ""); cb.log("buildMemberLists: Adding the cleaned username to the Blocked Members List"); blockMembers[clean] = {'u': 1}; } cb.log("buildMemberLists: finished looping over each member in the list"); } else { cb.log("buildMemberLists: BlockList is empty"); } cb.log("buildMemberLists: Finished building all member lists"); cb.log("buildMemberLists (Exit)"); } function listGroups() { cb.log("listGroups (Enter)"); cb.log("User has asked to see the groups, their counts and the tips"); var n = ""; n += "######################################\n"; n += "Group List!\n"; n += "######################################\n"; n += cb.settings.group1Name + " [" + cb.settings.group1MemberList.length + " members] - Tip: " + group1MinTip + "\n"; n += cb.settings.group2Name + " [" + cb.settings.group2MemberList.length + " members] - Tip: " + group2MinTip + "\n"; n += cb.settings.group3Name + " [" + cb.settings.group3MemberList.length + " members] - Tip: " + group3MinTip + "\n"; n += cb.settings.group4Name + " [" + cb.settings.group4MemberList.length + " members] - Tip: " + group4MinTip + "\n"; n += cb.settings.group5Name + " [" + cb.settings.group5MemberList.length + " members] - Tip: " + group5MinTip + "\n"; n += cb.settings.group6Name + " [" + cb.settings.group6MemberList.length + " members] - Tip: " + group6MinTip + "\n"; n += cb.settings.group7Name + " [" + cb.settings.group7MemberList.length + " members] - Tip: " + group7MinTip + "\n"; n += cb.settings.group8Name + " [" + cb.settings.group8MemberList.length + " members] - Tip: " + group8MinTip + "\n"; n += cb.settings.group9Name + " [" + cb.settings.group9MemberList.length + " members] - Tip: " + group9MinTip + "\n"; n += cb.settings.group10Name + " [" + cb.settings.group10MemberList.length + " members] - Tip: " + group10MinTip + "\n"; n += cb.settings.group11Name + " [" + cb.settings.group11MemberList.length + " members] - Tip: " + group11MinTip + "\n"; n += cb.settings.group12Name + " [" + cb.settings.group12MemberList.length + " members] - Tip: " + group12MinTip + "\n"; n += cb.settings.group13Name + " [" + cb.settings.group13MemberList.length + " members] - Tip: " + group13MinTip + "\n"; n += cb.settings.group14Name + " [" + cb.settings.group14MemberList.length + " members] - Tip: " + group14MinTip + "\n"; n += cb.settings.group15Name + " [" + cb.settings.group15MemberList.length + " members] - Tip: " + group15MinTip + "\n"; n += "######################################"; cb.log("Sending notice with the group lists"); cb.sendNotice(n,u,'#D8DEFF','','bold'); cb.log("listGroups (Exit)"); } function removeUserFromGroup(username, groupname) { cb.log("removeUserFromGroup (Enter)"); cb.log("removeUserFromGroup: Removing User: " + username + " from Group: " + groupname); cb.log("removeUserFromGroup: Performing a simple switch over each group"); switch(groupName) { case 'group1': cb.log("removeUserFromGroup: Deleting user from group1Members array"); delete group1Members[username]; break; case 'group2': cb.log("removeUserFromGroup: Deleting user from group2Members array"); delete group2Members[username]; break; case 'group3': cb.log("removeUserFromGroup: Deleting user from group3Members array"); delete group3Members[username]; break; case 'group4': cb.log("removeUserFromGroup: Deleting user from group4Members array"); delete group4Members[username]; break; case 'group5': cb.log("removeUserFromGroup: Deleting user from group5Members array"); delete group5Members[username]; break; case 'group6': cb.log("removeUserFromGroup: Deleting user from group6Members array"); delete group6Members[username]; break; case 'group7': cb.log("removeUserFromGroup: Deleting user from group7Members array"); delete group7Members[username]; break; case 'group8': cb.log("removeUserFromGroup: Deleting user from group8Members array"); delete group8Members[username]; break; case 'group9': cb.log("removeUserFromGroup: Deleting user from group9Members array"); delete group9Members[username]; break; case 'group10': cb.log("removeUserFromGroup: Deleting user from group10Members array"); delete group10Members[username]; break; case 'group11': cb.log("removeUserFromGroup: Deleting user from group11Members array"); delete group11Members[username]; break; case 'group12': cb.log("removeUserFromGroup: Deleting user from group12Members array"); delete group12Members[username]; break; case 'group13': cb.log("removeUserFromGroup: Deleting user from group13Members array"); delete group13Members[username]; break; case 'group14': cb.log("removeUserFromGroup: Deleting user from group14Members array"); delete group14Members[username]; break; case 'group15': cb.log("removeUserFromGroup: Deleting user from group15Members array"); delete group15Members[username]; break; default: cb.log("removeUserFromGroup: A group name that we don't recognize has been passed"); } cb.log("removeUserFromGroup: User has been removed from the group"); cg.log("removeUserFromGroup (Exit)"); } function userBelongsToGroup(username) { cb.log("userBelongsToGroup (Enter)"); cb.log("userBelongsToGroup: Determing which group user belongs to - username: " + username); cb.log("userBelongsToGroup: Setting group name to NoGroup in case the user can't be found in any group"); var groupName = 'noGroup'; cb.log("userBelongsToGroup: Starting to look through each group to see if the user belongs to each group"); if(username in group1Members) { cb.log("userBelongsToGroup: User belongs to group1"); groupName = 'group1'; } else if (username in group2Members) { cb.log("userBelongsToGroup: User belongs to group2"); groupName = 'group2'; } else if (username in group3Members) { cb.log("userBelongsToGroup: User belongs to group3"); groupName = 'group3'; } else if (username in group4Members) { cb.log("userBelongsToGroup: User belongs to group4"); groupName = 'group4'; } else if (username in group5Members) { cb.log("userBelongsToGroup: User belongs to group5"); groupName = 'group5'; } else if (username in group6Members) { cb.log("userBelongsToGroup: User belongs to group6"); groupName = 'group6'; } else if (username in group7Members) { cb.log("userBelongsToGroup: User belongs to group7"); groupName = 'group7'; } else if(username in group8Members) { cb.log("userBelongsToGroup: User belongs to group8"); groupName = 'group8'; } else if (username in group9Members) { cb.log("userBelongsToGroup: User belongs to group9"); groupName = 'group9'; } else if (username in group10Members) { cb.log("userBelongsToGroup: User belongs to group10"); groupName = 'group10'; } else if (username in group11Members) { cb.log("userBelongsToGroup: User belongs to group11"); groupName = 'group11'; } else if (username in group12Members) { cb.log("userBelongsToGroup: User belongs to group12"); groupName = 'group12'; } else if (username in group13Members) { cb.log("userBelongsToGroup: User belongs to group13"); groupName = 'group13'; } else if (username in group14Members) { cb.log("userBelongsToGroup: User belongs to group14"); groupName = 'group14'; } else if (username in group15Members) { cb.log("userBelongsToGroup: User belongs to group15"); groupName = 'group15'; } else { cb.log("userBelongsToGroup: User doesn't belong to any group"); } cb.log("userBelongsToGroup: Returning the group name: " + groupName); cb.log("userBelongsToGroup (Exit)"); return groupName; } function userIsBlocked(username) { cb.log("userIsBlocked: Checking to see if user is blocked: " + username); return (username in blockMembers); } function setBlock(username) { cb.log("setBlock (Enter)"); cb.log("setBlock: Adding username to Block Members List: " + username); blockMembers[username] = {'u': 1}; cb.log("setBlock (Exit)"); } function unBlock(username) { cb.log("unBlock (Enter)"); cb.log("unBlock: Removing username fromt he Block Members List: " + username); delete blockMembers[username]; cb.log("unBlock (Exit)"); } function makeItRainText(rainCount, rainText) { cb.log("makeItRainText (Enter)"); cb.log("makeItRainText: Raining Text: '" + rainText + "' - " + rainCount + " times"); for (var i=0; i < rainCount; i++) { cb.sendNotice(rainText); } cb.log("makeItRainText: Completed raining text"); cb.log("makeItRainText (Exit)"); } function setMinimumTips() { cb.log("setMinimumTips (Enter)"); cb.log("setMinimumTips: Setting the minimum tips for each group based on the Settings for this app"); cb.log("setMinimumTips: Setting Group1 Tips"); group1MinTip = cb.settings.group1MinTip; cb.log("setMinimumTips: Setting Group2 Tips"); group2MinTip = cb.settings.group2MinTip; cb.log("setMinimumTips: Setting Group3 Tips"); group3MinTip = cb.settings.group3MinTip; cb.log("setMinimumTips: Setting Group4 Tips"); group4MinTip = cb.settings.group4MinTip; cb.log("setMinimumTips: Setting Group5 Tips"); group5MinTip = cb.settings.group5MinTip; cb.log("setMinimumTips: Setting Group6 Tips"); group6MinTip = cb.settings.group6MinTip; cb.log("setMinimumTips: Setting Group7 Tips"); group7MinTip = cb.settings.group7MinTip; cb.log("setMinimumTips: Setting Group8 Tips"); group8MinTip = cb.settings.group8MinTip; cb.log("setMinimumTips: Setting Group9 Tips"); group9MinTip = cb.settings.group9MinTip; cb.log("setMinimumTips: Setting Group10 Tips"); group10MinTip = cb.settings.group10MinTip; cb.log("setMinimumTips: Setting Group11 Tips"); group11MinTip = cb.settings.group11MinTip; cb.log("setMinimumTips: Setting Group12 Tips"); group12MinTip = cb.settings.group12MinTip; cb.log("setMinimumTips: Setting Group13 Tips"); group13MinTip = cb.settings.group13MinTip; cb.log("setMinimumTips: Setting Group14 Tips"); group14MinTip = cb.settings.group14MinTip; cb.log("setMinimumTips: Setting Group15 Tips"); group15MinTip = cb.settings.group15MinTip; cb.log("setMinimumTips (Exit)"); } function showRules() { return "ROOM RULES: " + cb.settings.roomRules; } function init() { cb.log("init (Enter)"); cb.log("Building the Member Lists"); buildMemberLists(); cb.log("Init: Sending a notice to use the help command"); cb.sendNotice('Type /kwhelp for Help menu','','','','bold'); cb.log("init: Finished initializing"); cb.log("init (Exit)"); } cb.log("Calling init()"); init();
© Copyright Chaturbate 2011- 2024. All Rights Reserved.