Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //TESTING
- d = [ ];
- var obj = { };
- cohost = [ "o9CDijBNYE","3qr5hbPoYY","IGHOsTHERA","xV6ARuCCHI","ORRLwk4y.."]; //co-host tripcodes
- badwords = ["kontol","ngentot","ngewe","test9","memek","dildo","vibrator","titit","ngaceng","bokep","colmek","parabot"];
- regex = new RegExp(badwords.join("|"), 'i');
- $(window).on('room.chat.join',function(event,joined){
- var xxx = joined.user.name;
- var godie = xxx.replace(/\s+/g, "");
- var godie = godie.replace(/(.)\1{1,}/ig, '$1');
- if(regex.test(godie) === true){
- $.post("#",{kick:joined.user.id});
- }
- else if(cohost.includes(joined.user.tripcode) === true){
- var omurice = joined.user.id;
- d.push(omurice);
- }
- else if(cohost.includes(joined.user.tripcode) === false){
- obj[joined.user.name] = joined.user.id;
- }
- });
- $(window).on('room.chat.message',function(event,chat){
- kero = chat.message.split(" ");
- ghost = [kero[0]];
- tomat = $(kero).not(ghost).get();
- sayn = tomat.join(" ");
- luck = ["lucky", "not lucky", "silahkan coba lagi", "anda belum beruntung", "moderate luck", "bad luck", "great luck"];
- random = luck[Math.floor(Math.random()*luck.length)];
- msg = chat.message.replace(/\s+/g, "");
- msg = msg.replace(/(.)\1{1,}/ig, '$1');
- if(regex.test(msg) === true){
- $.post("#",{kick:chat.from.id});
- }
- else if(d.includes(chat.from.id) === true && chat.message == "!hostomu"){
- $.post("#",{new_host:chat.from.id});
- }
- else if((profile.id === chat.from.id || d.includes(chat.from.id) === true) && chat.message=="!test"){
- $.post("#",{message :"/me" + d});
- }
- else if((profile.id === chat.from.id || d.includes(chat.from.id) === true) && chat.message=="!test1"){
- $.post("#",{message :"/me" + JSON.stringify(obj)});
- }
- else if((profile.id === chat.from.id || d.includes(chat.from.id) === true) && kero[0]=="!kick"){
- $.post("#",{kick: obj[sayn]});
- }
- else if((profile.id === chat.from.id || d.includes(chat.from.id) === true) && kero[0]=="!ban"){
- $.post("#",{ban: obj[sayn]});
- }
- else if((profile.id === chat.from.id || d.includes(chat.from.id) === true) && chat.message=="!djon"){
- $.post("#",{dj_mode: true});
- }
- else if((profile.id === chat.from.id || d.includes(chat.from.id) === true) && chat.message=="!djoff"){
- $.post("#",{dj_mode: false});
- }
- else if((profile.id === chat.from.id || d.includes(chat.from.id) === true) && kero[0]=="!topik"){
- $.post("#",{room_description: sayn});
- }
- else if(chat.message=="!luck0"){
- $.post("#",{message: "/me ramalan keberuntungan anda: " + random});
- }
- else if(room.host === chat.from.id && kero[0]=="!push"){
- cohost.push(sayn);
- }
- else if(room.host === chat.from.id && kero[0]=="!addbad"){
- badwords.push(sayn);
- }
- });
Add Comment
Please, Sign In to add comment