mirror of
https://github.com/shazow/ssh-chat.git
synced 2025-04-14 16:17:17 +03:00
Merge branch 'master' of https://github.com/shazow/ssh-chat into version_make
This commit is contained in:
commit
9127234acf
@ -252,11 +252,11 @@ func (s *Server) List(prefix *string) []string {
|
||||
s.RLock()
|
||||
defer s.RUnlock()
|
||||
|
||||
for name := range s.clients {
|
||||
if prefix != nil && !strings.HasPrefix(name, *prefix) {
|
||||
for name, client := range s.clients {
|
||||
if prefix != nil && !strings.HasPrefix(name, strings.ToLower(*prefix)) {
|
||||
continue
|
||||
}
|
||||
r = append(r, name)
|
||||
r = append(r, client.Name)
|
||||
}
|
||||
|
||||
return r
|
||||
|
Loading…
x
Reference in New Issue
Block a user