downstream: set case-mapping for monitored

This commit is contained in:
Simon Ser 2022-03-08 21:28:43 +01:00
parent 9a79c66921
commit d8f5f8481f

View File

@ -329,6 +329,7 @@ func newDownstreamConn(srv *Server, ic ircConn, id uint64) *downstreamConn {
caps: make(map[string]bool), caps: make(map[string]bool),
monitored: newCasemapMap(0), monitored: newCasemapMap(0),
} }
dc.monitored.SetCasemapping(casemapASCII)
dc.hostname = remoteAddr dc.hostname = remoteAddr
if host, _, err := net.SplitHostPort(dc.hostname); err == nil { if host, _, err := net.SplitHostPort(dc.hostname); err == nil {
dc.hostname = host dc.hostname = host
@ -2605,6 +2606,7 @@ func (dc *downstreamConn) handleMessageRegistered(ctx context.Context, msg *irc.
uc.updateMonitor() uc.updateMonitor()
case "C": // clear case "C": // clear
dc.monitored = newCasemapMap(0) dc.monitored = newCasemapMap(0)
dc.monitored.SetCasemapping(casemapASCII)
uc.updateMonitor() uc.updateMonitor()
case "L": // list case "L": // list
// TODO: be less lazy and pack the list // TODO: be less lazy and pack the list