Apps Home
|
Create an App
BAH410's curtains
Author:
abelspam
Description
Source Code
Launch App
Current Users
Created by:
Abelspam
var BannedUsers = new Array(); cb.onEnter(function(user) { cb.limitCam_start('you can only watch if the broadcaster grants you acces, meanwhile ask polite if you can watch'); cb.chatNotice('limited acces has started'); //cb.chatNotice(user['user'] + ' has user level = ' + IsAnonymous(user)); cb.limitCam_removeUsers(user['user']); if (user['user']=='abelspam') { cb.chatNotice('Abelspam entered the room and is granted by default, just because he is abelspam!'); cb.limitCam_addUsers([user['user']]); } if (user['has_tokens']) {cb.chatNotice('We see you have tokens!');} else {cb.chatNotice('We see you don\'t have any tokens!!!!');} }); cb.onMessage(function (message) { //if the message is from a moderator or broadcaster check if it // has commands to it. If so process it different if (message['user'] == cb.room_slug) { // Message from boadcaster var str = message['m']; if (str.startsWith('/')) { ProcessBroadCasterRequest(str); message['X-Spam'] = true; message['m'] = 'Hidden PowerOP : ' + message['m']; } } return message }); //Checked function IsAnonymous(user) { //-1 = default or undefined //0= anonymous //1= is reentering know user //2 = new registered user var UserType = -1; if (!cbjs.arrayContains(cb.limitCam_allUsersWithAccess(), user['user'])) { // New registered user cb.limitCam_addUsers([user['user']]); //cb.chatNotice("Hello, " +user['user']+ ". As a registered user you can view " +cb.room_slug+"'s cam.", user['user'], '#fcb2bf', '#000000', 'bold'); UserType = 2; } else { if (cbjs.arrayContains(cb.limitCam_allUsersWithAccess(), user['user'])) { //cb.chatNotice("Welcome back, " +user['user']+ ". As a registered user you can view " +cb.room_slug+"'s cam.", user['user'], '#fcb2bf', '#000000', 'bold'); UserType= 1; } } if (UserType==-1) { //Anonymous user UserType = 0; //cb.chatNotice('Get out you freaking anon') } return UserType; } function ProcessBroadCasterRequest(input) { // Processing the requst placed by the broadcaster var str = input.split(' '); switch(str[0]) { case '/grant': { if (str[1]!=null) { cb.limitCam_addUsers(str[1]); cb.chatNotice('Broadcaster granted ' + str[1]); } break; } case '/blind': { if (str[1]!=null) { cb.limitCam_removeUsers(str[1]); cb.chatNotice('Broadcaster blinded ' + str[1]); } break; } default: { cb.chatNotice('Unknown command'); break; } } }
© Copyright Chaturbate 2011- 2026. All Rights Reserved.