mirror of
https://github.com/shazow/ssh-chat.git
synced 2025-09-12 05:41:35 -04:00
small message change
This commit is contained in:
parent
4fe4ff0154
commit
10d42bac7c
3
host.go
3
host.go
@ -827,7 +827,6 @@ func (h *Host) InitCommands(c *chat.Commands) {
|
|||||||
}
|
}
|
||||||
allowlistedUsers := []string{}
|
allowlistedUsers := []string{}
|
||||||
allowlistedKeys := []string{}
|
allowlistedKeys := []string{}
|
||||||
// TODO: if we switch the loops, we can get unlisted users instead of unconnected keys easily
|
|
||||||
h.auth.allowlist.Each(func(key string, item set.Item) error {
|
h.auth.allowlist.Each(func(key string, item set.Item) error {
|
||||||
keyFP := item.Key()
|
keyFP := item.Key()
|
||||||
if forConnectedUsers(func(user *chat.Member, pk ssh.PublicKey) error {
|
if forConnectedUsers(func(user *chat.Member, pk ssh.PublicKey) error {
|
||||||
@ -846,7 +845,7 @@ func (h *Host) InitCommands(c *chat.Commands) {
|
|||||||
msgs = append(msgs, "Connected users on the allowlist: "+strings.Join(allowlistedUsers, ", "))
|
msgs = append(msgs, "Connected users on the allowlist: "+strings.Join(allowlistedUsers, ", "))
|
||||||
}
|
}
|
||||||
if len(allowlistedKeys) != 0 {
|
if len(allowlistedKeys) != 0 {
|
||||||
msgs = append(msgs, fmt.Sprintf("The following keys of not connected users are on the allowlist: %v", allowlistedKeys))
|
msgs = append(msgs, "Keys on the allowlist without connected user: "+strings.Join(allowlistedKeys, ", "))
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user