Bots Home
|
Create an App
Anti-Anonymous
Author:
xizk99
Description
Source Code
Launch Bot
Current Users
Created by:
Xizk99
/** * App: Anti-anonymous * Version: 1.9.5 * Author: xIzk99 * Modified: 12.17.2016 */ var color = { info : '#144D8C', // blue gray notice : '#6900CC', // purple syntax : '#995B00', // brown-ish orange : "#DC5500", red : "#DC0000", lightblue : "#69A", darkblue : "#009", grey : "#666666", darkpurple : "#804baa", lightpurple : "#be6aff" }; var HideChat = ["None", "All", "Mods+Broadcasters"]; var activeUsers = cb.room_slug; var FriendsList = []; var BlockedList = []; var maxInactiveMinutes = 0; var runBot = false; var xAccess = 'greys'; var xShowCreepers = false; var xCamMessage = "** Restricted Video **"; var xChatRequired = false; var xCode = ''; // MT var colors = []; var emote = []; var activeChatUsers = []; var xHideChat = 0; var color_code = { black : "#000000", blue : "#0000FF", blueviolet : "#8A2BE2", brown : "#A52A2A", cadetblue : "#5F9EA0", chocolate : "#D2691E", coral : "#FF7F50", cornflowerblue : "#6495ED", crimson : "#DC143C", cyan : "#00FFFF", darkblue : "#00008B", darkcyan : "#008B8B", darkgoldenrod : "#B8860B", darkgray : "#A9A9A9", darkgrey : "#A9A9A9", darkgreen : "#006400", darkkhaki : "#BDB76B", darkmagenta : "#8B008B", darkolivegreen : "#556B2F", darkorange : "#FF8C00", darkorchid : "#9932CC", darkred : "#8B0000", darksalmon : "#E9967A", darkseagreen : "#8FBC8F", darkslateblue : "#483D8B", darkslategray : "#2F4F4F", darkslategrey : "#2F4F4F", darkturquoise : "#00CED1", darkviolet : "#9400D3", deeppink : "#FF1493", deepskyblue : "#00BFFF", dodgerblue : "#1E90FF", firebrick : "#B22222", forestgreen : "#228B22", fuchsia : "#FF00FF", gray : "#808080", grey : "#808080", green : "#008000", greenyellow : "#ADFF2F", hotpink : "#FF69B4", indianred : "#CD5C5C", indigo : "#4B0082", lawngreen : "#7CFC00", lime : "#00FF00", limegreen : "#32CD32", magenta : "#FF00FF", maroon : "#800000", mediumaquamarine : "#66CDAA", mediumblue : "#0000CD", mediumorchid : "#BA55D3", mediumpurple : "#9370DB", mediumseagreen : "#3CB371", mediumslateblue : "#7B68EE", mediumspringgreen : "#00FA9A", mediumturquoise : "#48D1CC", mediumvioletred : "#C71585", midnightblue : "#191970", navy : "#000080", olive : "#808000", olivedrab : "#6B8E23", orangered : "#FF4500", orchid : "#DA70D6", paleturquoise : "#AFEEEE", palevioletred : "#DB7093", peru : "#CD853F", pink : "#FFC0CB", plum : "#DDA0DD", powderblue : "#B0E0E6", purple : "#800080", red : "#FF0000", rosybrown : "#BC8F8F", royalblue : "#4169E1", saddlebrown : "#8B4513", salmon : "#FA8072", sandybrown : "#F4A460", seagreen : "#2E8B57", sienna : "#A0522D", skyblue : "#87CEEB", slateblue : "#6A5ACD", slategray : "#708090", slategrey : "#708090", springgreen : "#00FF7F", steelblue : "#4682B4", teal : "#008080", tomato : "#FF6347", turquoise : "#40E0D0", violet : "#EE82EE", yellowgreen : "#9ACD32", cardinal : "#500000", flaminghomo : "#FF69B4", midnight : "#191970", gayblue : "#0066cc" }; cb.settings_choices = [{ name : "CC_access", label : "Minimum user color to view cam?", type : "choice", choice1 : "greys", choice2 : "blues", choice3 : "darkblues", choice4 : "purples", choice5 : "friends", defaultValue : "greys" }, { name : 'CC_code', type : 'str', label : 'Secret password to unlock cam (optional)', minLength : 0, maxLength : 15, defaultValue : '', required : false }, { name : 'CC_idletime', type : 'int', label : 'How many minutes before the user has to chat again to unlock the cam? (0 to disable)', defaultValue : '0', minValue : '0' }, { name : 'CC_hidechat', label : "Hide chat from anonymous viewers?", type : "choice", choice1 : "No", choice2 : "Yes", choice3 : "Mods+Broadcaster", defaultValue : "No" }, { name : 'CC_showCreepers', type : 'choice', choice1 : 'No', choice2 : 'Yes', defaultValue : 'No', label : "Show entering/exiting creepers to mods & broadcasters (to view greys)?" }, { name : 'CC_friends', type : 'str', label : 'Friends who can always view (comma separated)', minLength : 0, maxLength : 2048, defaultValue : '', required : false }, { name : 'CC_blocked', type : 'str', label : 'Users who are blocked from chatting and viewing (comma seperated)', minLength : 0, maxLength : 2048, defaultValue : '', required : false } ]; cb.onEnter(function (msg) { var username = msg['user']; var isMod = msg['is_mod']; var isBlue = msg['has_tokens']; var isDarkBlue = msg['tipped_recently']; var isPurple = msg['tipped_alot_recently']; var timeStamp = new Date().timeNow(); if (xShowCreepers) { cb.sendNotice(timeStamp + ' ' + username + ' joined the room.', cb.room_slug, color.orange, '', 'bolder'); cb.sendNotice(timeStamp + ' ' + username + ' joined the room.', '', color.orange, '', 'bolder', 'red'); } if ((username !== undefined)) { if (cbjs.arrayContains(BlockedList, username)) { if (runBot === true) cb.sendNotice('You are blocked from viewing this cam.', username, color.red, '', 'bold'); if (xShowCreepers) { cb.sendNotice(timeStamp + ' ' + username + ' is blocked', cb.room_slug, color.orange, '', 'bolder'); cb.sendNotice(timeStamp + ' ' + username + ' is blocked', '', color.orange, '', 'bolder', 'red'); } } else { if (!cbjs.arrayContains(activeChatUsers, username)) activeChatUsers.push(username); var allowedAccess = ((isMod && (xAccess !== 'friends')) || (xAccess === 'greys') || ((xAccess === 'blues') && isBlue) || ((xAccess === 'darkblues') && isDarkBlue) || ((xAccess === 'purples') && isPurple)); if (((!xChatRequired && allowedAccess) || cbjs.arrayContains(FriendsList, username)) && (runBot === true)) { if (!cb.limitCam_userHasAccess(username)) allowUserToView(username); if (getUserIndex(username) === undefined) addUserToActiveList(username); } } } }); // End of onEnter() cb.onTip(function (tip) { var username = tip['from_user']; if (runBot === true && !cbjs.arrayContains(BlockedList, username) && (xAccess !== 'friends') && (xChatRequired)) { if (!cb.limitCam_userHasAccess(username)) allowUserToView(username); if (getUserIndex(username) === undefined) { addUserToActiveList(username); } else { updateUserLastActiveTime(username); } } }); // End of onTip() cb.onLeave(function (msg) { var username = msg['user']; var timeStamp = new Date().timeNow(); // cb.log('Left Room: ' + username + '!'); // cb.chatNotice('Bye ' + msg['user'] + '!'); if (xShowCreepers) { cb.sendNotice(timeStamp + ' ' + username + ' left the room.', cb.room_slug, color.orange, '', 'bolder'); cb.sendNotice(timeStamp + ' ' + username + ' left the room.', '', color.orange, '', 'bolder', 'red'); } if (username !== undefined) { if (cbjs.arrayContains(activeChatUsers, username)) cbjs.arrayRemove(activeChatUsers, username); if (runBot === true) cb.limitCam_removeUsers([username]); } }); cb.onMessage(function (msg) { var username = msg['user']; var messageh = msg['m']; var isBroadcaster = (username == cb.room_slug); var isMod = msg['is_mod']; var isBlue = msg['has_tokens']; var isDarkBlue = msg['tipped_recently']; var isPurple = msg['tipped_alot_recently']; var isDarkPurple = msg['tipped_tons_recently']; var userHasAccess = (cbjs.arrayContains(cb.limitCam_allUsersWithAccess(), username)); if (username !== undefined) { if (!cbjs.arrayContains(activeChatUsers, username) && !cbjs.arrayContains(BlockedList, username)) activeChatUsers.push(username); if (runBot === true && !cbjs.arrayContains(BlockedList, username) && (username != cb.room_slug)) { var allowedAccess = ((isMod && (xAccess != 'friends')) || (xAccess === 'greys') || ((xAccess === 'blues') && isBlue) || ((xAccess === 'darkblues') && isDarkBlue) || ((xAccess === 'purples') && isPurple)); if (!!xCode) { if (msg['m'].toLowerCase() == xCode.toLowerCase()) { msg['X-Spam'] = true; cb.sendNotice('*** Code has been accepted. Cam will now unlock.', username, '', color.info, 'bold'); cb.sendNotice('*** User ' + username + ' has unlocked the cam with the code **', cb.room_slug, '', color.info, 'bold'); if (!cb.limitCam_userHasAccess(username)) allowUserToView(username); if (getUserIndex(username) === undefined) { addUserToActiveList(username); } else { updateUserLastActiveTime(username); } return msg; } } if (allowedAccess || cbjs.arrayContains(FriendsList, username)) { if (!cb.limitCam_userHasAccess(username)) allowUserToView(username); if (getUserIndex(username) === undefined) { addUserToActiveList(username); } else { updateUserLastActiveTime(username); } } } if ((msg['m'].match(/^![a-z]*/i) || (msg['m'].match(/^\/\//))) && (isBroadcaster || isMod)) { msg['X-Spam'] = true; var parsedInput = msg['m'].split(/\W+/); var parm1 = parsedInput[2]; if (msg['m'].match(/^\/\/ /)) { var smessage = messageh.substring(3, messageh.length); cb.sendNotice(username + (emote[username] || '') + ' (hidden): ' + smessage, '', '', (colors[username] || ((isMod) ? '#DC0000' : '#DC5500')), 'bold', 'red'); cb.sendNotice(username + (emote[username] || '') + ' (hidden): ' + smessage, cb.room_slug, '', (colors[username] || ((isMod) ? '#DC0000' : '#DC5500')), 'bold'); if (username in colors) { msg["c"] = colors[username]; } msg['m'] = "[sending hiddden mesage]"; return msg; } if (msg['m'].match(/^\/\/\/ /)) { msg['X-Spam'] = false; var smessage = messageh.substring(4, messageh.length); if (username in colors) { msg["c"] = colors[username]; } msg['m'] = smessage; return msg; } if (msg['m'].match(/^!mtc/i)) { if (parm1 in color_code) { colors[username] = color_code[parm1]; cb.sendNotice('*** Color ' + parm1 + ' is set.', username, '', colors[username], 'bold'); } else { var colorlist = '*** <color> can be: '; for (key in color_code) { colorlist += key + ' '; } cb.sendNotice('*** SYNTAX ERROR: /mtc <color>', username, '', '#995B00', 'bold'); cb.sendNotice(colorlist, username, '', '#995B00', 'bold'); } return msg; } if (msg['m'].match(/^!mta/i)) { var smessage = messageh.substring(4, messageh.length); if ((smessage)) { emote[username] = smessage; cb.sendNotice('*** Avatar ' + smessage + ' is set. **', username, '', '', 'bold'); } else { emote[username] = ''; cb.sendNotice('*** Avatar ' + smessage + ' is removed. **', username, '', '', 'bold'); } return msg; } if (msg['m'].match(/^!allow/i)) { if ((parm1 === undefined) || (parm1.length === 0)) { cb.sendNotice('** Missing username. **', username, '', color.syntax, 'bold'); } else { if ((parm1.toLowerCase() !== cb.room_slug) && (parm1.toLowerCase() !== username)) { if (!cb.limitCam_userHasAccess(parm1.toLowerCase())) { allowUserToView(parm1.toLowerCase()); if (!cbjs.arrayContains(FriendsList, parm1.toLowerCase())) { FriendsList.push(parm1.toLowerCase()); } if (cbjs.arrayContains(BlockedList, parm1.toLowerCase())) { cbjs.arrayRemove(BlockedList, parm1.toLowerCase()); } cb.sendNotice('*** User ' + parm1.toLowerCase() + ' has been allowed to view.', username, '', color.info, 'bold'); cb.sendNotice('*** ' + username + ' allowed ' + parm1.toLowerCase() + ' access to view.', cb.room_slug, '', color.info, 'bold'); } else { cb.sendNotice('*** User ' + parm1.toLowerCase() + ' already has access.', username, "", color.red, 'bold'); } } else { cb.sendNotice('*** ERROR *** You cannot add the broadcaster or yourself!', username, '', color.syntax, 'bold'); } } return msg; } if (msg['m'].match(/^!block/i)) { if ((parm1 === undefined) || (parm1.length === 0)) { cb.sendNotice('** Missing username. **', username, '', color.syntax, 'bold'); } else { if ((parm1.toLowerCase() !== cb.room_slug) && (parm1.toLowerCase() !== username)) { denyUserToView(parm1.toLowerCase()); if (cbjs.arrayContains(FriendsList, parm1.toLowerCase())) { cbjs.arrayRemove(FriendsList, parm1.toLowerCase()); } if (!cbjs.arrayContains(BlockedList, parm1.toLowerCase())) { BlockedList.push(parm1.toLowerCase()); } cb.sendNotice('** User ' + parm1.toLowerCase() + ' has been blocked from viewing **', username, '', color.info, 'bold'); cb.sendNotice('** ' + username + ' blocked ' + parm1.toLowerCase() + ' from viewing **', cb.room_slug, '', color.info, 'bold'); } else { cb.sendNotice('*** ERROR *** You cannot block the broadcaster or yourself!', username, '', color.syntax, 'bold'); } } return msg; } if (msg['m'].match(/^!check/i)) { if ((parm1 === undefined) || (parm1.length === 0)) { cb.sendNotice('** Username missing as parameter. **', username, '', color.syntax, 'bold'); } else { if (cb.limitCam_userHasAccess(parm1.toLowerCase())) { cb.sendNotice(parm1.toLowerCase() + ' can view', username, '', color.info, 'bold'); } else { cb.sendNotice(parm1.toLowerCase() + ' cannot view', username, '', color.info, 'bold'); } } return msg; } if (msg['m'].match(/^!listall/i)) { var i = cb.limitCam_allUsersWithAccess(); if (i.length > 0) { cb.sendNotice("" + i.length + (i.length > 1 ? " users" : " user") + " viewing: " + cbjs.arrayJoin(i, ", "), username, "", color.info, "bold"); } else { cb.sendNotice("Nobody can view.", username, "", color.info, "bold"); } if (activeChatUsers.length > 0) { cb.sendNotice("" + activeChatUsers.length + (activeChatUsers.length > 1 ? " users" : " user") + " chatting: " + cbjs.arrayJoin(activeChatUsers, ", "), username, "", color.info, "bold"); } else { cb.sendNotice("No users added to hidden chat list.", username, "", color.info, "bold"); } return msg; } if (msg['m'].match(/^!listfriends/i)) { if (FriendsList.length > 0) { cb.sendNotice("" + FriendsList.length + (FriendsList.length > 1 ? " users" : " user") + " manually added: " + cbjs.arrayJoin(FriendsList, ", "), username, "", color.info, "bold"); } else { cb.sendNotice("No manually added users.", username, "", color.info, "bold"); } return msg; } if (msg['m'].match(/^!listblocked/i)) { if (BlockedList.length > 0) { cb.sendNotice("" + BlockedList.length + (BlockedList.length > 1 ? " users" : " user") + " blocked from viewing: " + cbjs.arrayJoin(BlockedList, ", "), username, "", color.info, "bold"); } else { cb.sendNotice("No manually blocked users.", username, "", color.info, "bold"); } return msg; } if (msg['m'].match(/^!cmds/i)) { var commandList = "----- Video Restriction Commands -----\n"; commandList += "!cmds - Shows this command list.\n"; commandList += "!allow [username] - Manually permit a user to view.\n"; commandList += "!block [username] - Block a user from viewing.\n"; commandList += "!check [username] - Checks if a user can view.\n"; commandList += "!listall - Lists all users who can view.\n"; commandList += "!listfriends - Lists all users who have been manually allowed to view.\n"; commandList += "!listblocked - Lists all users who have been blocked from viewing.\n"; commandList += "!mtc - Set your private chat color.\n"; commandList += "!mta - Set your private chat avatar or title.\n"; commandList += "// - Send a private chat msg for mods and broadcasters.\n"; commandList += "/// - Send a public broadcast message to everyone."; if (username == cb.room_slug) { commandList += "\n!showcam - Stops hiding your cam.\n"; commandList += "!hidecam - Starts hiding your cam.\n"; commandList += "!status - Shows the current settings.\n"; commandList += "!reset - Completely reset the viewers and cam\n"; commandList += "!mode - Change viewer access restrictions\n"; commandList += "!code - Set or show the unlock code\n"; commandList += "!clearfriends - Clears the list of allowed users.\n"; commandList += "!clearblocked - Clears the list of blocked users\n"; commandList += "!hidechat - Toggle hiding chat from anonymous viewers."; } cb.sendNotice(commandList, username, "", color.info, "bold"); return msg; } if (isBroadcaster) { if (msg['m'].match(/^!status/i)) { cb.sendNotice(currentStatus(), username, '', color.info, 'bold'); return msg; } if (msg['m'].match(/^!reset/i)) { cb.limitCam_stop(); cb.limitCam_removeAllUsers(); activeUsers = []; startHiddenCam(); cb.sendNotice('*** Cam and allowed users have been reset', username, '', color.info, 'bold'); return msg; } if ((msg['m'].match(/^!hidecam/i)) && !cb.limitCam_isRunning()) { startHiddenCam(); runBot = true; return msg; } if (msg['m'].match(/^!showcam/i)) { stopHiddenCam(); runBot = false; return msg; } if (msg['m'].match(/^!mode/i)) { if ((parm1) && (parm1.match(/(greys|blues|darkblues|purples|friends)/))) { xAccess = parm1; stopHiddenCam(); if (xAccess === 'friends') { cb.limitCam_removeAllUsers(); activeUsers = []; } startHiddenCam(); cb.sendNotice(currentStatus(), username, "", color.info, "bold"); } else { cb.sendNotice('*** Current mode: ' + xAccess, cb.room_slug, '', color.info, 'bold'); cb.sendNotice('*** !mode <access> can be greys, blues, darkblues, purples, or friends', cb.room_slug, '', color.info, 'bold'); } return msg; } if (msg['m'].match(/^!code/i)) { var smessage = messageh.substring(5, messageh.length); if (smessage) xCode = smessage; cb.sendNotice('*** Code is set to ' + xCode + ' ', cb.room_slug, '', '', 'bold'); return msg; } if (msg['m'].match(/^!clearfriends/i)) { FriendsList.length = 0; cb.sendNotice('*** The list of friends has been cleared.', cb.room_slug, '', color.info, 'bold'); return msg; } if (msg['m'].match(/^!clearblocked/i)) { BlockedList.length = 0; cb.sendNotice('*** The list of blocked users has been cleared.', cb.room_slug, '', color.info, 'bold'); return msg; } if (msg['m'].match(/^!hidechat/i)) { if ((parm1) && (parm1.match(/(none|all|mods)/))) { if (parm1 == 'all') xHideChat = 1; if (parm1 == 'mods') xHideChat = 2; else xHideChat = 0; } else { cb.sendNotice('*** !hidechat <mode> can be none, all, or mods', cb.room_slug, '', color.info, 'bold'); } cb.sendNotice('*** Hidden chat is set to: ' + HideChat[xHideChat], cb.room_slug, '', color.info, 'bold'); return msg; } } } // Hide all chat from anonymous if ((xHideChat == 1) && !cbjs.arrayContains(BlockedList, username) && (msg['m'].match(/^[^!\/]/))) { msg['X-Spam'] = true; var msgColor = color.grey; // Crappy method to get the highest color of the user if (isBlue) msgColor = color.lightblue; if (isDarkBlue) msgColor = color.darkblue; if (isPurple) msgColor = color.lightpurple; if (isDarkPurple) msgColor = color.darkpurple; if (isMod) msgColor = color.red; if (isBroadcaster) msgColor = color.orange; if (username in colors) { msgColor = colors[username]; } for (var i = 0; i < activeChatUsers.length; i++) { // cb.sendNotice(username + (emote[username] || '') + ((isMod) ? ' (mod): ' : (isBroadcaster) ? ' (broadcaster): ' : ' (chat): ') + msg['m'], activeChatUsers[i], '', msgColor, 'bold'); cb.sendNotice(username + (emote[username] || ((isMod) ? ' (mod)' : (isBroadcaster) ? ' (broadcaster)' : ' (chat)')) + ' : ' + msg['m'], activeChatUsers[i], '', msgColor, 'bold'); } msg['m'] = "[sending chat message]"; return msg; } else { // Hide broadcaster and mod chat from anonymous if ((xHideChat == 2) && (isBroadcaster || isMod) && (msg['m'].match(/^[^!\/]/))) { msg['X-Spam'] = true; var msgColor = color.red; if (username === cb.room_slug) msgColor = color.orange; if (username in colors) { msgColor = colors[username]; } for (var i = 0; i < activeChatUsers.length; i++) { cb.sendNotice(username + (emote[username] || ((isMod) ? ' (mod)' : (isBroadcaster) ? ' (broadcaster)' : ' (chat)')) + ' : ' + msg['m'], activeChatUsers[i], '', msgColor, 'bold'); } msg['m'] = "[sending chat message]"; return msg; } } } return msg; }); // End of onMessage() function getUserIndex(username) { for (var i = 0; i < activeUsers.length; i++) { if (activeUsers[i].indexOf(username) >= 0) return i; } } function addUserToActiveList(username) { var index = getUserIndex(username); if (index === undefined) activeUsers.push([username, new Date()]); } function removeUserFromActiveList(username) { var index = getUserIndex(username); if (index !== undefined) activeUsers.pop(index); } function getUserLastActiveTime(username) { var index = getUserIndex(username); return activeUsers[index][1]; } function updateUserLastActiveTime(username) { cb.log('updateUserLastActiveTime() running'); var index = getUserIndex(username); activeUsers[index][1] = new Date(); } function getUserLastActiveTimeMinutes(username) { cb.log('getUserLastActiveTimeMinutes() running :: ' + username); var lastActiveDateTime = getUserLastActiveTime(username); var currentDateTime = new Date(); var timeDelta = currentDateTime - lastActiveDateTime; var mins = timeDelta / 60000; cb.log('Last active time mins: ' + username + '/' + mins); return mins; } function updateLastActiveTimes() { cb.log('updateLastActiveTimes() running...'); for (var i = 0; i < activeUsers.length; i++) { var username = activeUsers[i][0]; var minsLastActive = getUserLastActiveTimeMinutes(username); if (xChatRequired) { if ((minsLastActive >= maxInactiveMinutes) && (!cbjs.arrayContains(FriendsList, username))) { denyUserToView(username); removeUserFromActiveList(username); cb.log('Denied user: ' + username); } if (((minsLastActive + 1) >= maxInactiveMinutes) && (!cbjs.arrayContains(FriendsList, username))) { cb.log(username + ' minslastactive' + ' : ' + minsLastActive); cb.log(username + ' maxInactiveMinutes' + ' : ' + maxInactiveMinutes); cb.sendNotice('*** You have 1 minute left before the video will be blocked. Say something in chat to keep viewing.', username, '', color.info, 'bold'); } } } cb.setTimeout(updateLastActiveTimes, 60000); } function allowUserToView(username) { if (!cbjs.arrayContains(cb.limitCam_allUsersWithAccess(), username)) { cb.limitCam_addUsers([username]); cb.sendNotice('*** You now have access to view.', username, '', color.info, 'bold'); if ( xChatRequired ) cb.sendNotice('*** You will need to chat every ' + maxInactiveMinutes + ' minutes or the video will be blocked.', username, '', color.info, 'bold'); cb.log('Granting access to: ' + username); } } function denyUserToView(username) { if (cbjs.arrayContains(cb.limitCam_allUsersWithAccess(), username)) { cb.limitCam_removeUsers([username]); cb.log('Denying access to: ' + username); // cb.sendNotice('*** The cam will now be hidden until you talk again.', username, '', color.info, 'bold'); } } function startHiddenCam() { if (!cb.limitCam_isRunning()) { xCamMessage = 'Video is restricted\n'; cb.limitCam_start(xCamMessage); // cb.sendNotice('*** Video is now hidden', cb.room_slug, '', color.notice, 'bolder'); cb.sendNotice('*** Video has been restricted to ' + xAccess + '.\n*** If you meet that requirement and cannot view try refreshing or chatting.', '', '', color.notice, 'bolder'); } runBot = true; } function stopHiddenCam() { if (cb.limitCam_isRunning()) { cb.limitCam_stop(); cb.sendNotice('*** Disabling viewing restrictions\nEveryone can now see the video.', cb.room_slug, '', color.notice, 'bolder'); } else cb.sendNotice('*** Hidden cam is not running', cb.room_slug, '', color.notice, 'bolder'); cb.limitCam_stop(); runBot = false; } var currentStatus = function () { var status = '*** Current Settings ***\n'; status += '** Restricted video is: '; if (runBot) status += 'running\n'; else status += 'not running\n'; status += '** LimitCam is: '; if (cb.limitCam_isRunning) status += 'running\n'; else status += 'not running\n'; status += '' + xAccess + ' have access to view'; if (xChatRequired === true) status += '\nViewers must chat every ' + maxInactiveMinutes + ' mins to gain access.'; return status; }; Date.prototype.timeNow = function () { return ((this.getHours() < 10) ? "0" : "") + ((this.getHours() > 12) ? (this.getHours() - 12) : this.getHours()) + ":" + ((this.getMinutes() < 10) ? "0" : "") + this.getMinutes() + ":" + ((this.getSeconds() < 10) ? "0" : "") + this.getSeconds() + ((this.getHours() > 12) ? ('PM') : 'AM'); }; function init() { cb.limitCam_stop(); cb.limitCam_stop(); cb.log('Anti-Anonymous bot launched'); maxInactiveMinutes = parseInt(cb.settings.CC_idletime); if (maxInactiveMinutes > 0) { xChatRequired = true; cb.setTimeout(updateLastActiveTimes, 60000); } xAccess = cb.settings.CC_access; if (cb.settings.CC_showCreepers == 'Yes') xShowCreepers = true; if (cb.settings.CC_hidechat == 'Yes') xHideChat = 1; if (cb.settings.CC_hidechat == 'Mods+Broadcaster') xHideChat = 2; if (!!cb.settings.CC_code) xCode = cb.settings.CC_code; if (cb.settings.CC_friends === '') { FriendsList = []; } else { FriendsList = String(cb.settings.CC_friends).trim().toLowerCase().split(/,/); } if (cb.settings.CC_blocked === '') { BlockedList = []; } else { BlockedList = String(cb.settings.CC_blocked).trim().toLowerCase().split(/,/); } cb.log('Settings: Access: ' + xAccess + ' Inactive Time: ' + maxInactiveMinutes); activeUsers = []; } init();
© Copyright Chaturbate 2011- 2026. All Rights Reserved.