Skip to content

Commit

Permalink
Override whois input, repeating nick to get idle time
Browse files Browse the repository at this point in the history
  • Loading branch information
astorije committed Dec 19, 2016
1 parent aa1ef83 commit 5c873c8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion client/js/lounge.js
Expand Up @@ -978,7 +978,7 @@ $(function() {

socket.emit("input", {
target: chat.data("id"),
text: "/whois " + name + " " + name
text: "/whois " + name
});
});

Expand Down
1 change: 1 addition & 0 deletions src/client.js
Expand Up @@ -52,6 +52,7 @@ var inputs = [
"raw",
"topic",
"list",
"whois"
].reduce(function(plugins, name) {
var path = "./plugins/inputs/" + name;
var plugin = require(path);
Expand Down
10 changes: 10 additions & 0 deletions 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]);
};

0 comments on commit 5c873c8

Please sign in to comment.