mirror of
https://git.sr.ht/~emersion/gamja
synced 2024-11-25 09:07:56 -05:00
Add /who
This commit is contained in:
parent
fff0907354
commit
e271a3cd0e
2 changed files with 12 additions and 1 deletions
|
@ -331,6 +331,13 @@ export default {
|
||||||
description: "Gives a user voiced status on this channel",
|
description: "Gives a user voiced status on this channel",
|
||||||
execute: (app, args) => givemode(app, args, "+v"),
|
execute: (app, args) => givemode(app, args, "+v"),
|
||||||
},
|
},
|
||||||
|
"who": {
|
||||||
|
usage: "[<mask> [o]]",
|
||||||
|
description: "Retrieve a list of users",
|
||||||
|
execute: (app, args) => {
|
||||||
|
getActiveClient(app).send({ command: "WHO", params: args });
|
||||||
|
},
|
||||||
|
},
|
||||||
"whois": {
|
"whois": {
|
||||||
usage: "<nick>",
|
usage: "<nick>",
|
||||||
description: "Retrieve information about a user",
|
description: "Retrieve information about a user",
|
||||||
|
@ -339,7 +346,7 @@ export default {
|
||||||
if (!nick) {
|
if (!nick) {
|
||||||
throw new Error("Missing nick");
|
throw new Error("Missing nick");
|
||||||
}
|
}
|
||||||
getActiveClient(app).whois(nick);
|
getActiveClient(app).send({ command: "WHOIS", params: [nick] });
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -663,6 +663,8 @@ export default class App extends Component {
|
||||||
};
|
};
|
||||||
|
|
||||||
this.setBufferState({ network: netID, name: who.nick }, { who, offline: false });
|
this.setBufferState({ network: netID, name: who.nick }, { who, offline: false });
|
||||||
|
|
||||||
|
this.addMessage(netID, SERVER_BUFFER, msg);
|
||||||
break;
|
break;
|
||||||
case irc.RPL_ENDOFWHO:
|
case irc.RPL_ENDOFWHO:
|
||||||
var target = msg.params[1];
|
var target = msg.params[1];
|
||||||
|
@ -677,6 +679,8 @@ export default class App extends Component {
|
||||||
return { offline: true };
|
return { offline: true };
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.addMessage(netID, SERVER_BUFFER, msg);
|
||||||
break;
|
break;
|
||||||
case "MODE":
|
case "MODE":
|
||||||
var target = msg.params[0];
|
var target = msg.params[0];
|
||||||
|
|
Loading…
Reference in a new issue