Fix IRC fetch logic

This commit is contained in:
Yarmo Mackenbach 2021-03-25 16:27:57 +01:00
parent e6e25a65e7
commit ff93ceee0d
No known key found for this signature in database
GPG key ID: 37367F4AF4087AD1

View file

@ -15,7 +15,7 @@ limitations under the License.
*/
const irc = require('irc-upd')
module.exports = async (nickQuery, opts) => {
module.exports = async (hostname, nickQuery, opts) => {
let timeoutHandle
const timeoutPromise = new Promise((resolve, reject) => {
timeoutHandle = setTimeout(
@ -26,7 +26,7 @@ module.exports = async (nickQuery, opts) => {
const fetchPromise = new Promise((resolve, reject) => {
try {
const client = new irc.Client(opts.hostname, opts.nick, {
const client = new irc.Client(hostname, opts.nick, {
port: 6697,
secure: true,
channels: [],