letter e and logging

This commit is contained in:
Flummi 2020-02-14 15:27:41 +01:00
parent 32c756e95f
commit ee798c0c6a

View File

@ -1,3 +1,5 @@
import logger from "../log.mjs";
const versions = [
"AmIRC.1 (8 Bit) for Commodore Amiga 500",
"HexChat 0.72 [x86] / Windows 95c [500MHz]"
@ -9,12 +11,14 @@ export default async bot => {
name: "version",
listener: "ctcp:version",
f: e => {
logger.info(`${e.network} -> ${e.channel} -> ${e.user.nick}: ctcp:version ${e.message}`);
e.write(`notice ${e.user.nick} :\u0001VERSION ${versions[~~(Math.random() * versions.length)]}\u0001`);
}
}, {
name: "ping",
listner: "ctcp:ping",
listener: "ctcp:ping",
f: e => {
logger.info(`${e.network} -> ${e.channel} -> ${e.user.nick}: ctcp:ping ${e.message}`);
e.write(`notice ${e.user.nick} :${e.message}`);
}
}];