Advertisement
Guest User

Untitled

a guest
Dec 13th, 2019
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.91 KB | None | 0 0
  1. #!/usr/bin/env node
  2. const https = require('https');
  3. var irc = require('irc');
  4. var _ = require("underscore");
  5. const faker = require('faker/locale/en');
  6. const fakeres = require('faker/locale/es');
  7. var interval = 10000;
  8.  
  9. function makeid() {
  10. var text = "";
  11. var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
  12.  
  13. for (var i = 0; i < 2; i++)
  14. text += possible.charAt(Math.floor(Math.random() * possible.length));
  15.  
  16. return text;
  17. }
  18.  
  19. function numberid() {
  20. var text = "";
  21. var possible = "0123456789";
  22.  
  23. for (var i = 0; i < 1; i++)
  24. text += possible.charAt(Math.floor(Math.random() * possible.length));
  25. return text;
  26. }
  27. var config = {
  28. botName: faker.name.firstName(),
  29. target: "Hikikmori98",
  30. message: faker.lorem.sentence(nb_words = 3) + " #fobia-social by Enrike45"
  31.  
  32. }
  33.  
  34. var targets = [
  35. 'nusia','win-stats','vviridiana','storm^','spoilers','singularidad','am_40','reverie','pensativo','pececito','pastafari','netman','lobosolitario','laportazos','kleoplanta','itsallrightma','giorgione','erion','cristiana434','contraindicada','bicicleta','angel2',
  36. ]
  37. targets.push('AM_40')
  38.  
  39. var opts = {
  40. debug: true,
  41. userName: config.botName,
  42. realName: config.botName,
  43. }
  44.  
  45. for (let index = 0; index < 1; index++) {
  46. spam();
  47.  
  48. }
  49. // var MyVar = setInterval(spam, 1000);
  50.  
  51.  
  52. async function spam() {
  53. let bot;
  54. try {
  55. // var bot = new irc.Client('irc.chathispano.com', config.botName + numberid(), opts);
  56. bot = new irc.Client('irc.chathispano.com', 'Brenda_' + faker.random.number(999), opts);
  57. // bot = new irc.Client('irc.chathispano.com', 'atrox78:Atrox78Atrox78', opts);
  58. }
  59. catch (e) { console.log(e); }
  60.  
  61.  
  62. bot.addListener('error', function (message) {
  63. console.error('ERROR: %s: %s', message.command, message.args.join(' '));
  64. });
  65.  
  66. // setTimeout(async function () {
  67. // await bot.say(config.target, config.message);
  68. // // await bot.say("mujerconalma", config.message);
  69.  
  70. // await bot.disconnect();
  71. // }, 2000);
  72.  
  73. bot.addListener('registered', function (message) {
  74.  
  75. // for (let index = 0; index < targets.length; index++) {
  76. // bot.say(targets[index], config.message);
  77.  
  78. // }
  79.  
  80. targets.forEach(function (element, index) {
  81.  
  82. // ENTREN #FOBIA-SOCIAL @Polilla
  83. bot.say(element,"#fobia-social");
  84. // bot.action(element, faker.lorem.sentence(nb_words = 4) + " #fobia-social")
  85. // bot.send('notice', element, "@Hazel la mejor mod del chat");
  86.  
  87.  
  88.  
  89. });
  90.  
  91. bot.disconnect("bye", () => {
  92. spam();
  93. });
  94.  
  95.  
  96. });
  97. }
  98.  
  99. function delay(seconds) {
  100. var x = 0;
  101. setTimeout(function () {
  102. if (x) {
  103. return undefined;
  104. }
  105. x++;
  106. }, seconds * 1000);
  107. }
  108. // Usage!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement