CTCP PING/VERSION fix
authorroot <darren@darrenwhitlen.com>
Fri, 22 Jul 2011 23:55:22 +0000 (23:55 +0000)
committerroot <darren@darrenwhitlen.com>
Fri, 22 Jul 2011 23:55:22 +0000 (23:55 +0000)
img/Thumbs.db [new file with mode: 0644]
js/front.js
node/client/index.html.jade
node/kiwi.js

diff --git a/img/Thumbs.db b/img/Thumbs.db
new file mode 100644 (file)
index 0000000..5ffc0f1
Binary files /dev/null and b/img/Thumbs.db differ
index dc7c187c5019b4ab814465c06b30cd66dddd1651..9f96d3a8a1230cbdf397c5e563db3c7ead2d52d1 100644 (file)
@@ -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':
index 3633cd60d2c8afee19b651dc80c67433e4ef1e63..77e9dbe99ed6977cdc295460b98bbbd1d629cef0 100644 (file)
@@ -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;
                 });
index d7457c4427f42791307922e18d4c2626b8d56c92..9cd65636cfbf73f3b46c9105c7dfb0fce15bdeb7 100644 (file)
@@ -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)});
                 }