mirror of
https://github.com/thelounge/thelounge.git
synced 2024-06-16 04:25:13 +02:00
da2e286ff8
This queries server of the other user and not current user, which does not know idle time. See http://superuser.com/a/272069/208074. Override is done before command is being sent to the server: if a single argument is given to `/whois`, it is being repeated, otherwise the command is sent as is.
16 lines
440 B
JavaScript
16 lines
440 B
JavaScript
"use strict";
|
|
|
|
exports.commands = ["whois"];
|
|
|
|
exports.input = function(network, chan, cmd, args) {
|
|
if (args.length === 1) {
|
|
// 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]);
|
|
} else {
|
|
// Re-assembling the command parsed in client.js
|
|
network.irc.raw(`${cmd} ${args.join(" ")}`);
|
|
}
|
|
};
|