mirror of
https://github.com/thelounge/thelounge
synced 2024-11-22 20:13:07 +00:00
dd05ee3a65
Co-authored-by: Eric Nemchik <eric@nemchik.com> Co-authored-by: Pavel Djundik <xPaw@users.noreply.github.com>
20 lines
509 B
TypeScript
20 lines
509 B
TypeScript
import {PluginInputHandler} from "./index";
|
|
|
|
const commands = ["whois"];
|
|
|
|
const input: PluginInputHandler = function ({irc}, 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.
|
|
irc.raw("WHOIS", args[0], args[0]);
|
|
} else {
|
|
// Re-assembling the command parsed in client.js
|
|
irc.raw(`${cmd} ${args.join(" ")}`);
|
|
}
|
|
};
|
|
|
|
export default {
|
|
commands,
|
|
input,
|
|
};
|