$(gateway).bind("onsync", front.onSync);
$(gateway).bind("onchannel_redirect", front.onChannelRedirect);
$(gateway).bind("ondebug", front.onDebug);
- $(dateway).bind("onctcp_request", front.onCTCPRequest);
- $(dateway).bind("onctcp_response", front.onCTCPResponse);
+ $(gateway).bind("onctcp_request", front.onCTCPRequest);
+ $(gateway).bind("onctcp_response", front.onCTCPResponse);
this.buffer = [];
case 'PING':
gateway.notice(data.nick, '\001PING ' + msg[1] + '\001');
break;
- case 'TIME';
+ case 'TIME':
gateway.notice(data.nick, '\001TIME ' + (new Date()).toLocaleString() + '\001');
break;
}
- front.tabviews.server.addMsg(null, data.server, data.msg, 'ctcp');
+ front.tabviews.server.addMsg(null, 'CTCP ['+data.nick+']', data.msg, 'ctcp');
},
- on CTCPResponse: function(e, data) {
+ onCTCPResponse: function(e, data) {
},
onConnect: function (e, 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') {
- ircSocket.write('NOTICE ' + msg.nick + ':\001VERSION Kiwi IRC\001\r\n');
+ console.log('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)});
}