diff --git a/js/glowingbear.js b/js/glowingbear.js index ca7aa6f..d218487 100644 --- a/js/glowingbear.js +++ b/js/glowingbear.js @@ -226,13 +226,11 @@ weechat.factory('handlers', ['$rootScope', 'models', 'plugins', function($rootSc weechat.factory('connection', ['$rootScope', '$log', - '$store', 'handlers', 'models', 'ngWebsockets', function($rootScope, $log, - storage, handlers, models, ngWebsockets) { @@ -241,27 +239,6 @@ function($rootScope, // Takes care of the connection and websocket hooks - var _formatForWs = function(message) { - /* - * Formats a weechat message to be sent over - * the websocket. - */ - message.replace(/[\r\n]+$/g, "").split("\n"); - return message; - }; - - var _send = function(message) { - return ngWebsockets.send(_formatForWs(message)); - }; - - var _sendAll = function(messages) { - for (var i in messages) { - messages[i] = _formatForWs(messages[i]); - } - return ngWebsockets.sendAll(messages); - }; - - var connect = function (host, port, passwd, ssl, noCompression) { var proto = ssl ? 'wss' : 'ws'; var url = proto + "://" + host + ":" + port + "/weechat"; @@ -363,7 +340,7 @@ function($rootScope, }; - var onmessage = function(event) { + var onmessage = function() { // If we recieve a message from WeeChat it means that // password was OK. Store that result and check for it // in the failure handler. diff --git a/js/irc-utils.js b/js/irc-utils.js index 3413559..ff4c488 100644 --- a/js/irc-utils.js +++ b/js/irc-utils.js @@ -53,7 +53,6 @@ var IrcUtils = { * @return Next nick (may be the same) */ _nextNick: function(iterCandidate, currentNick, nickList) { - var firstInGroup = null; var matchingNicks = []; var at = null; var lcIterCandidate = iterCandidate.toLowerCase();