From 13c4356cfc1f58eabc2395fd92e7ebcb96c0a30e Mon Sep 17 00:00:00 2001 From: Stef Dunlap Date: Sat, 11 Mar 2023 01:22:09 -0500 Subject: [PATCH] add options needed for SASL --- config.example.json | 4 ++++ index.js | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/config.example.json b/config.example.json index 64c4870..e0c09b4 100644 --- a/config.example.json +++ b/config.example.json @@ -2,6 +2,10 @@ "server": "irc.libera.chat", "port": 6697, "nick": "chatgpt", + "secure": false, + "sasl": false, + "username": "chatgpt", + "password": "", "channels": ["#chatgpt"], "openaiApiKey": "[redacted]", "initialSystemMessage": "You are a helpful assistant.", diff --git a/index.js b/index.js index a1374ae..9cdf685 100644 --- a/index.js +++ b/index.js @@ -61,7 +61,14 @@ if (fs.existsSync('./messages.json')) { } const client = new irc.Client(config.server, config.nick, { + showErrors: false, + debug: true, + port: config.port, + secure: config.secure, channels: config.channels, + sasl: config.sasl, + userName: config.userName, + password: config.password, }); // listen for messages that start with !chat and call the chatgpt api with a callback that prints the response line by line