corral

Untitled

Jan 30th, 2019
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.04 KB | None | 0 0
  1. //TESTING
  2.  
  3.  
  4. d = [ ];
  5. var obj = { };
  6. cohost = [ "o9CDijBNYE","3qr5hbPoYY","IGHOsTHERA","xV6ARuCCHI","ORRLwk4y.."]; //co-host tripcodes
  7. badwords = ["kontol","ngentot","ngewe","test9","memek","dildo","vibrator","titit","ngaceng","bokep","colmek","parabot"];
  8. regex = new RegExp(badwords.join("|"), 'i');
  9.  
  10. $(window).on('room.chat.join',function(event,joined){
  11.  
  12.  
  13. var xxx = joined.user.name;
  14. var godie = xxx.replace(/\s+/g, "");
  15. var godie = godie.replace(/(.)\1{1,}/ig, '$1');
  16.  
  17.  
  18. if(regex.test(godie) === true){
  19. $.post("#",{kick:joined.user.id});
  20. }
  21. else if(cohost.includes(joined.user.tripcode) === true){
  22. var omurice = joined.user.id;
  23. d.push(omurice);
  24. }
  25. else if(cohost.includes(joined.user.tripcode) === false){
  26. obj[joined.user.name] = joined.user.id;
  27. }
  28.  
  29. });
  30.  
  31. $(window).on('room.chat.message',function(event,chat){
  32.  
  33. kero = chat.message.split(" ");
  34. ghost = [kero[0]];
  35. tomat = $(kero).not(ghost).get();
  36. sayn = tomat.join(" ");
  37. luck = ["lucky", "not lucky", "silahkan coba lagi", "anda belum beruntung", "moderate luck", "bad luck", "great luck"];
  38. random = luck[Math.floor(Math.random()*luck.length)];
  39. msg = chat.message.replace(/\s+/g, "");
  40. msg = msg.replace(/(.)\1{1,}/ig, '$1');
  41.  
  42.  
  43. if(regex.test(msg) === true){
  44. $.post("#",{kick:chat.from.id});
  45. }
  46. else if(d.includes(chat.from.id) === true && chat.message == "!hostomu"){
  47. $.post("#",{new_host:chat.from.id});
  48. }
  49. else if((profile.id === chat.from.id || d.includes(chat.from.id) === true) && chat.message=="!test"){
  50. $.post("#",{message :"/me" + d});
  51. }
  52. else if((profile.id === chat.from.id || d.includes(chat.from.id) === true) && chat.message=="!test1"){
  53. $.post("#",{message :"/me" + JSON.stringify(obj)});
  54. }
  55. else if((profile.id === chat.from.id || d.includes(chat.from.id) === true) && kero[0]=="!kick"){
  56. $.post("#",{kick: obj[sayn]});
  57. }
  58. else if((profile.id === chat.from.id || d.includes(chat.from.id) === true) && kero[0]=="!ban"){
  59. $.post("#",{ban: obj[sayn]});
  60. }
  61. else if((profile.id === chat.from.id || d.includes(chat.from.id) === true) && chat.message=="!djon"){
  62. $.post("#",{dj_mode: true});
  63. }
  64. else if((profile.id === chat.from.id || d.includes(chat.from.id) === true) && chat.message=="!djoff"){
  65. $.post("#",{dj_mode: false});
  66. }
  67. else if((profile.id === chat.from.id || d.includes(chat.from.id) === true) && kero[0]=="!topik"){
  68. $.post("#",{room_description: sayn});
  69. }
  70. else if(chat.message=="!luck0"){
  71. $.post("#",{message: "/me ramalan keberuntungan anda: " + random});
  72. }
  73. else if(room.host === chat.from.id && kero[0]=="!push"){
  74. cohost.push(sayn);
  75. }
  76. else if(room.host === chat.from.id && kero[0]=="!addbad"){
  77. badwords.push(sayn);
  78. }
  79.  
  80. });
Add Comment
Please, Sign In to add comment