Compare commits

...

2 commits

Author SHA1 Message Date
79b76b4499
mcserver: for later 2026-03-26 15:05:23 -06:00
20dc58ff34
fedimbed: another two (edgelord ones) 2026-03-26 14:54:56 -06:00
2 changed files with 31 additions and 3 deletions

View file

@ -90,11 +90,14 @@ const TW_DOMAINS = [
"girlcockx.com", "girlcockx.com",
"ilsforpresident.com", "ilsforpresident.com",
"theworstplaceontheinter.net", "theworstplaceontheinter.net",
// these two are base64 encoded just because i dont want those words in my codebase
Buffer.from("aGl0bGVyeC5jb20=", "base64").toString(),
Buffer.from("bmlnZ2VyeC5jb20=", "base64").toString(),
"peepeepoopoodumdumtwitterx.org", "peepeepoopoodumdumtwitterx.org",
"skibidix.com", "skibidix.com",
// these are base64 encoded just because i dont want those words in my codebase
// nor give them free advertizing for being edgelords
Buffer.from("aGl0bGVyeC5jb20=", "base64").toString(),
Buffer.from("bmlnZ2VyeC5jb20=", "base64").toString(),
Buffer.from("bmlnZ2VyZmFnZ290eC5jb20=", "base64").toString(),
Buffer.from("Y3Vubnl4LmNvbQ==", "base64").toString(),
]; ];
const pageParser = new XMLParser({ const pageParser = new XMLParser({

View file

@ -121,6 +121,31 @@ function hexToAnsi(hex) {
return 30 + (channelBit(r) + channelBit(g) * 2 + channelBit(b) * 4); return 30 + (channelBit(r) + channelBit(g) * 2 + channelBit(b) * 4);
} }
/*const levels256 = [0, 95, 135, 175, 215, 255];
function closest256(c) {
return levels256.reduce((prev, cur) => (Math.abs(cur - c) < Math.abs(prev - c) ? cur : prev));
}
function hexToAnsi256(hex) {
hex = hex.replace("#", "");
const r = parseInt(hex.substring(0, 2), 16);
const g = parseInt(hex.substring(2, 4), 16);
const b = parseInt(hex.substring(4, 6), 16);
if (r === g && g === b) {
if (r < 8) return 16;
if (r > 248) return 231;
return Math.round(((r - 8) / 247) * 24) + 232;
}
const ri = levels256.indexOf(closest256(r));
const gi = levels256.indexOf(closest256(g));
const bi = levels256.indexOf(closest256(b));
return 16 + 36 * ri + 6 * gi + bi;
}*/
function queryServer(ip, port, HANDSHAKE_PACKET) { function queryServer(ip, port, HANDSHAKE_PACKET) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
logger.verbose("mcserver", "querying", ip, port); logger.verbose("mcserver", "querying", ip, port);