From: root Date: Fri, 22 Jul 2011 23:55:22 +0000 (+0000) Subject: CTCP PING/VERSION fix X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=d8568ae27a743b6ecc97dd090c40611c8dea4903;p=KiwiIRC.git CTCP PING/VERSION fix --- diff --git a/img/Thumbs.db b/img/Thumbs.db new file mode 100644 index 0000000..5ffc0f1 Binary files /dev/null and b/img/Thumbs.db differ diff --git a/js/front.js b/js/front.js index dc7c187..9f96d3a 100644 --- a/js/front.js +++ b/js/front.js @@ -325,6 +325,7 @@ var front = { var msg = data.msg.split(" ", 2); switch (msg[0]) { case 'PING': + if(typeof msg[1] === 'undefined') msg[1] = ''; gateway.notice(data.nick, '\001PING ' + msg[1] + '\001'); break; case 'TIME': diff --git a/node/client/index.html.jade b/node/client/index.html.jade index 3633cd6..77e9dbe 100644 --- a/node/client/index.html.jade +++ b/node/client/index.html.jade @@ -62,7 +62,7 @@ html(xmlns="http://www.w3.org/1999/xhtml", lang="en-gb") return false; }); $('a.connect').click(function(){ $('.formconnectwindow').submit(); return false; }); - $('a.chan').live('dblclick', function() { + $('a.chan').live('click', function() { front.joinChannel($(this).text()); return false; }); diff --git a/node/kiwi.js b/node/kiwi.js index d7457c4..9cd6563 100644 --- a/node/kiwi.js +++ b/node/kiwi.js @@ -197,8 +197,7 @@ var parseIRCMessage = function (websocket, ircSocket, data) { if (msg.trailing.substr(1, 6) === 'ACTION') { websocket.emit('message', {event: 'action', nick: msg.nick, ident: msg.ident, hostname: msg.hostname, channel: msg.params.trim(), msg: msg.trailing.substr(1, msg.trailing.length - 2)}); } else if (msg.trailing.substr(1, 7) === 'VERSION') { - console.log('NOTICE ' + msg.nick + ':\001VERSION KiwiIRC\001\r\n'); - ircSocket.write('NOTICE ' + msg.nick + ':\001VERSION KiwiIRC\001\r\n'); + ircSocket.write('NOTICE ' + msg.nick + ' :\001VERSION KiwiIRC\001\r\n'); } else { websocket.emit('message', {event: 'ctcp_request', nick: msg.nick, ident: msg.ident, hostname: msg.hostname, channel: msg.params.trim(), msg: msg.trailing.substr(1, msg.trailing.length - 2)}); }