Merge pull request #1670 from slingamn/snomasks

fix #1669
This commit is contained in:
Shivaram Lingamneni
2021-05-30 21:25:22 -04:00
committed by GitHub
3 changed files with 7 additions and 1 deletions
+5
View File
@@ -4,6 +4,7 @@
package sno
import (
"sort"
"strings"
)
@@ -34,6 +35,10 @@ func (masks Masks) Contains(mask Mask) bool {
return false
}
func (masks Masks) Sort() {
sort.Slice(masks, func(i, j int) bool { return masks[i] < masks[j] })
}
// Evaluate changes to snomasks made with MODE. There are several cases:
// adding snomasks with `/mode +s a` or `/mode +s +a`, removing them with `/mode +s -a`,
// adding all with `/mode +s *` or `/mode +s +*`, removing all with `/mode +s -*` or `/mode -s`
+1
View File
@@ -109,6 +109,7 @@ func (m *SnoManager) MasksEnabled(client *Client) (result sno.Masks) {
}
}
}
result.Sort()
return
}
+1 -1
Submodule irctest updated: 7be29ad801...a7d7436929