diff --git a/client/js/lounge.js b/client/js/lounge.js index 9c2256923b..e04c5b8711 100644 --- a/client/js/lounge.js +++ b/client/js/lounge.js @@ -978,7 +978,7 @@ $(function() { socket.emit("input", { target: chat.data("id"), - text: "/whois " + name + " " + name + text: "/whois " + name }); }); diff --git a/src/client.js b/src/client.js index 50edae0109..01e52ec96f 100644 --- a/src/client.js +++ b/src/client.js @@ -52,6 +52,7 @@ var inputs = [ "raw", "topic", "list", + "whois" ].reduce(function(plugins, name) { var path = "./plugins/inputs/" + name; var plugin = require(path); diff --git a/src/plugins/inputs/whois.js b/src/plugins/inputs/whois.js new file mode 100644 index 0000000000..a034b96d95 --- /dev/null +++ b/src/plugins/inputs/whois.js @@ -0,0 +1,10 @@ +"use strict"; + +exports.commands = ["whois"]; + +exports.input = function(network, chan, cmd, args) { + // This queries server of the other user and not of the current user, which + // does not know idle time. + // See http://superuser.com/a/272069/208074. + network.irc.raw("WHOIS", args[0], args[0]); +};