diff --git a/commands.js b/commands.js index 61dc14a..390473a 100644 --- a/commands.js +++ b/commands.js @@ -331,6 +331,13 @@ export default { description: "Gives a user voiced status on this channel", execute: (app, args) => givemode(app, args, "+v"), }, + "who": { + usage: "[ [o]]", + description: "Retrieve a list of users", + execute: (app, args) => { + getActiveClient(app).send({ command: "WHO", params: args }); + }, + }, "whois": { usage: "", description: "Retrieve information about a user", @@ -339,7 +346,7 @@ export default { if (!nick) { throw new Error("Missing nick"); } - getActiveClient(app).whois(nick); + getActiveClient(app).send({ command: "WHOIS", params: [nick] }); }, }, }; diff --git a/components/app.js b/components/app.js index 27f9a7c..c16df41 100644 --- a/components/app.js +++ b/components/app.js @@ -663,6 +663,8 @@ export default class App extends Component { }; this.setBufferState({ network: netID, name: who.nick }, { who, offline: false }); + + this.addMessage(netID, SERVER_BUFFER, msg); break; case irc.RPL_ENDOFWHO: var target = msg.params[1]; @@ -677,6 +679,8 @@ export default class App extends Component { return { offline: true }; }); } + + this.addMessage(netID, SERVER_BUFFER, msg); break; case "MODE": var target = msg.params[0];