Add support for IRCv3 setname
This commit is contained in:
parent
92535fae24
commit
12a38ace90
3 changed files with 22 additions and 1 deletions
12
commands.js
12
commands.js
|
@ -144,6 +144,18 @@ export default {
|
|||
app.reconnect();
|
||||
},
|
||||
},
|
||||
"setname": {
|
||||
usage: "<realname>",
|
||||
description: "Change current realname",
|
||||
execute: (app, args) => {
|
||||
var newRealname = args.join(" ");
|
||||
var client = getActiveClient(app);
|
||||
if (!client.enabledCaps["setname"]) {
|
||||
throw new Error("Server doesn't support changing the realname");
|
||||
}
|
||||
client.send({ command: "SETNAME", params: [newRealname] });
|
||||
},
|
||||
},
|
||||
"topic": {
|
||||
usage: "<topic>",
|
||||
description: "Change the topic of the current channel",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue