commit 60d215d
Hubert Hirtz
·
2020-10-29 07:56:15 +0000 UTC
parent 8e01ade
Consider the CHANTYPES isupport token
1 files changed,
+5,
-1
+5,
-1
1@@ -257,7 +257,11 @@ func (s *Session) NickCf() string {
2 }
3
4 func (s *Session) IsChannel(name string) bool {
5- return strings.IndexAny(name, "#&") == 0 // TODO compute CHANTYPES
6+ chantypes, ok := s.features["CHANTYPES"]
7+ if !ok {
8+ chantypes = "#&"
9+ }
10+ return strings.IndexAny(name, chantypes) == 0
11 }
12
13 func (s *Session) Casemap(name string) string {