Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //start copying here
- d = [ ];
- var obj = { };
- cohost = [""]; //co-host tripcodes
- anggota = ["test1"];
- bacot = ["n0obmaster69"];
- $(window).on('room.chat.join',function(event,joined){
- var xxx = joined.user.name;
- var godie = xxx.replace(/\s+/g, "");
- var godie = xxx.replace(/\./g, "");
- var godie = godie.replace(/(.)\1{1,}/ig, '$1');
- regex1 = new RegExp(bacot.join("|"), 'i');
- if(regex1.test(godie) === true){
- $.post("#",{kick:joined.user.id});
- }
- regex = new RegExp(anggota.join("|"), 'i');
- if(regex.test(godie) === false){
- $.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(" ");
- msg = chat.message.replace(/\s+/g, "");
- msg = msg.replace(/(.)\1{1,}/ig, '$1');
- regex = new RegExp(bacot.join("|"), 'i');
- if(regex.test(msg) === true){
- $.post("#",{kick:chat.from.id});
- }
- else if(room.host === chat.from.id && kero[0]=="/add"){
- anggota.push(sayn);
- }
- else if(room.host === chat.from.id && kero[0]=="/addbct"){
- bacot.push(sayn);
- }
- else if(room.host === chat.from.id && kero[0]=="/del"){
- anggota.pop(sayn);
- }
- else if(room.host === chat.from.id && kero[0]=="/delbct"){
- bacot.pop(sayn);
- }
- });
- //credit: nasitelur, myself, n0bu, godie, and many "radio" room users who were willing to be used as guinea pigs.
- //end of copy
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement