main
Robert Gerus 2022-01-16 00:41:03 +01:00
parent 1d2e1bdb29
commit 9434cb3752
2 changed files with 3 additions and 3 deletions

4
at.go
View File

@ -65,8 +65,8 @@ func (a *atMonitor) Run(c *irc.Client, done chan bool) {
current := atHS.UserListZWS() current := atHS.UserListZWS()
arrived := listSubstract(current, a.previousUserList) arrived := listSubtract(current, a.previousUserList)
left := listSubstract(a.previousUserList, current) left := listSubtract(a.previousUserList, current)
if len(arrived) > 0 { if len(arrived) > 0 {
diffText = fmt.Sprint(" +", arrived) diffText = fmt.Sprint(" +", arrived)

View File

@ -7,7 +7,7 @@ import (
"time" "time"
) )
func listSubstract(a, b []string) (ret []string) { func listSubtract(a, b []string) (ret []string) {
mb := make(map[string]bool, len(b)) mb := make(map[string]bool, len(b))
for _, x := range b { for _, x := range b {