From de90648eaa3acd6bb7199422c0bc1f0136d48634 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Wed, 1 Mar 2023 13:33:58 +0100 Subject: [PATCH] Rename casemapMap.setCasemapping to setCaseMapping --- downstream.go | 6 +++--- irc.go | 2 +- user.go | 16 ++++++++-------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/downstream.go b/downstream.go index 861ae11..d7fe837 100644 --- a/downstream.go +++ b/downstream.go @@ -365,7 +365,7 @@ func newDownstreamConn(srv *Server, ic ircConn, id uint64) *downstreamConn { monitored: newCasemapMap[struct{}](), registration: new(downstreamRegistration), } - dc.monitored.SetCasemapping(xirc.CaseMappingASCII) + dc.monitored.SetCaseMapping(xirc.CaseMappingASCII) if host, _, err := net.SplitHostPort(remoteAddr); err == nil { dc.hostname = host } else { @@ -1203,7 +1203,7 @@ func (dc *downstreamConn) updateCasemapping() { } dc.nickCM = cm(dc.nick) - dc.monitored.SetCasemapping(cm) + dc.monitored.SetCaseMapping(cm) } func sanityCheckServer(ctx context.Context, addr string) error { @@ -2652,7 +2652,7 @@ func (dc *downstreamConn) handleMessageRegistered(ctx context.Context, msg *irc. uc.updateMonitor() case "C": // clear dc.monitored = newCasemapMap[struct{}]() - dc.monitored.SetCasemapping(uc.network.casemap) + dc.monitored.SetCaseMapping(uc.network.casemap) uc.updateMonitor() case "L": // list // TODO: be less lazy and pack the list diff --git a/irc.go b/irc.go index fc29aab..728a3cc 100644 --- a/irc.go +++ b/irc.go @@ -277,7 +277,7 @@ func (cm *casemapMap[V]) ForEach(f func(string, V)) { } } -func (cm *casemapMap[V]) SetCasemapping(newCasemap xirc.CaseMapping) { +func (cm *casemapMap[V]) SetCaseMapping(newCasemap xirc.CaseMapping) { cm.casemap = newCasemap m := make(map[string]casemapEntry[V], len(cm.m)) for _, entry := range cm.m { diff --git a/user.go b/user.go index b77ba86..3d9cedc 100644 --- a/user.go +++ b/user.go @@ -389,16 +389,16 @@ func (net *network) deleteChannel(ctx context.Context, name string) error { func (net *network) updateCasemapping(newCasemap xirc.CaseMapping) { net.casemap = newCasemap - net.channels.SetCasemapping(newCasemap) - net.delivered.m.SetCasemapping(newCasemap) - net.pushTargets.SetCasemapping(newCasemap) + net.channels.SetCaseMapping(newCasemap) + net.delivered.m.SetCaseMapping(newCasemap) + net.pushTargets.SetCaseMapping(newCasemap) if uc := net.conn; uc != nil { - uc.channels.SetCasemapping(newCasemap) + uc.channels.SetCaseMapping(newCasemap) uc.channels.ForEach(func(_ string, uch *upstreamChannel) { - uch.Members.SetCasemapping(newCasemap) + uch.Members.SetCaseMapping(newCasemap) }) - uc.users.SetCasemapping(newCasemap) - uc.monitored.SetCasemapping(newCasemap) + uc.users.SetCaseMapping(newCasemap) + uc.monitored.SetCaseMapping(newCasemap) } net.forEachDownstream(func(dc *downstreamConn) { dc.updateCasemapping() @@ -694,7 +694,7 @@ func (u *user) run() { ctx := context.TODO() if dc.network != nil { - dc.monitored.SetCasemapping(dc.network.casemap) + dc.monitored.SetCaseMapping(dc.network.casemap) } if !u.Enabled && u.srv.Config().EnableUsersOnAuth {