From 3e6d7e08a3a07e82a893cbcbca76087b1ebf13a4 Mon Sep 17 00:00:00 2001 From: nato Date: Mon, 23 Jan 2023 17:43:36 -0800 Subject: [PATCH] Host.Connect(): upon connection, initialize the user's symbol prefix to their key's comment. --- host.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/host.go b/host.go index 62276ab..3b281d3 100644 --- a/host.go +++ b/host.go @@ -101,6 +101,9 @@ func (h *Host) isOp(conn sshd.Connection) bool { // Connect a specific Terminal to this host and its room. func (h *Host) Connect(term *sshd.Terminal) { id := NewIdentity(term.Conn) + + id.SetSymbol(h.auth.comments[sshd.Fingerprint(id.PublicKey())]) + user := message.NewUserScreen(id, term) user.OnChange = func() { term.SetPrompt(GetPrompt(user))