Add support for chghost

See https://ircv3.net/specs/extensions/chghost
This commit is contained in:
Simon Ser 2021-09-06 11:20:33 +02:00
parent a51be5037d
commit 0137a95268
2 changed files with 10 additions and 0 deletions

View file

@ -5,6 +5,7 @@ import * as irc from "./irc.js";
const permanentCaps = [ const permanentCaps = [
"away-notify", "away-notify",
"batch", "batch",
"chghost",
"echo-message", "echo-message",
"invite-notify", "invite-notify",
"labeled-response", "labeled-response",

View file

@ -401,6 +401,15 @@ export const State = {
let who = { ...buf.who, realname: msg.params[0] }; let who = { ...buf.who, realname: msg.params[0] };
return { who }; return { who };
}); });
case "CHGHOST":
return updateBuffer(msg.prefix.name, (buf) => {
let who = {
...buf.who,
username: msg.params[0],
hostname: msg.params[1],
};
return { who };
});
case "AWAY": case "AWAY":
let awayMessage = msg.params[0]; let awayMessage = msg.params[0];