max flood limit

This commit is contained in:
hgw 2023-10-02 02:14:35 +00:00
parent d5b4027931
commit 96b361ce07

20
bot.js
View File

@ -48,10 +48,14 @@ async function help(chan) {
bot.say(chan, "$uspam [LINES] - Spams x lines of random unicode characters of varying length")
}
async function flood(text, chan, times) {
for(var i=0; i < times; i++){
async function flood(text, chan, amt) {
if (amt > '100000') {
bot.say(chan, "no");
} else {
for(var i=0; i < amt; i++){
bot.say(chan, text);
}
}
}
async function sneed(chan) {
@ -64,22 +68,34 @@ async function sneed(chan) {
}
async function ctcp(target, text, amt) {
if (amt > '100000') {
bot.say(chan, "no");
} else {
for(var i=0; i < amt; i++){
bot.ctcp(target, "privmsg", text);
await timer(1000);
}
}
}
async function rspam(chan, amt) {
if (amt > '100000') {
bot.say(chan, "no")
} else {
for(var i=0; i < amt; i++){
bot.say(chan, generateRandomString(randomext.integer(100,60)));
}
}
}
async function uspam(chan, amt){
if (amt > '100000') {
bot.say(chan, "no")
} else {
for(var i=0; i < amt; i++){
bot.say(chan, "0" + randomext.integer(9,0) + randomext.uString(120,40));
}
}
}
bot.addListener('message', function(nick, to, text, from) {