From d12e1109b3d9cfc12b4a3ae984fa8aea3a909cb7 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Tue, 21 Sep 2021 14:49:32 +0200 Subject: [PATCH] Add support for account-notify --- components/app.js | 2 ++ lib/client.js | 1 + state.js | 6 ++++++ 3 files changed, 9 insertions(+) diff --git a/components/app.js b/components/app.js index 193e1ae..6b73607 100644 --- a/components/app.js +++ b/components/app.js @@ -798,6 +798,8 @@ export default class App extends Component { case irc.RPL_MONOFFLINE: case "AWAY": case "SETNAME": + case "CHGHOST": + case "ACCOUNT": case "CAP": case "AUTHENTICATE": case "PING": diff --git a/lib/client.js b/lib/client.js index 8e87958..464db7d 100644 --- a/lib/client.js +++ b/lib/client.js @@ -3,6 +3,7 @@ import * as irc from "./irc.js"; // Static list of capabilities that are always requested when supported by the // server const permanentCaps = [ + "account-notify", "away-notify", "batch", "chghost", diff --git a/state.js b/state.js index 00f8ae3..9865f9d 100644 --- a/state.js +++ b/state.js @@ -464,6 +464,12 @@ export const State = { username: msg.params[0], hostname: msg.params[1], }); + case "ACCOUNT": + let account = msg.params[0]; + if (account === "*") { + account = null; + } + return updateUser(msg.prefix.name, { account }); case "AWAY": let awayMessage = msg.params[0]; return updateUser(msg.prefix.name, { away: !!awayMessage });