From 73610f6c189bbfbe616f018b73b50bb69ea6304c Mon Sep 17 00:00:00 2001 From: Evert Date: Thu, 5 Jan 2017 20:24:07 +0200 Subject: [PATCH] pesky crash fix --- teemant.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/teemant.js b/teemant.js index 2468caf..104694c 100755 --- a/teemant.js +++ b/teemant.js @@ -145,6 +145,11 @@ io.sockets.on('connection', function (socket) { socket.emit('act_client', {type: 'connect_message', message: 'Connecting to server..', error: false}); + if (connectiondata.port === null || connectiondata.server === null) { + return socket.emit('act_client', {type: 'connect_message', server: connectiondata.server, + message: 'Failed to connect to the server!', error: true}); + } + let newConnection = new irclib.IRCConnection(connectiondata, config.client, { authenticationSteps: [