summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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) {