Bots Home
|
Create an App
antispambot
Author:
tester
Description
Source Code
Launch Bot
Current Users
Created by:
Tester
var users =[]; var pass=Math.floor((Math.random() * 9000) + 1001); var number =['zero','one','two','three','four','five','six','seven','eight','nine']; var passp=pass.toString().split(""); var usernotice1="To prevent spambots grey users must first enter the following number to be able to chat.\n"; var usernotice2=number[passp[0]]+" "+number[passp[1]]+" "+number[passp[2]]+" "+number[passp[3]]+" (enter as a number , e.g. 2345)"; var usernotice3=usernotice1+usernotice2; cb.chatNotice("Michal's anti spam bots is active."); cb.onEnter(function(user) { cb.sendNotice("Welcome " + user['user'] + "!\nMichal's anti spambots is active for grey users." ,user['user']); }); cb.onMessage(function (msg) { if (msg['has_tokens'] == true){return msg} if (users.indexOf(msg['user']) != -1){return msg} if (msg['m'] == pass.toString()){users.push(msg['user']);msg['X-Spam'] = true;msg['m']="Correct number, You may talk now.";return msg} setTimeout(function(){ cb.sendNotice(usernotice3,msg['user']); }, 500); msg['m']="Please read the instructions and enter the correct number to talk."; msg['X-Spam'] = true; return msg; });
© Copyright Chaturbate 2011- 2024. All Rights Reserved.