1
0
forked from keinBot/cuffeo
Files
scuffeo/src/clients/irc/who.mjs
2021-05-11 07:32:08 +00:00

21 lines
461 B
JavaScript

const max = 400;
let whois = [];
let chan;
export default bot => {
bot._cmd.set("352", msg => { // who_entry
chan = msg.params[1];
whois.push(msg.params[5]);
});
bot._cmd.set("315", msg => { // who_end
bot.server.channel.set(chan, whois);
whois = [...new Set(whois)];
Array(Math.ceil(whois.length / 10)).fill().map(_ => whois.splice(0, 10)).forEach(l => {
//console.log(l);
bot.whois(l);
});
whois = [];
});
};