From 0137a952683063d863d7bfc302db5f50b577c9fc Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Mon, 6 Sep 2021 11:20:33 +0200 Subject: [PATCH] Add support for chghost See https://ircv3.net/specs/extensions/chghost --- lib/client.js | 1 + state.js | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/lib/client.js b/lib/client.js index 6a49de2..61b37a2 100644 --- a/lib/client.js +++ b/lib/client.js @@ -5,6 +5,7 @@ import * as irc from "./irc.js"; const permanentCaps = [ "away-notify", "batch", + "chghost", "echo-message", "invite-notify", "labeled-response", diff --git a/state.js b/state.js index 372bcd7..ff70024 100644 --- a/state.js +++ b/state.js @@ -401,6 +401,15 @@ export const State = { let who = { ...buf.who, realname: msg.params[0] }; 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": let awayMessage = msg.params[0];