mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
strip space and ignore empty users from who
This commit is contained in:
parent
779f0a25c3
commit
306e2b0514
@ -59,7 +59,8 @@ func loggedInUsersLinux() []string {
|
||||
|
||||
if len(col) > 0 {
|
||||
for _, cleanedU := range cleaned {
|
||||
if strings.Compare(cleanedU, col[0]) == 0 {
|
||||
u := strings.TrimSpace(col[0])
|
||||
if len(u) == 0 || strings.Compare(cleanedU, col[0]) == 0 {
|
||||
clean = false
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user