Bots Home
|
Create an App
User Bot
Author:
nuker10
Description
Source Code
Launch Bot
Current Users
Created by:
Nuker10
/* User Bot */ var gatekeeper={whiteList:[],greyChatPermission:!0,init:function(){"No"==cb.settings.poor_user_control&&(gatekeeper.greyChatPermission=!1);var a=String(cb.settings.init_white_list).replace(/\s+/g,"");gatekeeper.whiteList=a.split(",")},testSpam:function(a){return gatekeeper.greyChatPermission||cbjs.arrayContains(gatekeeper.whiteList,a.user)||a.has_tokens||a.tipped_tons_recently||a.tipped_alot_recently||a.tipped_recently||a.in_fanclub||1==a.is_mod?!1:!0},makeWhite:function(a){cbjs.arrayContains(gatekeeper.whiteList, a)||(gatekeeper.whiteList.push(a),cb.sendNotice("User "+a+" has been added to white list.",shell.master,"#FFFFFF","#00B61C","bold"))},killWhite:function(a){cbjs.arrayContains(gatekeeper.whiteList,a)&&(cbjs.arrayRemove(gatekeeper.whiteList,a),cb.sendNotice("User "+a+" has been removed from white list.",shell.master,"#FFFFFF","#DC5500","bold"))},showList:function(){cb.sendNotice("WhiteList: "+gatekeeper.whiteList.join()+".",shell.master,"#FFFFFF","#F29C06","bold")}},watchdog={initWatch:function(){cb.onEnter(function(a){"m"!= a.gender&&(cb.sendNotice(a.user+"/"+a.gender+" entered",shell.master,"#FFFFFF","#00B61C","bold"),cb.sendNotice("Welcome "+a.user+"! \n If you like to start a pm, please type '/pingme' \n P.S. I am looking for a females. Say hi if you like me. Enjoy the show. Thank you. ",a.user,"#FFFFFF","#0C6A93","bold"))});cb.onLeave(function(a){"m"!=a.gender&&cb.sendNotice(a.user+"/"+a.gender+ " left",shell.master,"#FFFFFF","#DC5500","normal")});cb.onMessage(function(a){gatekeeper.testSpam(a)?(a["X-Spam"]=!0,cb.sendNotice("Sorry. You don't have enough tokens to message me.",a.user,"#FFFFFF","#B90000","bold")):"/pingme"==a.m.match(/^\/pingme/g)?(cb.sendNotice(a.user+"/"+a.gender+" requested for PM.",shell.master,"#FFFFFF","#B90000","bold"),cb.sendNotice("Hi there "+a.user+"! I'll PM you shortly. Thank you. :) ",a.user,"#FFFFFF","#0C6A93","bold"),a["X-Spam"]=!0):a.user==shell.master&&"/"== a.m.match(/^\//g)&&(shell.exec(a),a["X-Spam"]=!0);return a})}},shell={master:cb.room_slug,settings:[{name:"poor_user_control",type:"choice",choice1:"Yes",choice2:"No",defaultValue:"No",label:"Allow grey users to chat?"},{name:"init_white_list",type:"str",minLength:1,maxLength:1E3,required:!1,defaultValue:"hardcan0n,_beverly_",label:"WhiteList"}],exec:function(a){var b=a.m.split(" ");a=b.shift();var c=b.shift(),b=b.join(" ");switch(a){case "/grey":b=c;"on"==b?(gatekeeper.greyChatPermission=!0,cb.sendNotice("Grey users chat is turned on.", shell.master,"#FFFFFF","#00B61C","bold")):"off"==b?(gatekeeper.greyChatPermission=!1,cb.sendNotice("Grey users chat is turned off.",shell.master,"#FFFFFF","#DC5500","bold")):"status"==b&&(gatekeeper.greyChatPermission?cb.sendNotice("Grey users are allowed to chat.",shell.master,"#FFFFFF","#00B61C","bold"):cb.sendNotice("Grey users are not allowed to chat.",shell.master,"#FFFFFF","#DC5500","bold"));break;case "/allow":gatekeeper.makeWhite(c);break;case "/block":gatekeeper.killWhite(c);break;case "/list":gatekeeper.showList(); break;case "/pm":cb.sendNotice("PM : "+b,c,"#FFFFFF","#6200bd","bold");break;default:cb.sendNotice("Invalid command. Try again.",shell.master,"#FFFFFF","#6200bd","bold")}}};function init(){cb.settings_choices=shell.settings;gatekeeper.init();watchdog.initWatch()}init();
© Copyright Chaturbate 2011- 2026. All Rights Reserved.