}\r
});\r
});\r
+\r
+\r
+ gw.on('onwhois', function (event) {\r
+ /*globals secondsToTime */\r
+ var logon_date, idle_time = '', panel;\r
+\r
+ if (event.end) {\r
+ return;\r
+ }\r
+\r
+ if (typeof event.idle !== 'undefined') {\r
+ idle_time = secondsToTime(parseInt(event.idle, 10));\r
+ idle_time = idle_time.h.toString().lpad(2, "0") + ':' + idle_time.m.toString().lpad(2, "0") + ':' + idle_time.s.toString().lpad(2, "0");\r
+ }\r
+\r
+ panel = kiwi.app.panels.active;\r
+ if (event.msg) {\r
+ panel.addMsg(event.nick, event.msg, 'whois');\r
+ } else if (event.logon) {\r
+ logon_date = new Date();\r
+ logon_date.setTime(event.logon * 1000);\r
+ logon_date = logon_date.toLocaleString();\r
+\r
+ panel.addMsg(event.nick, 'idle for ' + idle_time + ', signed on ' + logon_date, 'whois');\r
+ } else {\r
+ panel.addMsg(event.nick, 'idle for ' + idle_time, 'whois');\r
+ }\r
+ });\r
};\r
\r
\r