diff options
| author | Hubert Hirtz <hubert@hirtz.pm> | 2020-10-29 08:56:15 +0100 |
|---|---|---|
| committer | Hubert Hirtz <hubert@hirtz.pm> | 2020-11-19 19:45:52 +0100 |
| commit | 60d215d05da5f2d377b80214a68616e11339e406 (patch) | |
| tree | 84f014df36a692353a75a8d6242787839fd72c7d | |
| parent | Basic display of errors (diff) | |
Consider the CHANTYPES isupport token
Diffstat (limited to '')
| -rw-r--r-- | irc/states.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/irc/states.go b/irc/states.go index 44d88ac..650c0e1 100644 --- a/irc/states.go +++ b/irc/states.go @@ -257,7 +257,11 @@ func (s *Session) NickCf() string { } func (s *Session) IsChannel(name string) bool { - return strings.IndexAny(name, "#&") == 0 // TODO compute CHANTYPES + chantypes, ok := s.features["CHANTYPES"] + if !ok { + chantypes = "#&" + } + return strings.IndexAny(name, chantypes) == 0 } func (s *Session) Casemap(name string) string { |
