lib/irc: add CapRegistry
This commit is contained in:
parent
f6895fed32
commit
4cabae89ff
5 changed files with 90 additions and 59 deletions
|
@ -322,10 +322,11 @@ export default {
|
|||
execute: (app, args) => {
|
||||
let newRealname = args.join(" ");
|
||||
let client = getActiveClient(app);
|
||||
if (!client.enabledCaps["setname"]) {
|
||||
if (!client.caps.enabled.has("setname")) {
|
||||
throw new Error("Server doesn't support changing the realname");
|
||||
}
|
||||
client.send({ command: "SETNAME", params: [newRealname] });
|
||||
// TODO: save to local storage
|
||||
},
|
||||
},
|
||||
"stats": {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue