From d5b40279319ebc94373718e5ff0458d1271e207a Mon Sep 17 00:00:00 2001 From: hgw Date: Mon, 2 Oct 2023 02:14:35 +0000 Subject: [PATCH] renaming of files --- Dockerfile | 2 +- index.js => bot.js | 16 ++++++++-------- random-ext.js => random.js | 0 3 files changed, 9 insertions(+), 9 deletions(-) rename index.js => bot.js (93%) rename random-ext.js => random.js (100%) diff --git a/Dockerfile b/Dockerfile index 3737831..a1264ad 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,4 +5,4 @@ COPY package*.json ./ USER node RUN npm i COPY --chown=node:node . . -CMD [ "node", "index.js" ] \ No newline at end of file +CMD [ "node", "bot.js" ] \ No newline at end of file diff --git a/index.js b/bot.js similarity index 93% rename from index.js rename to bot.js index 24c2c85..6a1275a 100644 --- a/index.js +++ b/bot.js @@ -3,20 +3,20 @@ var fs = require("fs"); var request = require('request'); var art = require('ascii-art'); var crypto = require('crypto').webcrypto; -var randomext = require('./random-ext') +var randomext = require('./random') var config = { //edit your shit here - server: "irc.supernets.org", + server: "irc.supernets.org", port: 6697, SSL: true, channels: ['#superbowl', '#dev'], - botName: "fascinus", + botName: "fascinus", userName: "fascinus", realName: "Sneed" }; var bot = new irc.Client(config.server, config.botName, { - channels: config.channels, + channels: config.channels, secure: config.SSL, port: config.port, autoRejoin: true, @@ -26,6 +26,8 @@ var bot = new irc.Client(config.server, config.botName, { floodProtectionDelay: 0 }); +const timer = ms => new Promise(res => setTimeout(res, ms)) + const generateRandomString = (amt) => { const chars = "AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz1234567890`!@#$%^&*()_+{}|\"\',./ᘈᷞኬᲡ᩶ᐨᅚ⸗⡳ᾟⓅᤲ⧛ሥ⸰⯠ᬨ⧻Შ⼷ᢕ᭄◁ⱉጻ៾᪅⎑ᘂᏤ⛰⃡"; @@ -70,18 +72,16 @@ async function ctcp(target, text, amt) { async function rspam(chan, amt) { for(var i=0; i < amt; i++){ - bot.say(chan, generateRandomString(60)); + bot.say(chan, generateRandomString(randomext.integer(100,60))); } } async function uspam(chan, amt){ for(var i=0; i < amt; i++){ - bot.say(chan, "0" + randomext.integer(9,0) + randomext.uString(60,40)); + bot.say(chan, "0" + randomext.integer(9,0) + randomext.uString(120,40)); } } -const timer = ms => new Promise(res => setTimeout(res, ms)) - bot.addListener('message', function(nick, to, text, from) { var args = text.split(' '); if (args[0] === '$help') { diff --git a/random-ext.js b/random.js similarity index 100% rename from random-ext.js rename to random.js