From 0af40a1a8e4ea3fe210555290617e4a26990a9fe Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Sun, 21 Nov 2021 12:13:44 +0100 Subject: [PATCH] state: add account to server --- state.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/state.js b/state.js index 04e4eea..e8fa354 100644 --- a/state.js +++ b/state.js @@ -255,6 +255,7 @@ export const State = { status: ServerStatus.DISCONNECTED, isupport: new Map(), users: new irc.CaseMapMap(null, irc.CaseMapping.RFC1459), + account: null, }); return [id, { servers }]; }, @@ -345,6 +346,10 @@ export const State = { }; }), }; + case irc.RPL_LOGGEDIN: + return updateServer({ account: msg.params[2] }); + case irc.RPL_LOGGEDOUT: + return updateServer({ account: null }); case irc.RPL_NOTOPIC: channel = msg.params[1]; return updateBuffer(channel, { topic: null });