Pass callback to state.connect, fix vars
[KiwiIRC.git] / server / client.js
index ad343f72a26b115ad237a5009875f43c42adfc22..ddcb31249f5f91fb8a47b0f959a43e661cb74000 100755 (executable)
@@ -121,7 +121,8 @@ function kiwiCommand(command, callback) {
                         global.config.restrict_server_ssl,
                         command.nick,
                         {hostname: this.websocket.handshake.revdns, address: this.websocket.handshake.real_address},
-                        global.config.restrict_server_password);
+                        global.config.restrict_server_password,
+                        callback);
 
                 } else {
                     this.state.connect(
@@ -130,7 +131,8 @@ function kiwiCommand(command, callback) {
                         command.ssl,
                         command.nick,
                         {hostname: this.websocket.handshake.revdns, address: this.websocket.handshake.real_address},
-                        command.password);
+                        command.password,
+                        callback);
                 }
             } else {
                 return callback('Hostname, port and nickname must be specified');