summaryrefslogtreecommitdiff
path: root/irc/states.go
diff options
context:
space:
mode:
authorHubert Hirtz <hubert@hirtz.pm>2020-10-29 08:59:28 +0100
committerHubert Hirtz <hubert@hirtz.pm>2020-11-19 19:45:52 +0100
commitcf5d7431d754b61fcd929951326eaea27bc74bd1 (patch)
tree343c8adcbd57e126220fc3ed3a426b9528c11ee7 /irc/states.go
parentConsider the CHANTYPES isupport token (diff)
Consider the CASEMAPPING isupport token
Using RFC1459 as a default since servers not advertising this token are likely to be pre-IRCv2, thus following the casemapping described in the RFCs.
Diffstat (limited to 'irc/states.go')
-rw-r--r--irc/states.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/irc/states.go b/irc/states.go
index 650c0e1..da5d582 100644
--- a/irc/states.go
+++ b/irc/states.go
@@ -265,8 +265,11 @@ func (s *Session) IsChannel(name string) bool {
}
func (s *Session) Casemap(name string) string {
- // TODO use CASEMAPPING
- return CasemapASCII(name)
+ if s.features["CASEMAPPING"] == "ascii" {
+ return CasemapASCII(name)
+ } else {
+ return CasemapRFC1459(name)
+ }
}
func (s *Session) Users() []string {