diff options
author | Joe Robinson <joe@lc8n.com> | 2016-10-16 20:22:07 +0100 |
---|---|---|
committer | Joe Robinson <joe@lc8n.com> | 2016-10-16 20:22:07 +0100 |
commit | f88564402afd517c01c4bd1e8bb4d8de8afc7690 (patch) | |
tree | cb8b7077d862d9048d5df7c195f2fcfb13fbdc70 | |
parent | 1dd55949f2d53bf48ca016ab2d4acff172c443b4 (diff) |
Fix whois function
-rw-r--r-- | handlers.js | 23 |
1 files changed, 23 insertions, 0 deletions
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("<p class='topic-line'>"+topic+"</p>") }) + client.on('whois', function(event) { + var nick = event.nick + var chatTab = $(".active .chat"); + chatTab.append("<p class='chat-line'>"+event.nick+": "+event.user+"@"+event.host+"</p>"); + chatTab.append("<p class='chat-line'> Real Name: "+event.real_name+"</p>"); + chatTab.append("<p class='chat-line'> Channels: " + event.channels+"</p>"); + chatTab.append("<p class='chat-line'> Server: "+event.server+" "+event.server_info+"</p>"); + if (event.operator.length > 0) { + chatTab.append("<p class='chat-line'>"+event.operator+"</p>"); + } + if (event.registered_nick.length > 0) { + chatTab.append("<p class='chat-line'>"+event.registered_nick+"</p>"); + } + if (event.away.length > 0) { + chatTab.append("<p class='chat-line'>"+event.away+"</p>"); + } + if (event.secure) { + chatTab.append("<p class='chat-line'>is using a secure connection</p>"); + } + chatTab.scrollTop(chatTab.prop("scrollHeight")); + + }) + } function receiveMsg(target, from, message) { |