From d71cf8930ed18e4427af42a3bfea4934e19162d9 Mon Sep 17 00:00:00 2001 From: David Cormier Date: Mon, 5 Aug 2013 15:53:59 -0400 Subject: [PATCH] Sends password properly --- js/websockets.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/js/websockets.js b/js/websockets.js index ad8d4d4..391b079 100644 --- a/js/websockets.js +++ b/js/websockets.js @@ -195,11 +195,14 @@ weechat.factory('connection', ['$rootScope', '$log', 'handlers', 'colors', funct websocket.onopen = function (evt) { // FIXME: does password need to be sent only if protocol is not weechat? if (proto == "weechat") { - doSend("init compression=off\nversion\n"); + if (password) { + doSend("init compression=off,password=" + password + "\n"); + } + doSend("(bufinfo) hdata buffer:gui_buffers(*) full_name\n"); doSend("sync\n"); } else { - doSend("PASS " + password + "\r\nNICK test\r\nUSER test 0 * :test\r\n"); + } $log.info("Connected to relay"); $rootScope.connected = true;