summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Robinson <joe@lc8n.com>2016-10-16 20:22:07 +0100
committerJoe Robinson <joe@lc8n.com>2016-10-16 20:22:07 +0100
commitf88564402afd517c01c4bd1e8bb4d8de8afc7690 (patch)
treecb8b7077d862d9048d5df7c195f2fcfb13fbdc70
parent1dd55949f2d53bf48ca016ab2d4acff172c443b4 (diff)
Fix whois function
-rw-r--r--handlers.js23
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) {