mirror of
https://github.com/shazow/ssh-chat.git
synced 2025-09-09 12:21:38 -04:00
Host.Connect(): upon connection, initialize the user's symbol prefix to their key's comment.
This commit is contained in:
parent
6ffc5ccb68
commit
3e6d7e08a3
3
host.go
3
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))
|
||||
|
Loading…
x
Reference in New Issue
Block a user