From f88564402afd517c01c4bd1e8bb4d8de8afc7690 Mon Sep 17 00:00:00 2001 From: Joe Robinson Date: Sun, 16 Oct 2016 20:22:07 +0100 Subject: Fix whois function --- handlers.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/handlers.js b/handlers.js index ffbb4f4..0abb297 100644 --- a/handlers.js +++ b/handlers.js @@ -59,6 +59,29 @@ module.exports.handleCommands = function(myClient) { topicTab.html("

"+topic+"

") }) + client.on('whois', function(event) { + var nick = event.nick + var chatTab = $(".active .chat"); + chatTab.append("

"+event.nick+": "+event.user+"@"+event.host+"

"); + chatTab.append("

Real Name: "+event.real_name+"

"); + chatTab.append("

Channels: " + event.channels+"

"); + chatTab.append("

Server: "+event.server+" "+event.server_info+"

"); + if (event.operator.length > 0) { + chatTab.append("

"+event.operator+"

"); + } + if (event.registered_nick.length > 0) { + chatTab.append("

"+event.registered_nick+"

"); + } + if (event.away.length > 0) { + chatTab.append("

"+event.away+"

"); + } + if (event.secure) { + chatTab.append("

is using a secure connection

"); + } + chatTab.scrollTop(chatTab.prop("scrollHeight")); + + }) + } function receiveMsg(target, from, message) { -- cgit v1.2.3